Revert incorrect RCL_3 drop: RCL_3 PDK_3.0.2 PDK_3.0.3
authorPat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:30:32 +0100
branchRCL_3
changeset 20 93c594350b9a
parent 19 cce62ebc198e
Revert incorrect RCL_3 drop: Revision: 201031 Kit: 201035
common/radio_global.h
common/radiologger.cpp
common/radiologger.h
common/radionotificationdata.h
common/radioservicedef.h
fmradio/activeidleengine/bwins/fmradioactiveidleengine200u.def
fmradio/activeidleengine/eabi/fmradioactiveidleengine200u.def
fmradio/activeidleengine/group/bld.inf
fmradio/activeidleengine/group/fmradioactiveidleengine.mmp
fmradio/activeidleengine/inc/fmradioactiveidleengine.h
fmradio/activeidleengine/inc/fmradioactiveidleenginenotifyhandler.h
fmradio/activeidleengine/src/fmradioactiveidleengine.cpp
fmradio/conf/fmradio.confml
fmradio/conf/fmradio_2001b25e.crml
fmradio/fmradio/aif/fmradioaif.rss
fmradio/fmradio/aif/qgn_indi_tb_ovi_music.svg
fmradio/fmradio/data/fmradio.rh
fmradio/fmradio/data/fmradio.rss
fmradio/fmradio/data/fmradio_caption.rss
fmradio/fmradio/data/fmradio_reg.rss
fmradio/fmradio/group/bld.inf
fmradio/fmradio/group/fmradio.mmp
fmradio/fmradio/group/iconlist.txt
fmradio/fmradio/inc/debug.h
fmradio/fmradio/inc/fmradio.hrh
fmradio/fmradio/inc/fmradioalfbitmapanimation.h
fmradio/fmradio/inc/fmradioalfindicator.h
fmradio/fmradio/inc/fmradioalfmediaidle.h
fmradio/fmradio/inc/fmradioalfrdsviewer.h
fmradio/fmradio/inc/fmradioalfrdsviewobserver.h
fmradio/fmradio/inc/fmradioalfvisualizer.h
fmradio/fmradio/inc/fmradioapp.h
fmradio/fmradio/inc/fmradioappui.h
fmradio/fmradio/inc/fmradiobacksteppingservicewrapper.h
fmradio/fmradio/inc/fmradiochannellistcontainer.h
fmradio/fmradio/inc/fmradiochannellistview.h
fmradio/fmradio/inc/fmradiocommandlineparams.h
fmradio/fmradio/inc/fmradiocontroleventobserverimpl.h
fmradio/fmradio/inc/fmradiodefines.h
fmradio/fmradio/inc/fmradiodocument.h
fmradio/fmradio/inc/fmradiofrequencyeditor.h
fmradio/fmradio/inc/fmradiofrequencynumber.h
fmradio/fmradio/inc/fmradiofrequencyquerycontrol.h
fmradio/fmradio/inc/fmradiofrequencyquerydialog.h
fmradio/fmradio/inc/fmradioglobalconfirmationquery.h
fmradio/fmradio/inc/fmradioidlecontrolinterface.h
fmradio/fmradio/inc/fmradioidlecontroller.h
fmradio/fmradio/inc/fmradiologo.h
fmradio/fmradio/inc/fmradiologoobserver.h
fmradio/fmradio/inc/fmradiomaincontainer.h
fmradio/fmradio/inc/fmradiomainview.h
fmradio/fmradio/inc/fmradiomusicstorehandler.h
fmradio/fmradio/inc/fmradiopreset.h
fmradio/fmradio/inc/fmradioscanlocalstationscontainer.h
fmradio/fmradio/inc/fmradioscanlocalstationsview.h
fmradio/fmradio/inc/fmradiosvkevents.h
fmradio/fmradio/inc/fmradiouids.h
fmradio/fmradio/inc/mchannellisthandler.h
fmradio/fmradio/inc/mfmradiolayoutchangeobserver.h
fmradio/fmradio/rom/fmradio.iby
fmradio/fmradio/rom/fmradioresources.iby
fmradio/fmradio/src/fmradioalfbitmapanimation.cpp
fmradio/fmradio/src/fmradioalfindicator.cpp
fmradio/fmradio/src/fmradioalfmediaidle.cpp
fmradio/fmradio/src/fmradioalfrdsviewer.cpp
fmradio/fmradio/src/fmradioalfvisualizer.cpp
fmradio/fmradio/src/fmradioapp.cpp
fmradio/fmradio/src/fmradioappui.cpp
fmradio/fmradio/src/fmradiobacksteppingservicewrapper.cpp
fmradio/fmradio/src/fmradiochannellistcontainer.cpp
fmradio/fmradio/src/fmradiochannellistview.cpp
fmradio/fmradio/src/fmradiocontroleventobserverimpl.cpp
fmradio/fmradio/src/fmradiodocument.cpp
fmradio/fmradio/src/fmradiofrequencyeditor.cpp
fmradio/fmradio/src/fmradiofrequencynumber.cpp
fmradio/fmradio/src/fmradiofrequencyquerycontrol.cpp
fmradio/fmradio/src/fmradiofrequencyquerydialog.cpp
fmradio/fmradio/src/fmradioglobalconfirmationquery.cpp
fmradio/fmradio/src/fmradioidlecontroller.cpp
fmradio/fmradio/src/fmradiologo.cpp
fmradio/fmradio/src/fmradiomaincontainer.cpp
fmradio/fmradio/src/fmradiomainview.cpp
fmradio/fmradio/src/fmradiomusicstorehandler.cpp
fmradio/fmradio/src/fmradiopreset.cpp
fmradio/fmradio/src/fmradioscanlocalstationscontainer.cpp
fmradio/fmradio/src/fmradioscanlocalstationsview.cpp
fmradio/fmradio/src/fmradiosvkevents.cpp
fmradio/fmradioactionhandler/group/bld.inf
fmradio/fmradioactionhandler/group/fmradioactionhandler.mmp
fmradio/fmradioactionhandler/inc/fmradioactionhandler.h
fmradio/fmradioactionhandler/inc/fmradioactionhandlerdefs.h
fmradio/fmradioactionhandler/resources/2001f498.rss
fmradio/fmradioactionhandler/resources/fmradioactionhandler.hrh
fmradio/fmradioactionhandler/src/fmradioactionhandler.cpp
fmradio/fmradioengine/bwins/fmradioengineacu.def
fmradio/fmradioengine/cenrep/2001b25e.cre
fmradio/fmradioengine/cenrep/2001b25e.txt
fmradio/fmradioengine/data/fmradioengine.rss
fmradio/fmradioengine/eabi/fmradioengineacu.def
fmradio/fmradioengine/group/backup_registration.xml
fmradio/fmradioengine/group/bld.inf
fmradio/fmradioengine/group/fmradioengine.mmp
fmradio/fmradioengine/inc/debug.h
fmradio/fmradioengine/inc/fmradioaccessoryconnection.h
fmradio/fmradioengine/inc/fmradioaudioutils.hrh
fmradio/fmradioengine/inc/fmradiocontroleventobserver.h
fmradio/fmradioengine/inc/fmradioengine.h
fmradio/fmradioengine/inc/fmradioengine.hrh
fmradio/fmradioengine/inc/fmradioenginecentralrepositoryhandler.h
fmradio/fmradioengine/inc/fmradioenginecrkeys.h
fmradio/fmradioengine/inc/fmradioenginedosserverobserver.h
fmradio/fmradioengine/inc/fmradioengineradiosettings.h
fmradio/fmradioengine/inc/fmradioengineradiostatehandler.h
fmradio/fmradioengine/inc/fmradioenginestatechangecallback.h
fmradio/fmradioengine/inc/fmradioheadseteventobserver.h
fmradio/fmradioengine/inc/fmradiointernalpskeys.h
fmradio/fmradioengine/inc/fmradiomobilenetworkinfolistener.h
fmradio/fmradioengine/inc/fmradionetworkchangeobserver.h
fmradio/fmradioengine/inc/fmradiopropertyobserver.h
fmradio/fmradioengine/inc/fmradiopubsub.h
fmradio/fmradioengine/inc/fmradiordsobserver.h
fmradio/fmradioengine/inc/fmradiordsreceiver.h
fmradio/fmradioengine/inc/fmradiordsreceiverbase.h
fmradio/fmradioengine/inc/fmradiordsreceiversimulator.h
fmradio/fmradioengine/inc/fmradioregion.h
fmradio/fmradioengine/inc/fmradiosystemeventdetector.h
fmradio/fmradioengine/inc/fmradiosystemeventdetectorobserver.h
fmradio/fmradioengine/inc/fmradiosystemutils.h
fmradio/fmradioengine/rom/fmradioengine.iby
fmradio/fmradioengine/src/fmradioaccessoryconnection.cpp
fmradio/fmradioengine/src/fmradioengine.cpp
fmradio/fmradioengine/src/fmradioenginecentralrepositoryhandler.cpp
fmradio/fmradioengine/src/fmradioenginedosserverobserver.cpp
fmradio/fmradioengine/src/fmradioengineradiosettings.cpp
fmradio/fmradioengine/src/fmradioengineradiostatehandler.cpp
fmradio/fmradioengine/src/fmradiomobilenetworkinfolistener.cpp
fmradio/fmradioengine/src/fmradiopropertyobserver.cpp
fmradio/fmradioengine/src/fmradiopubsub.cpp
fmradio/fmradioengine/src/fmradiordsreceiver.cpp
fmradio/fmradioengine/src/fmradiordsreceiverbase.cpp
fmradio/fmradioengine/src/fmradiordsreceiversimulator.cpp
fmradio/fmradioengine/src/fmradioregion.cpp
fmradio/fmradioengine/src/fmradiosystemeventdetector.cpp
fmradio/fmradiomcpplugin/group/bld.inf
fmradio/fmradiomcpplugin/group/fmradiomcpplugin.mmp
fmradio/fmradiomcpplugin/inc/fmradiomcpplugin.h
fmradio/fmradiomcpplugin/resources/2001f497.rss
fmradio/fmradiomcpplugin/resources/fmradiomcpplugin.hrh
fmradio/fmradiomcpplugin/resources/fmradiomcpplugin.rss
fmradio/fmradiomcpplugin/src/fmradiomcpplugin.cpp
fmradio/group/bld.inf
fmradio/help/data/xhtml.zip
fmradio/help/group/bld.inf
fmradio/help/inc/radio.hlp.hrh
fmradio/help/rom/fmradiohelps_variant.iby
fmradio/inc/fmradioactiveidle.hrh
fmradio/inc/fmradiovariant.hrh
fmradio/loc/fmradio.loc
fmradio/sis/fmradio_cenrep_updated/fmradiocenrep.pkg
fmradio/sis/fmradio_cenrep_updated/fmradiocenrep.sis
fmradio/sis/fmradio_cenrep_updated/package.pkg
fmradio/sis/fmradio_default/package.pkg
fmradio/sis/fmradio_default/stub.pkg
fmradio/sis/fmradio_default/stub.sis
fmradio/sis/fmradio_iad_update_test/package.pkg
group/bld.inf
layers.sysdef.xml
radio.pro
radioapp/bin/fmradio_en_US.qm
radioapp/buildflags.pri
radioapp/bwins/fmradioenginewrapperu.def
radioapp/bwins/fmradiopresetstorageu.def
radioapp/bwins/fmradiouiengineu.def
radioapp/bwins/fmradiowidgetsu.def
radioapp/eabi/fmradioenginewrapperu.def
radioapp/eabi/fmradiopresetstorageu.def
radioapp/eabi/fmradiouiengineu.def
radioapp/eabi/fmradiowidgetsu.def
radioapp/radioapp.pro
radioapp/radioapplication/inc/radioapplication.h
radioapp/radioapplication/inc/testwindow_win32.h
radioapp/radioapplication/radioapplication.pro
radioapp/radioapplication/resources/compile_ts.bat
radioapp/radioapplication/resources/fmradio.docml
radioapp/radioapplication/resources/fmradio.splashml
radioapp/radioapplication/resources/fmradio.ts
radioapp/radioapplication/resources/qtg_large_radio.svg
radioapp/radioapplication/resources/service_conf.xml
radioapp/radioapplication/src/main.cpp
radioapp/radioapplication/src/radioapplication.cpp
radioapp/radioapplication/src/testwindow_win32.cpp
radioapp/radioapplication/win32_stubs/qsysteminfo.h
radioapp/radioapplication/win32_stubs/win32_stubs.cpp
radioapp/radioapplication/win32_stubs/xqserviceprovider.h
radioapp/radioapplication/win32_stubs/xqserviceutil.h
radioapp/radioapplication/win32_stubs/xqsettingskey.h
radioapp/radioapplication/win32_stubs/xqsettingsmanager.h
radioapp/radioenginewrapper/inc/mradioenginehandlerobserver.h
radioapp/radioenginewrapper/inc/radiocontroleventlistener.h
radioapp/radioenginewrapper/inc/radioenginehandler.h
radioapp/radioenginewrapper/inc/radioenginewrapper.h
radioapp/radioenginewrapper/inc/radioenginewrapper_p.h
radioapp/radioenginewrapper/inc/radioenginewrapper_win32_p.h
radioapp/radioenginewrapper/inc/radioenginewrapperobserver.h
radioapp/radioenginewrapper/inc/radioenummapper.h
radioapp/radioenginewrapper/inc/radiordslistener.h
radioapp/radioenginewrapper/inc/radiosettings.h
radioapp/radioenginewrapper/inc/radiosettings_p.h
radioapp/radioenginewrapper/inc/radiosettingsif.h
radioapp/radioenginewrapper/inc/radiostationhandlerif.h
radioapp/radioenginewrapper/inc/radiowrapperexport.h
radioapp/radioenginewrapper/inc/settings.xml
radioapp/radioenginewrapper/inc/t_radiodataparser.h
radioapp/radioenginewrapper/radioenginewrapper.pro
radioapp/radioenginewrapper/src/radiocontroleventlistener.cpp
radioapp/radioenginewrapper/src/radioenginehandler.cpp
radioapp/radioenginewrapper/src/radioenginewrapper.cpp
radioapp/radioenginewrapper/src/radioenginewrapper_p.cpp
radioapp/radioenginewrapper/src/radioenginewrapper_win32.cpp
radioapp/radioenginewrapper/src/radioenginewrapper_win32_p.cpp
radioapp/radioenginewrapper/src/radioenginewrapperobserver.cpp
radioapp/radioenginewrapper/src/radiordslistener.cpp
radioapp/radioenginewrapper/src/radiosettings.cpp
radioapp/radioenginewrapper/src/radiosettings_p.cpp
radioapp/radioenginewrapper/src/radiosettings_win32_p.cpp
radioapp/radioenginewrapper/src/t_radiodataparser.cpp
radioapp/radioenginewrapper/stub/radioenginewrapper_stub.pro
radioapp/radioenginewrapper/tsrc/inc/mschedulerstartandstoptimerobserver.h
radioapp/radioenginewrapper/tsrc/inc/t_radioenginewrapper.h
radioapp/radioenginewrapper/tsrc/inc/t_schedulerstartandstoptimer.h
radioapp/radioenginewrapper/tsrc/inc/trace.h
radioapp/radioenginewrapper/tsrc/inc/traceconfiguration.hrh
radioapp/radioenginewrapper/tsrc/src/t_radioenginewrapper.cpp
radioapp/radioenginewrapper/tsrc/src/t_schedulerstartandstoptimer.cpp
radioapp/radioenginewrapper/tsrc/t_radioenginewrapper.pro
radioapp/radiopresetstorage/inc/radiopresetstorage.h
radioapp/radiopresetstorage/inc/radiopresetstorage_p.h
radioapp/radiopresetstorage/inc/radiopresetstorage_win32_p.h
radioapp/radiopresetstorage/inc/radiopresetstorageexport.h
radioapp/radiopresetstorage/inc/radiostationif.h
radioapp/radiopresetstorage/radiopresetstorage.pro
radioapp/radiopresetstorage/src/radiopresetstorage.cpp
radioapp/radiopresetstorage/src/radiopresetstorage_win32.cpp
radioapp/radiopresetstorage/tsrc/inc/t_radiopresetstorage.h
radioapp/radiopresetstorage/tsrc/src/t_radiopresetstorage.cpp
radioapp/radiopresetstorage/tsrc/t_radiopresetstorage.pro
radioapp/radiouiengine/inc/radiocontrolservice.h
radioapp/radiouiengine/inc/radiogenrelocalizer.h
radioapp/radiouiengine/inc/radiohistorydatabase.h
radioapp/radiouiengine/inc/radiohistoryitem.h
radioapp/radiouiengine/inc/radiohistoryitem_p.h
radioapp/radiouiengine/inc/radiohistorymodel.h
radioapp/radiouiengine/inc/radiohistorymodel_p.h
radioapp/radiouiengine/inc/radiomonitorservice.h
radioapp/radiouiengine/inc/radioscannerengine.h
radioapp/radiouiengine/inc/radioscannerengine_p.h
radioapp/radiouiengine/inc/radiostation.h
radioapp/radiouiengine/inc/radiostation_p.h
radioapp/radiouiengine/inc/radiostationmodel.h
radioapp/radiouiengine/inc/radiostationmodel_p.h
radioapp/radiouiengine/inc/radiouiengine.h
radioapp/radiouiengine/inc/radiouiengine_p.h
radioapp/radiouiengine/inc/radiouiengineexport.h
radioapp/radiouiengine/radiouiengine.pro
radioapp/radiouiengine/src/radiocontrolservice.cpp
radioapp/radiouiengine/src/radiohistorydatabase.cpp
radioapp/radiouiengine/src/radiohistoryitem.cpp
radioapp/radiouiengine/src/radiohistoryitem_p.cpp
radioapp/radiouiengine/src/radiohistorymodel.cpp
radioapp/radiouiengine/src/radiohistorymodel_p.cpp
radioapp/radiouiengine/src/radiomonitorservice.cpp
radioapp/radiouiengine/src/radioscannerengine.cpp
radioapp/radiouiengine/src/radioscannerengine_p.cpp
radioapp/radiouiengine/src/radiostation.cpp
radioapp/radiouiengine/src/radiostation_p.cpp
radioapp/radiouiengine/src/radiostationmodel.cpp
radioapp/radiouiengine/src/radiostationmodel_p.cpp
radioapp/radiouiengine/src/radiouiengine.cpp
radioapp/radiouiengine/src/radiouiengine_p.cpp
radioapp/radiouiengine/tsrc/inc/t_radiostation.h
radioapp/radiouiengine/tsrc/src/t_radiostation.cpp
radioapp/radiouiengine/tsrc/t_radiouiengine.pro
radioapp/radiowidgets/inc/radiocarouselanimator.h
radioapp/radiowidgets/inc/radiocarouselitem.h
radioapp/radiowidgets/inc/radiocarouselitemobserver.h
radioapp/radiowidgets/inc/radiofadinglabel.h
radioapp/radiowidgets/inc/radiofrequencyitem.h
radioapp/radiowidgets/inc/radiofrequencyscanner.h
radioapp/radiowidgets/inc/radiofrequencystrip.h
radioapp/radiowidgets/inc/radiofrequencystripbase.h
radioapp/radiowidgets/inc/radiofrequencystripdef.h
radioapp/radiowidgets/inc/radiohistoryview.h
radioapp/radiowidgets/inc/radiomainview.h
radioapp/radiowidgets/inc/radiostationcarousel.h
radioapp/radiowidgets/inc/radiostationsview.h
radioapp/radiowidgets/inc/radiostripbase.h
radioapp/radiowidgets/inc/radiouiloader.h
radioapp/radiowidgets/inc/radioutil.h
radioapp/radiowidgets/inc/radioviewbase.h
radioapp/radiowidgets/inc/radiowidgetsexport.h
radioapp/radiowidgets/inc/radiowindow.h
radioapp/radiowidgets/radiowidgets.pro
radioapp/radiowidgets/res/effects/fade_in.fxml
radioapp/radiowidgets/res/effects/fade_out.fxml
radioapp/radiowidgets/res/effects/slide_from_left.fxml
radioapp/radiowidgets/res/effects/slide_from_right.fxml
radioapp/radiowidgets/res/effects/slide_to_left.fxml
radioapp/radiowidgets/res/effects/slide_to_right.fxml
radioapp/radiowidgets/res/fmradioui.qrc
radioapp/radiowidgets/res/images/pri_small_star.svg
radioapp/radiowidgets/res/images/pri_small_star_inactive.svg
radioapp/radiowidgets/res/images/qtg_fr_lcd.svg
radioapp/radiowidgets/res/images/qtg_fr_lcd_overlay.svg
radioapp/radiowidgets/res/images/qtg_fr_tuner.svg
radioapp/radiowidgets/res/layout/historyview.docml
radioapp/radiowidgets/res/layout/mainview.docml
radioapp/radiowidgets/res/layout/radiocarouselitem.css
radioapp/radiowidgets/res/layout/radiocarouselitem.widgetml
radioapp/radiowidgets/res/layout/stationsview.docml
radioapp/radiowidgets/src/radiocarouselanimator.cpp
radioapp/radiowidgets/src/radiocarouselitem.cpp
radioapp/radiowidgets/src/radiofadinglabel.cpp
radioapp/radiowidgets/src/radiofrequencyitem.cpp
radioapp/radiowidgets/src/radiofrequencyscanner.cpp
radioapp/radiowidgets/src/radiofrequencystrip.cpp
radioapp/radiowidgets/src/radiofrequencystripbase.cpp
radioapp/radiowidgets/src/radiohistoryview.cpp
radioapp/radiowidgets/src/radiomainview.cpp
radioapp/radiowidgets/src/radiostationcarousel.cpp
radioapp/radiowidgets/src/radiostationsview.cpp
radioapp/radiowidgets/src/radiostripbase.cpp
radioapp/radiowidgets/src/radiouiloader.cpp
radioapp/radiowidgets/src/radioutil.cpp
radioapp/radiowidgets/src/radioviewbase.cpp
radioapp/radiowidgets/src/radiowindow.cpp
radioapp/radiowidgetsplugin/main.cpp
radioapp/radiowidgetsplugin/radiowidgetsplugin.pro
radioengine/engine/api/cradioengine.h
radioengine/engine/api/mradioengineinitializer.h
radioengine/engine/api/mradioengineobserver.h
radioengine/engine/api/mradiordsdataobserver.h
radioengine/engine/api/mradiordsreceiver.h
radioengine/engine/bwins/fmradioengineu.def
radioengine/engine/eabi/fmradioengineu.def
radioengine/engine/group/bld.inf
radioengine/engine/group/radioengine.mmp
radioengine/engine/inc/cradioengineimp.h
radioengine/engine/inc/cradionetworkinfolistener.h
radioengine/engine/inc/cradiordsreceiver.h
radioengine/engine/inc/cradiordsreceiverbase.h
radioengine/engine/src/cradioengine.cpp
radioengine/engine/src/cradioengineimp.cpp
radioengine/engine/src/cradionetworkinfolistener.cpp
radioengine/engine/src/cradiordsreceiver.cpp
radioengine/engine/src/cradiordsreceiverbase.cpp
radioengine/engine/stub/bwins/fmradioengine_stubu.def
radioengine/engine/stub/eabi/fmradioengine_stubu.def
radioengine/engine/stub/group/bld.inf
radioengine/engine/stub/group/radioengine_stub.mmp
radioengine/group/bld.inf
radioengine/group/buildflags.hrh
radioengine/settings/api/cradioregion.h
radioengine/settings/api/cradiosettings.h
radioengine/settings/api/mradioapplicationsettings.h
radioengine/settings/api/mradioenginesettings.h
radioengine/settings/api/mradiosettingsobserver.h
radioengine/settings/api/mradiosettingssetter.h
radioengine/settings/bwins/fmradioenginesettingsu.def
radioengine/settings/cenrep/2002FF52.txt
radioengine/settings/cenrep/keys_radioengine.xls
radioengine/settings/cenrep/radio.confml
radioengine/settings/cenrep/radio_2002FF52.crml
radioengine/settings/data/fmradioenginesettings.rss
radioengine/settings/eabi/fmradioenginesettingsu.def
radioengine/settings/group/backup_registration.xml
radioengine/settings/group/bld.inf
radioengine/settings/group/radioenginesettings.mmp
radioengine/settings/inc/cradioapplicationsettings.h
radioengine/settings/inc/cradioenginesettings.h
radioengine/settings/inc/cradiosettingsimp.h
radioengine/settings/src/cradioapplicationsettings.cpp
radioengine/settings/src/cradioenginesettings.cpp
radioengine/settings/src/cradioregion.cpp
radioengine/settings/src/cradiosettings.cpp
radioengine/settings/src/cradiosettingsimp.cpp
radioengine/settings/stub/bwins/fmradioenginesettings_stubu.def
radioengine/settings/stub/eabi/fmradioenginesettings_stubu.def
radioengine/settings/stub/group/bld.inf
radioengine/settings/stub/group/radioenginesettings_stub.mmp
radioengine/settings/tsrc/bwins/SettingsTestModuleu.def
radioengine/settings/tsrc/cenrep/2002FF52.txt
radioengine/settings/tsrc/cenrep/2002FF52_orig.txt
radioengine/settings/tsrc/cenrep/radio.confml
radioengine/settings/tsrc/cenrep/radio_2002FF52.crml
radioengine/settings/tsrc/conf/2002FF52.txt
radioengine/settings/tsrc/conf/SettingsTestModule.cfg
radioengine/settings/tsrc/conf/atsconf.txt
radioengine/settings/tsrc/conf/radio.confml
radioengine/settings/tsrc/conf/radio_2002FF52.crml
radioengine/settings/tsrc/custom/postrun_custom.xml
radioengine/settings/tsrc/custom/prerun_custom.xml
radioengine/settings/tsrc/eabi/SettingsTestModuleu.def
radioengine/settings/tsrc/group/RestoreOrigCenrep.cmd
radioengine/settings/tsrc/group/SettingsTestModule.mmp
radioengine/settings/tsrc/group/SettingsTestModule.pkg
radioengine/settings/tsrc/group/SettingsTestModule_DoxyFile.txt
radioengine/settings/tsrc/group/SettingsTestModule_nrm.mmp
radioengine/settings/tsrc/group/TestEnvInit.cmd
radioengine/settings/tsrc/group/bld.inf
radioengine/settings/tsrc/inc/SettingsTestModule.h
radioengine/settings/tsrc/inc/trace.h
radioengine/settings/tsrc/inc/traceconfiguration.hrh
radioengine/settings/tsrc/init/TestFramework.ini
radioengine/settings/tsrc/rom/settingstestmodule.iby
radioengine/settings/tsrc/src/SettingsTestModule.cpp
radioengine/settings/tsrc/src/SettingsTestModuleBlocks.cpp
radioengine/utils/api/cradioaudiorouter.h
radioengine/utils/api/cradioenginelogger.h
radioengine/utils/api/cradioremcontarget.h
radioengine/utils/api/cradioroutableaudio.h
radioengine/utils/api/cradiosystemeventcollector.h
radioengine/utils/api/mradioaudioroutingobserver.h
radioengine/utils/api/mradiocontroleventobserver.h
radioengine/utils/api/mradioenginelogger.h
radioengine/utils/api/mradiosystemeventobserver.h
radioengine/utils/api/radioengine.hrh
radioengine/utils/api/radioenginedef.h
radioengine/utils/api/radioengineutils.h
radioengine/utils/api/radiointernalcrkeys.h
radioengine/utils/api/radiouid.hrh
radioengine/utils/bwins/fmradioengineutilsu.def
radioengine/utils/eabi/fmradioengineutilsu.def
radioengine/utils/group/bld.inf
radioengine/utils/group/radioengineutils.mmp
radioengine/utils/inc/cradioaccessoryobserver.h
radioengine/utils/inc/cradioenginetls.h
radioengine/utils/inc/cradiopropertyobserver.h
radioengine/utils/inc/cradioremcontargetimp.h
radioengine/utils/inc/cradiosystemeventcollectorimp.h
radioengine/utils/inc/cradiosystemeventdetector.h
radioengine/utils/inc/mradioheadseteventobserver.h
radioengine/utils/inc/mradiosystemeventdetectorobserver.h
radioengine/utils/src/cradioaccessoryobserver.cpp
radioengine/utils/src/cradioaudiorouter.cpp
radioengine/utils/src/cradioenginelogger.cpp
radioengine/utils/src/cradioenginetls.cpp
radioengine/utils/src/cradiopropertyobserver.cpp
radioengine/utils/src/cradioremcontarget.cpp
radioengine/utils/src/cradioremcontargetimp.cpp
radioengine/utils/src/cradioroutableaudio.cpp
radioengine/utils/src/cradiosystemeventcollector.cpp
radioengine/utils/src/cradiosystemeventcollectorimp.cpp
radioengine/utils/src/cradiosystemeventdetector.cpp
radioengine/utils/src/radioengineutils.cpp
radioengine/utils/stub/bwins/fmradioengineutils_stubu.def
radioengine/utils/stub/eabi/fmradioengineutils_stubu.def
radioengine/utils/stub/group/bld.inf
radioengine/utils/stub/group/radioengineutils_stub.mmp
radioengine/utils/stub/inc/cradioaccessoryobserver_stub.h
radioengine/utils/stub/inc/cradioremcontargetimp_stub.h
radioengine/utils/stub/src/cradioaccessoryobserver_stub.cpp
radioengine/utils/stub/src/cradioremcontargetimp_stub.cpp
radiohswidget/buildflags.pri
radiohswidget/inc/radiohswidget.h
radiohswidget/inc/radiohswidgetplugin.h
radiohswidget/inc/radiohswidgetprofilereader.h
radiohswidget/inc/radiohswidgetradioserviceclient.h
radiohswidget/locales/compile_ts.bat
radiohswidget/locales/fmradiohswidget.qm
radiohswidget/locales/fmradiohswidget.ts
radiohswidget/qmakepluginstubs/fmradiohswidget.qtplugin
radiohswidget/radiohswidget.pro
radiohswidget/radiohswidget_exports_to_rom.pri
radiohswidget/resource/fmradiohswidget.docml
radiohswidget/resource/fmradiohswidget.manifest
radiohswidget/resource/fmradiohswidget.xml
radiohswidget/resources.qrc
radiohswidget/rom/fmradiohswidget.iby
radiohswidget/rom/fmradiohswidget_resources.iby
radiohswidget/rom/fmradiohswidget_stub.pkg
radiohswidget/sis/fmradiohswidget.bat
radiohswidget/sis/fmradiohswidget.pkg
radiohswidget/src/radiohswidget.cpp
radiohswidget/src/radiohswidgetplugin.cpp
radiohswidget/src/radiohswidgetprofilereader.cpp
radiohswidget/src/radiohswidgetradioserviceclient.cpp
radiohswidget/stub/xqaiwinterfacedescriptor.cpp
radiohswidget/stub/xqaiwinterfacedescriptor.h
radiohswidget/stub/xqaiwrequest.cpp
radiohswidget/stub/xqaiwrequest.h
radiohswidget/stub/xqapplicationmanager.cpp
radiohswidget/stub/xqapplicationmanager.h
radiohswidget/stub/xqrequestinfo.cpp
radiohswidget/stub/xqrequestinfo.h
radiohswidget/stub/xqsettingskey.cpp
radiohswidget/stub/xqsettingskey.h
radiohswidget/stub/xqsettingsmanager.cpp
radiohswidget/stub/xqsettingsmanager.h
radiohswidget/tsrc/buildflags.pri
radiohswidget/tsrc/inc/radiohswidget.h
radiohswidget/tsrc/inc/t_radiohswidget.h
radiohswidget/tsrc/src/radiohswidget.cpp
radiohswidget/tsrc/src/t_radiohswidget.cpp
radiohswidget/tsrc/t_radiohswidget.pro
rom/bld.inf
rom/fmradio.iby
rom/fmradio_resources.iby
rom/fmradio_stub.pkg
sysdef_1_4_0.dtd
sysdef_1_5_1.dtd
tsrc/bld.inf
--- a/common/radio_global.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,236 +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 RADIO_GLOBAL_H_
-#define RADIO_GLOBAL_H_
-
-// System includes
-#include <QtGlobal>
-#include <qnamespace.h>
-
-// Constants
-
-/**
- * Radio frequency multiplier
- */
-const int FREQUENCY_MULTIPLIER = 1000000;
-
-/**
- * Desired amount of steps in the volume control in the UI
- */
-const int MAXIMUM_VOLUME_LEVEL = 20;
-
-/**
- * Default volume level that is used when no previous setting exists
- */
-const int DEFAULT_VOLUME_LEVEL = 4;
-
-/**
- * UIDs for checking the offline mode
- * Values copied from CoreApplicationUIsSDKCRKeys.h
- */
-const long int CENREP_CORE_APPLICATION_UIS = 0x101F876C;
-const unsigned long int ID_NETWORK_CONNECTION_ALLOWED = 0x00000001;
-enum NetworkConnectionAllowed { NetworkNotAllowed = 0, NetworkAllowed };
-
-/**
- * Roles used when interacting with the radio station model
- */
-namespace RadioRole
-{
-    enum Role
-    {
-        RadioStationRole = Qt::UserRole + 1,
-        ToggleFavoriteRole,
-        IsFavoriteRole
-    };
-}
-
-/**
- * Radio Text Plus tag ids
- */
-namespace RtPlus
-{
-    enum Tag
-    {
-        Dummy = 0,
-        Title = 1,
-        Artist = 4,
-        Band = 9,
-        Homepage = 39
-    };
-}
-
-namespace GenreTarget
-{
-    enum Target
-    {
-        Carousel,
-        StationsList,
-        HomeScreen
-    };
-}
-
-namespace Seek
-{
-    enum Direction
-    {
-        Down,
-        Up
-    };
-
-    enum State
-    {
-        NotSeeking,
-        SeekingUp,
-        SeekingDown
-    };
-}
-
-namespace Scan
-{
-    enum Status
-    {
-        NotScanning,
-        ScanningInMainView,
-        ScanningInStationsView
-    };
-}
-
-namespace StationSkip
-{
-    enum Mode
-    {
-        Previous,
-        Next,
-        PreviousFavorite,
-        NextFavorite
-    };
-}
-
-namespace TuneReason
-{
-    enum Reason
-    {
-        Unspecified,
-        FrequencyStrip,
-        ManualSeekUpdate,
-        ManualSeekTune,
-        StationCarousel,
-        StationsList,
-        Skip,
-        Seek,
-        StationScanInitialization,
-        StationScan,
-        StationScanFinalize,
-        StationScanNoStationsFound,
-        SkipFromEngine,
-        SkipFromWidget
-    };
-}
-
-namespace RadioRegion
-{
-    enum Region
-    {
-        None = -1,
-        Default,
-        Japan,
-        America,
-        Poland
-    };
-}
-
-namespace GenreEurope
-{
-    enum Europe
-    {
-        RdsNone,
-        RdsNews,
-        RdsCurrentAffairs,
-        RdsInformation,
-        RdsSport,
-        RdsEducation,
-        RdsDrama,
-        RdsCulture,
-        RdsScience,
-        RdsVariedSpeech,
-        RdsPopMusic,
-        RdsRockMusic,
-        RdsEasyListening,
-        RdsLightClassical,
-        RdsSeriousClassical,
-        RdsOtherMusic,
-        RdsWeather,
-        RdsFinance,
-        RdsChildrensProgrammes,
-        RdsSocialAffairs,
-        RdsReligion,
-        RdsPhoneIn,
-        RdsTravel,
-        RdsLeisure,
-        RdsJazzMusic,
-        RdsCountryMusic,
-        RdsNationalMusic,
-        RdsOldiesMusic,
-        RdsFolkMusic,
-        RdsDocumentary,
-        RdsAlarmTest,
-        RdsAlarm
-    };
-}
-
-namespace GenreAmerica
-{
-    enum America
-    {
-        RbdsNone,
-        RbdsNews,
-        RbdsInformation,
-        RbdsSports,
-        RbdsTalk,
-        RbdsRock,
-        RbdsClassicRock,
-        RbdsAdultHits,
-        RbdsSoftRock,
-        RbdsTop40,
-        RbdsCountry,
-        RbdsOldies,
-        RbdsSoft,
-        RbdsNostalgia,
-        RbdsJazz,
-        RbdsClassical,
-        RbdsRhythmAndBlues,
-        RbdsSoftRhythmAndBlues,
-        RbdsLanguage,
-        RbdsReligiousMusic,
-        RbdsReligiousTalk,
-        RbdsPersonality,
-        RbdsPublic,
-        RbdsCollege,
-        RbdsUnassigned1,
-        RbdsUnassigned2,
-        RbdsUnassigned3,
-        RbdsUnassigned4,
-        RbdsUnassigned5,
-        RbdsWeather,
-        RbdsEmergencyTest,
-        RbdsEmergency
-    };
-}
-
-#endif // RADIO_GLOBAL_H_
--- a/common/radiologger.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,204 +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:
-*
-*/
-
-// System includes
-#include <QDebug>
-
-// User includes
-#include "radiologger.h"
-
-/*!
- *
- */
-void RadioLogger::initCombinedLogger()
-{
-#if defined LOGGING_ENABLED && defined COMBINE_WITH_ENGINE_LOGGER && !defined BUILD_WIN32
-    TRAP_IGNORE( RadioEngineUtils::InitializeL() );
-    if ( !MRadioEngineLogger::Logger() ) {
-        qDebug() << "FMRadioUi: Cannot combine logs with engine. Engine logger not active";
-    }
-#endif // LOGGING_ENABLED
-}
-
-/*!
- *
- */
-void RadioLogger::releaseCombinedLogger()
-{
-#if defined LOGGING_ENABLED && defined COMBINE_WITH_ENGINE_LOGGER && !defined BUILD_WIN32
-    RadioEngineUtils::Release();
-#endif // LOGGING_ENABLED
-}
-
-/*!
- *    enum Mode { Normal, MethodEnter, MethodExit, DecIndent };
- */
-void RadioLogger::logMsg( const char* msg, Mode mode )
-{
-    Q_UNUSED( msg );
-    Q_UNUSED( mode );
-#if defined LOGGING_ENABLED && defined COMBINE_WITH_ENGINE_LOGGER && !defined BUILD_WIN32
-    MRadioEngineLogger* logger = MRadioEngineLogger::Logger();
-    if ( logger ) {
-        if ( mode == RadioLogger::Normal ) {
-            logger->AddIndent(KMarkerUi()).Add( msg ).Commit();
-        } else if ( mode == RadioLogger::MethodEnter ) {
-            logger->AddIndentClear( KMarkerUi() ).Add( msg ).Commit();
-            logger->IncIndent();
-        } else if ( mode == RadioLogger::MethodExit ) {
-            logger->DecIndent();
-            logger->AddIndentClear( KMarkerUi() ).Add( msg ).Commit();
-        } else if ( mode == RadioLogger::DecIndent ) {
-            logger->DecIndent();
-        } else {}
-    }
-#endif // LOGGING_ENABLED
-}
-
-
-#ifdef LOGGING_ENABLED
-
-#include <QString>
-#include <QFile>
-#include <QTextStream>
-#include <QDateTime>
-
-#ifdef TRACE_TO_FILE
-    QFile mDebugFile;
-    bool mFilterByLogMarker = false;
-#endif
-
-const char* KLogEnter = "\\ %s";
-const char* KLogExit = "/ %s";
-const char* KLogExitRet = "/ %s, Returning %s";
-const char* KLogExitException = "/ %s, Exception raised";
-const char* KLogLine = "| ";
-
-/*!
- *
- */
-#if defined(__WINS__)
-static QString formatString( const char* format, long val )
-{
-    if ( strcmp( format, "" ) == 0 ) {
-        return "";
-    }
-    QString string;
-    string.sprintf( format, val );
-    return string;
-}
-#endif
-
-/*!
- *
- */
-MethodLogger::MethodLogger( const char* function, const char* format ) :
-    mFunction( function ),
-    mFormat( format )
-{
-    QString msg;
-    msg.sprintf( KLogEnter, mFunction );
-    WRITELOG_METHOD_ENTER( msg );
-}
-
-/*!
- *
- */
-MethodLogger::~MethodLogger()
-{
-    if ( std::uncaught_exception() ) {
-        QString msg;
-        msg.sprintf( KLogExitException, mFunction );
-        WRITELOG_METHOD_EXIT( msg );
-    } else {
-        QString msg;
-        if ( strlen( mFormat ) > 0 ) {
-            #if defined(__WINS__)
-
-                long retVal = 0;
-                _asm( mov retVal, ebx );
-                msg.sprintf( KLogExitRet, mFunction, formatString( mFormat, retVal ) );
-                WRITELOG_METHOD_EXIT( msg );
-
-            #else
-                msg.sprintf( KLogExit, mFunction );
-                WRITELOG_METHOD_EXIT( msg );
-            #endif
-        } else {
-            msg.sprintf( KLogExit, mFunction );
-            WRITELOG_METHOD_EXIT( msg );
-        }
-    }
-}
-#else
-
-MethodLogger::MethodLogger( const char*, const char* )
-{
-}
-        
-MethodLogger::~MethodLogger()
-{
-}
-
-#endif // LOGGING_ENABLED
-
-
-#ifdef TRACE_TO_FILE
-
-/*!
- *
- */
-void FileLogger::installMessageHandler( const QString& fileName, bool filterByMarker )
-{
-    mDebugFile.setFileName( fileName );
-    mFilterByLogMarker = filterByMarker;
-
-    mDebugFile.open( QIODevice::Text | QIODevice::WriteOnly );
-
-    if ( mDebugFile.isOpen() ) {
-        qInstallMsgHandler( FileLogger::handleMessage );
-    }
-}
-
-/*!
- *
- */
-void FileLogger::uninstallMessageHandler()
-{
-    if ( mDebugFile.isOpen() ) {
-        qInstallMsgHandler( 0 );
-        mDebugFile.close();
-    }
-}
-
-/*!
- *
- */
-void FileLogger::handleMessage( QtMsgType type, const char* msg )
-{
-    QTextStream debugStream( &mDebugFile );
-    QDateTime dateTime( QDateTime::currentDateTime() );
-
-    if ( type == QtDebugMsg ) {
-        QString message( msg );
-        if ( mFilterByLogMarker && message.contains( QString( LOGMARKER ) ) )
-        {
-            debugStream << dateTime.toString("yyyy-MM-dd hh:mm:ss.zzz") << " : " << message << endl;
-        }
-    }
-}
-#endif // TRACE_TO_FILE
--- a/common/radiologger.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,363 +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 _RADIOLOGGER_H_
-#define _RADIOLOGGER_H_
-
-// System includes
-#include <QObject>
-
-/**
- * Logging level macro definitions
- * Level 1 - No level macro needed. The trace is shown when logging is on.
- * Level 2 - Wrap log line with LEVEL2 macro. Traces of level 1 and 2 are shown.
- * Level 3 - Wrap log line with LEVEL3 macro. Traces of level 1, 2 and 3 are shown.
- */
-#if LOGGING_LEVEL == 2
-#   define LEVEL2( expr ) expr
-#   define LEVEL3( expr )
-#elif LOGGING_LEVEL == 3
-#   define LEVEL2( expr ) expr
-#   define LEVEL3( expr ) expr
-#else
-#   define LEVEL2( expr )
-#   define LEVEL3( expr )
-#endif
-
-#if LOGGED_COMPONENT == 2
-#   define LOGMARKER "FMRadioHsWidget:"
-#   define WRAPPER_DLL_EXPORT
-#else
-#   define LOGMARKER "FMRadio:"
-#   ifdef BUILD_WRAPPER_DLL
-#       define WRAPPER_DLL_EXPORT Q_DECL_EXPORT
-#   else
-#       define WRAPPER_DLL_EXPORT Q_DECL_IMPORT
-#   endif
-#endif
-
-class WRAPPER_DLL_EXPORT RadioLogger
-{
-public:
-
-    enum Mode { Normal, MethodEnter, MethodExit, DecIndent };
-
-    static void initCombinedLogger();
-    static void releaseCombinedLogger();
-
-    static void logMsg( const char* msg, Mode mode = Normal );
-
-private:
-    RadioLogger();
-    ~RadioLogger();
-};
-
-// ============================================================================
-// START TIMESTAMP LOGGING
-// ============================================================================
-
-#ifdef TIMESTAMP_LOGGING_ENABLED
-
-#include <QTime>
-#include <QDebug>
-
-/**
- * Timestamp logging macro.
- * When the macro is defined, timestamp logging is on
- *
- * Example. These lines in the code...
- *  LOG_TIMESTAMP( "Start operation" );
- *  ...
- *  LOG_TIMESTAMP( "End operation" );
- *
- * ... print the following log lines
- *  FMRadio: Start operation "14:13:09.042"
- *  FMRadio: End operation "14:13:09.250"
- */
-//#define LOG_TIMESTAMP(comment) do{ qDebug() << LOGMARKER << comment << QTime::currentTime().toString("hh:mm:ss.zzz"); }while(0)
-#define LOG_TIMESTAMP(comment) LOG_FORMAT( comment ## " %s", GETSTRING( QTime::currentTime().toString("hh:mm:ss.zzz") ) )
-
-#else
-
-#define LOG_TIMESTAMP(comment)
-
-#endif // TIMESTAMP_LOGGING_ENABLED
-
-// ============================================================================
-// END TIMESTAMP LOGGING
-// ============================================================================
-
-// ============================================================================
-// START FULL LOGGING
-// ============================================================================
-
-#ifdef LOGGING_ENABLED
-
-#include <QtGlobal>
-#include <QDebug>
-
-// Macro to hide a function variable that is used only when debugging is enabled.
-// Expands to the variable name when debugging is enabled and to nothing when it is not
-#if LOGGING_LEVEL == 2
-#   define DEBUGVAR( var ) var
-#   define DEBUGVAR2( var ) var
-#   define DEBUGVAR3( var )
-#elif LOGGING_LEVEL == 3
-#   define DEBUGVAR( var ) var
-#   define DEBUGVAR2( var ) var
-#   define DEBUGVAR3( var ) var
-#else
-#   define DEBUGVAR( var ) var
-#   define DEBUGVAR2( var )
-#   define DEBUGVAR3( var )
-#endif
-
-// UI logs can be combined with engine logs by making the UI feed its log prints into
-// the engine logger. This requires that we initialize the radio engine utils right here
-// because the engine won't start up until much later. This is a bit ugly since the macros
-// call Symbian code directly, but it was considered to be worth it to see UI and engine
-// traces in the same file.
-#if defined COMBINE_WITH_ENGINE_LOGGER && defined LOGGING_ENABLED && !defined BUILD_WIN32
-#   include "../../../radioengine/utils/api/mradioenginelogger.h"
-#   include "../../../radioengine/utils/api/radioengineutils.h"
-#   define WRITELOG(msg) RadioLogger::logMsg( msg );
-#   define WRITELOG_METHOD_ENTER(msg) RadioLogger::logMsg( GETSTRING( msg ), RadioLogger::MethodEnter );
-#   define WRITELOG_METHOD_EXIT(msg) RadioLogger::logMsg( GETSTRING( msg ), RadioLogger::MethodExit );
-#   define LOGGER_DEC_INDENT RadioLogger::logMsg( "", RadioLogger::DecIndent );
-#   define WRITELOG_GETSTRING(msg) WRITELOG( GETSTRING( msg ) )
-#   define INIT_COMBINED_LOGGER RadioLogger::initCombinedLogger();
-#   define RELEASE_COMBINED_LOGGER RadioLogger::releaseCombinedLogger();
-#else
-#   define WRITELOG(msg) qDebug() << LOGMARKER << msg;
-#   define WRITELOG_METHOD_ENTER(msg) WRITELOG(msg)
-#   define WRITELOG_METHOD_EXIT(msg) WRITELOG(msg)
-#   define WRITELOG_GETSTRING(msg) WRITELOG(msg)
-#   define LOGGER_INC_INDENT
-#   define LOGGER_DEC_INDENT
-#   define INIT_COMBINED_LOGGER
-#   define RELEASE_COMBINED_LOGGER
-#endif
-
-// Macro that simply logs a string
-// Example:
-// LOG( "This is a test" );
-#define LOG(string) do{ WRITELOG( string ) }while(0)
-
-// Helper macro to get a const char* out of a QString so that it can be logged. Can be used with LOG_FORMAT()
-#define GETSTRING(qstring) qstring.toAscii().constData()
-
-// Macro that logs a string with multiple parameters
-// Examples:
-// LOG_FORMAT( "This is an integer %d, and this is a float with two digits %.2f", 42, 3.14 );
-// LOG_FORMAT( "This is a QString %s", GETSTRING(someQString) );
-#define LOG_FORMAT(fmt,args...) do{ QString tmp; WRITELOG_GETSTRING( tmp.sprintf(fmt,args) ) }while(0)
-
-// Macro that logs function enter, exit and exception
-// Example (Simply put it in the beginning of a function):
-// LOG_METHOD;
-// Output:
-// -> SomeFunction(int,const char*)
-// <- SomeFunction(int,const char*)
-// <- SomeFunction(int,const char*): Exception raised!
-#define LOG_METHOD MethodLogger ___methodLogger( __PRETTY_FUNCTION__, "" )
-
-// Same as the previous function logging macro with the addition of logging the return value
-// Note! The return value can only be retrieved in the emulator.
-// Example (Simply put it in the beginning of a function):
-// LOG_METHOD_RET( "%d" );
-// Output:
-// -> SomeFunction(int,const char*)
-// <- SomeFunction(int,const char*) returning 42
-#define LOG_METHOD_RET(fmt) MethodLogger ___methodLogger( __PRETTY_FUNCTION__, fmt )
-
-// Logs function enter but does not log exit or leave. This is meant to be lighter than LOG_METHOD macro
-#define LOG_METHOD_ENTER LOG_FORMAT( "Enter: %s", __PRETTY_FUNCTION__ )
-
-// Assert macro for logging. If the condition is false, the expression is performed
-// Example:
-// LOG_ASSERT( thisMustBeTrue, LOG_FORMAT( "OMG! That was not true: %d", thisMustBeTrue ) );
-#define LOG_ASSERT(cond,expr) do{ if (!cond) { expr; } }while(0)
-
-// Macro to log slot function caller by its class name.
-#define LOG_SLOT_CALLER do { \
-        QObject* caller = sender(); \
-        if ( caller ) { \
-            LOG_FORMAT( "SLOT %s called by %s. Objectname: %s", __PRETTY_FUNCTION__, \
-                caller->metaObject()->className(), GETSTRING( caller->objectName() ) ); \
-        } else { \
-            LOG_FORMAT( "SLOT %s called as regular function. ", __PRETTY_FUNCTION__ ); \
-        } \
-    } while (0)
-
-// Class declaration
-class WRAPPER_DLL_EXPORT MethodLogger
-{
-public:
-
-    MethodLogger( const char* function, const char* format );
-    ~MethodLogger();
-
-private:
-
-    const char* mFunction;
-    const char* mFormat;
-
-};
-
-#else // LOGGING_ENABLED
-
-#   define LOG(string)
-#   define GETSTRING(qstring)
-#   define LOG_FORMAT(fmt,args...)
-#   define LOG_METHOD
-#   define LOG_METHOD_RET(fmt)
-#   define LOG_METHOD_ENTER
-#   define LOG_ASSERT(cond,expr)
-#   define DEBUGVAR(a)
-#   define DEBUGVAR2(a)
-#   define DEBUGVAR3(a)
-#   define LOG_SLOT_CALLER
-#   define INIT_COMBINED_LOGGER
-#   define RELEASE_COMBINED_LOGGER
-
-
-// Dummy class
-class WRAPPER_DLL_EXPORT MethodLogger
-{
-public:
-    MethodLogger( const char*, const char* );
-    ~MethodLogger();
-};
-
-#endif // LOGGING_ENABLED
-
-#ifdef TRACE_TO_FILE
-
-#   define INSTALL_MESSAGE_HANDLER FileLogger::installMessageHandler(QString(TRACE_OUTPUT_FILE), FILTER_BY_LOGMARKER);
-#   define UNINSTALL_MESSAGE_HANDLER FileLogger::uninstallMessageHandler();
-
-// Class declaration
-class WRAPPER_DLL_EXPORT FileLogger
-{
-public:
-
-    static void installMessageHandler( const QString& fileName, bool filterByMarker = true );
-    static void uninstallMessageHandler();
-
-private:
-
-    static void handleMessage( QtMsgType type, const char* msg );
-
-};
-
-#else
-#   define INSTALL_MESSAGE_HANDLER
-#   define UNINSTALL_MESSAGE_HANDLER
-#endif // TRACE_TO_FILE
-
-// ============================================================================
-// END FULL LOGGING
-// ============================================================================
-
-class Radio
-{
-    Radio();
-    ~Radio();
-public:
-
-    // ============================================================================
-    // SIGNAL/SLOT CONNECT CHECKER
-    // ============================================================================
-    static bool connect( const QObject* sender, const char* signal,
-                         const QObject* receiver, const char* member,
-                         Qt::ConnectionType type = Qt::AutoConnection )
-    {
-        bool connected = QObject::connect( sender, signal, receiver, member, type );
-
-        #ifdef CONNECT_TEST_MODE
-
-        if ( !connected ) {
-            LOG( "Failed to make a signal-slot connection!" );
-            LOG_FORMAT( "sender: %s", sender->metaObject()->className() );
-            LOG_FORMAT( "signal: %s", signal );
-            LOG_FORMAT( "receiver: %s", receiver->metaObject()->className() );
-            LOG_FORMAT( "slot/signal: %s", signal );
-
-            #if CONNECT_TEST_MODE == 2
-                Q_ASSERT( false );
-            #endif
-
-            // ----------------------------------------------------------------
-            // SIGNAL-SLOT CONNECT FAILED!
-            // ----------------------------------------------------------------
-        }
-
-        #endif
-
-        return connected;
-    }
-
-    // ============================================================================
-    // SIGNAL/SLOT DISCONNECT CHECKER
-    // ============================================================================
-    static bool disconnect( const QObject* sender, const char* signal,
-                            const QObject* receiver, const char* member )
-    {
-        bool disconnected = QObject::disconnect( sender, signal, receiver, member );
-
-        #ifdef CONNECT_TEST_MODE
-
-        if ( !disconnected ) {
-            LOG( "Failed to disconnect a signal-slot connection!" );
-            LOG_FORMAT( "sender: %s", sender->metaObject()->className() );
-            LOG_FORMAT( "signal: %s", signal );
-            LOG_FORMAT( "receiver: %s", receiver->metaObject()->className() );
-            LOG_FORMAT( "slot/signal: %s", signal );
-
-            #if CONNECT_TEST_MODE == 2
-                Q_ASSERT( false );
-            #endif
-
-            // ----------------------------------------------------------------
-            // SIGNAL-SLOT DISCONNECT FAILED!
-            // ----------------------------------------------------------------
-        }
-
-        #endif
-
-        return disconnected;
-    }
-};
-
-#ifdef ENABLE_ASSERTS
-
-    #define RADIO_ASSERT(cond,where,what) Q_ASSERT_X(cond,where,what)
-
-#else
-#   ifdef LOGGING_ENABLED
-#       define RADIO_ASSERT(cond,where,what) \
-            do { \
-                if ( !cond ) { \
-                    LOG_FORMAT( "ASSERT Failed! %s, %s", where, what ); \
-                } \
-            } while ( false )
-#   else
-#       define RADIO_ASSERT(cond,where,what)
-#   endif // LOGGING_ENABLED
-#endif // ENABLE_ASSERTS
-
-#endif // _RADIOLOGGER_H_
--- a/common/radionotificationdata.h	Tue Aug 31 15:15:02 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 RADIONOTIFICATIONDATA_H
-#define RADIONOTIFICATIONDATA_H
-
-// System includes
-#include <QVariant>
-
-class RadioNotificationData
-{
-public:
-
-    RadioNotificationData() : mType( 0 ) {}
-    RadioNotificationData( int type, const QVariant& data ) :
-        mType( type ),
-        mData( data )
-    {}
-
-    virtual ~RadioNotificationData() {}
-
-    #ifndef BUILD_WIN32
-    template <typename Stream> void serialize( Stream& stream ) const;
-    template <typename Stream> void deserialize( Stream& stream );
-    #endif // BUILD_WIN32
-
-    int         mType;
-    QVariant    mData;
-
-};
-
-#ifndef BUILD_WIN32
-
-Q_DECLARE_USER_METATYPE(RadioNotificationData)
-
-template <typename Stream> void RadioNotificationData::serialize( Stream& stream ) const
-{
-    stream << mType;
-    stream << mData;
-}
-
-template <typename Stream> void RadioNotificationData::deserialize( Stream& stream )
-{
-    stream >> mType;
-    stream >> mData;
-}
-
-Q_IMPLEMENT_USER_METATYPE(RadioNotificationData)
-
-#else
-
-Q_DECLARE_METATYPE( RadioNotificationData )
-
-#endif // BUILD_WIN32
-#endif // RADIONOTIFICATIONDATA_H
--- a/common/radioservicedef.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef RADIOSERVICES_H
-#define RADIOSERVICES_H
-
-#include <QLatin1String>
-
-static const QLatin1String RADIO_SERVICE( "fmradio" );
-static const QLatin1String RADIO_CONTROL_SERVICE( "com.nokia.symbian.IRadioControl" );
-static const QLatin1String RADIO_CONTROL_SERVICE_OPERATION( "command(int)" );
-static const QLatin1String RADIO_MONITOR_SERVICE( "com.nokia.symbian.IRadioMonitor" );
-static const QLatin1String RADIO_MONITOR_SERVICE_OPERATION( "requestNotifications()" );
-static const QLatin1String RADIO_MONITOR_SERVICE_REFRESH_OPERATION( "requestAllData()" );
-
-
-const long KRadioPSUid = 0x101FF976;
-const unsigned long KRadioStartupKey = 0x00000014;
-
-const quint32 NOKIA_VENDORID = VID_DEFAULT;
-
-namespace RadioServiceCommand
-{
-    enum CommandId
-    {
-        PowerOn,
-        PowerOff,
-        Previous,
-        Next,
-        SeekUp,
-        SeekDown,
-        Foreground,
-        Background,
-        Mute,
-        UnMute
-    };
-}
-
-namespace RadioServiceNotification
-{
-    enum Type {
-        FavoriteCount = 1,
-        CurrentIsFavorite,
-        RadioStatus,
-        Frequency,
-        Name,
-        Genre,
-        RadioText,
-        DynamicPS
-    };
-}
-
-namespace RadioStatus
-{
-    enum Status {
-        UnSpecified,
-        Playing,
-        Muted,
-        Seeking,
-        NoAntenna,
-        PoweringOff
-    };
-}
-
-#endif // RADIOSERVICES_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/activeidleengine/bwins/fmradioactiveidleengine200u.def	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,19 @@
+EXPORTS
+	?FrequencyDecimalCount@CFMRadioActiveIdleEngine@@QBE?AW4TFMRadioPSFrequencyDecimalCount@@XZ @ 1 NONAME ; enum TFMRadioPSFrequencyDecimalCount CFMRadioActiveIdleEngine::FrequencyDecimalCount(void) const
+	?SetMuteState@CFMRadioActiveIdleEngine@@QBEXW4TFMRadioPSRadioMuteState@@@Z @ 2 NONAME ; void CFMRadioActiveIdleEngine::SetMuteState(enum TFMRadioPSRadioMuteState) const
+	?Channel@CFMRadioActiveIdleEngine@@QBEHXZ @ 3 NONAME ; int CFMRadioActiveIdleEngine::Channel(void) const
+	??1CFMRadioActiveIdleEngine@@UAE@XZ @ 4 NONAME ; CFMRadioActiveIdleEngine::~CFMRadioActiveIdleEngine(void)
+	?Cancel@CFMRadioActiveIdleEngine@@QAEXXZ @ 5 NONAME ; void CFMRadioActiveIdleEngine::Cancel(void)
+	?ApplicationRunningState@CFMRadioActiveIdleEngine@@QBE?AW4TFMRadioPSApplicationRunningState@@XZ @ 6 NONAME ; enum TFMRadioPSApplicationRunningState CFMRadioActiveIdleEngine::ApplicationRunningState(void) const
+	?AdjustRadioVolume@CFMRadioActiveIdleEngine@@QBEXW4TFMRadioPSAdjustVolume@@@Z @ 7 NONAME ; void CFMRadioActiveIdleEngine::AdjustRadioVolume(enum TFMRadioPSAdjustVolume) const
+	?MuteState@CFMRadioActiveIdleEngine@@QBE?AW4TFMRadioPSRadioMuteState@@XZ @ 8 NONAME ; enum TFMRadioPSRadioMuteState CFMRadioActiveIdleEngine::MuteState(void) const
+	?ChannelName@CFMRadioActiveIdleEngine@@QBEABVTDesC16@@XZ @ 9 NONAME ; class TDesC16 const & CFMRadioActiveIdleEngine::ChannelName(void) const
+	?TuningState@CFMRadioActiveIdleEngine@@QBE?AW4TFMRadioPSTuningState@@XZ @ 10 NONAME ; enum TFMRadioPSTuningState CFMRadioActiveIdleEngine::TuningState(void) const
+	?NewL@CFMRadioActiveIdleEngine@@SAPAV1@AAVMFMRadioActiveIdleEngineNotifyHandler@@@Z @ 11 NONAME ; class CFMRadioActiveIdleEngine * CFMRadioActiveIdleEngine::NewL(class MFMRadioActiveIdleEngineNotifyHandler &)
+	?PowerState@CFMRadioActiveIdleEngine@@QBE?AW4TFMRadioPSRadioPowerState@@XZ @ 12 NONAME ; enum TFMRadioPSRadioPowerState CFMRadioActiveIdleEngine::PowerState(void) const
+	?AntennaStatus@CFMRadioActiveIdleEngine@@QBE?AW4TFMRadioPSHeadsetStatus@@XZ @ 13 NONAME ; enum TFMRadioPSHeadsetStatus CFMRadioActiveIdleEngine::AntennaStatus(void) const
+	?Frequency@CFMRadioActiveIdleEngine@@QBEHXZ @ 14 NONAME ; int CFMRadioActiveIdleEngine::Frequency(void) const
+	?RDSProgramService@CFMRadioActiveIdleEngine@@QBEABVTDesC16@@XZ @ 15 NONAME ; class TDesC16 const & CFMRadioActiveIdleEngine::RDSProgramService(void) const
+	?RadioVolume@CFMRadioActiveIdleEngine@@QBEHXZ @ 16 NONAME ; int CFMRadioActiveIdleEngine::RadioVolume(void) const
+	?ActivateL@CFMRadioActiveIdleEngine@@QAEXXZ @ 17 NONAME ; void CFMRadioActiveIdleEngine::ActivateL(void)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/activeidleengine/eabi/fmradioactiveidleengine200u.def	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,23 @@
+EXPORTS
+	_ZN24CFMRadioActiveIdleEngine4NewLER37MFMRadioActiveIdleEngineNotifyHandler @ 1 NONAME
+	_ZN24CFMRadioActiveIdleEngine6CancelEv @ 2 NONAME
+	_ZN24CFMRadioActiveIdleEngine9ActivateLEv @ 3 NONAME
+	_ZN24CFMRadioActiveIdleEngineD0Ev @ 4 NONAME
+	_ZN24CFMRadioActiveIdleEngineD1Ev @ 5 NONAME
+	_ZN24CFMRadioActiveIdleEngineD2Ev @ 6 NONAME
+	_ZNK24CFMRadioActiveIdleEngine10PowerStateEv @ 7 NONAME
+	_ZNK24CFMRadioActiveIdleEngine11ChannelNameEv @ 8 NONAME
+	_ZNK24CFMRadioActiveIdleEngine11RadioVolumeEv @ 9 NONAME
+	_ZNK24CFMRadioActiveIdleEngine11TuningStateEv @ 10 NONAME
+	_ZNK24CFMRadioActiveIdleEngine12SetMuteStateE24TFMRadioPSRadioMuteState @ 11 NONAME
+	_ZNK24CFMRadioActiveIdleEngine13AntennaStatusEv @ 12 NONAME
+	_ZNK24CFMRadioActiveIdleEngine17AdjustRadioVolumeE22TFMRadioPSAdjustVolume @ 13 NONAME
+	_ZNK24CFMRadioActiveIdleEngine17RDSProgramServiceEv @ 14 NONAME
+	_ZNK24CFMRadioActiveIdleEngine21FrequencyDecimalCountEv @ 15 NONAME
+	_ZNK24CFMRadioActiveIdleEngine23ApplicationRunningStateEv @ 16 NONAME
+	_ZNK24CFMRadioActiveIdleEngine7ChannelEv @ 17 NONAME
+	_ZNK24CFMRadioActiveIdleEngine9FrequencyEv @ 18 NONAME
+	_ZNK24CFMRadioActiveIdleEngine9MuteStateEv @ 19 NONAME
+	_ZTI24CFMRadioPropertyObserver @ 20 NONAME ; #<TI>#
+	_ZTV24CFMRadioPropertyObserver @ 21 NONAME ; #<VT>#
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/activeidleengine/group/bld.inf	Wed Sep 01 12:30:32 2010 +0100
@@ -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: Build configuration for FMRadio active idle engine
+*
+*/
+
+#include <platform_paths.hrh>
+
+// Platforms the component needs to be built on
+//
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+fmradioactiveidleengine.mmp
+
+
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/activeidleengine/group/fmradioactiveidleengine.mmp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,46 @@
+/*
+* 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: Project definition file for project FMRadio active idle engine
+*
+*/
+
+
+// To get the APP_LAYER_SYSTEMINCLUDE-definition
+#include <platform_paths.hrh>
+#include "../../inc/fmradioactiveidle.hrh"
+ 
+TARGET          fmradioactiveidleengine200.dll
+TARGETTYPE      DLL
+UID             0x1000006C AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_FMRADIOPLUGIN
+VERSION         20.0
+
+CAPABILITY      CAP_GENERAL_DLL
+VENDORID        VID_DEFAULT
+
+PAGED
+
+SOURCEPATH      ../src
+SOURCE          fmradioactiveidleengine.cpp
+
+SOURCEPATH      ../../fmradioengine/src
+SOURCE          fmradiopropertyobserver.cpp
+
+USERINCLUDE     ../inc
+USERINCLUDE     ../../fmradioengine/inc
+
+// Default system include paths for application layer modules.
+APP_LAYER_SYSTEMINCLUDE
+
+LIBRARY         euser.lib
+DEBUGLIBRARY    flogger.lib
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/activeidleengine/inc/fmradioactiveidleengine.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,176 @@
+/*
+* 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: Engine component for FMRadio Active Idle plugin.
+*
+*/
+
+
+#ifndef __FMRADIOACTIVEIDLEENGINE_H__
+#define __FMRADIOACTIVEIDLEENGINE_H__
+
+#include <e32base.h>
+#include <fmradiointernalpskeys.h>
+
+#include "fmradiopropertyobserver.h"
+
+class MFMRadioActiveIdleEngineNotifyHandler;
+
+
+/**
+* Engine component for FMRadio Active Idle plugin.
+*
+* This class is responsible for listening to relevant P&S keys and notifying the UI code whenever the listened keys change.
+* The actual listening is done by multiple CFMRadioPropertyObserver objects.
+* 
+* @lib fmradioactiveidleengine200.lib
+* 
+*/
+NONSHARABLE_CLASS(CFMRadioActiveIdleEngine) : public CBase, public MFMRadioPropertyChangeObserver
+    {
+    public:
+        
+        /**
+        * Static constructor.
+        * @param    aObserver   The observer to be notified of the changes in the keys.
+        * @return   The newly created CFMRadioActiveIdleEngine object.
+        */
+        IMPORT_C static CFMRadioActiveIdleEngine* NewL( MFMRadioActiveIdleEngineNotifyHandler& aObserver );
+        
+        /**
+        * Destructor.
+        */
+        IMPORT_C ~CFMRadioActiveIdleEngine();
+        
+        /**
+        * Activates subscription to P&S keys if not already active.
+        * Must be called after CFMRadioActiveIdleEngine::NewL, or after Cancel.
+        */
+        IMPORT_C void ActivateL();
+        
+        /**
+        * Stops subscribing to P&S keys.
+        */
+        IMPORT_C void Cancel();
+                
+        /**
+        * Returns the current volume level of the radio.
+        * @return   The current volume level of the radio.
+        */
+        IMPORT_C TInt RadioVolume() const;
+        
+        /**
+        * Sets the radio volume.
+        * @param    aVolume     The radio volume to set.
+        */
+        IMPORT_C void AdjustRadioVolume( TFMRadioPSAdjustVolume aVolume ) const;
+
+        /**
+        * Returns the current tuning state.
+        * @return   The current tuning state.
+        */
+        IMPORT_C TFMRadioPSTuningState TuningState() const;
+        
+        /**
+        * Returns the current frequency.
+        * @return   The current frequency.
+        */
+        IMPORT_C TInt Frequency() const;
+        
+        /**
+        * Returns the current channel ID.
+        * @return   The current channel ID.
+        */
+        IMPORT_C TInt Channel() const;
+        
+        /**
+        * Returns the current channel name.
+        * @return   The current channel name.
+         */
+        IMPORT_C const TDesC& ChannelName() const;
+        
+        /**
+        * Returns the current mute state.
+        * @return   The current mute state.
+        */
+        IMPORT_C TFMRadioPSRadioMuteState MuteState() const;
+        
+        /**
+        * Sets the mute state.
+        * @param    aMuteState  The mute state to set.
+        */
+        IMPORT_C void SetMuteState( TFMRadioPSRadioMuteState aMuteState ) const;
+        
+        /**
+        * Returns the antenna's current connectivity status. 
+        * @return   The antenna's current connectivity status.
+        */
+        IMPORT_C TFMRadioPSHeadsetStatus AntennaStatus() const;
+        
+        /**
+        * Returns the current frequency decimal count.
+        * @return   The current frequency decimal count.
+        */
+        IMPORT_C TFMRadioPSFrequencyDecimalCount FrequencyDecimalCount() const;
+        
+        /**
+        * Returns FM Radio application's running state.
+        * @return Application's running state.
+        */
+        IMPORT_C TFMRadioPSApplicationRunningState ApplicationRunningState() const;
+        
+        /**
+        * Returns the radio's power state.
+        * @return   The power state.
+        */
+        IMPORT_C TFMRadioPSRadioPowerState PowerState() const;
+        
+        /**
+        * Returns the RDS Program Service information.
+        * @return   RDS Program Service.
+        */
+        IMPORT_C const TDesC& RDSProgramService() const;
+
+    protected: 
+
+		// from base class MFMRadioPropertyChangeObserver
+        void HandlePropertyChangeL( const TUid& aCategory, TUint aKey, TInt aValue );
+        void HandlePropertyChangeL( const TUid& aCategory, TUint aKey, const TDesC8& aValue );
+        void HandlePropertyChangeL( const TUid& aCategory, TUint aKey, const TDesC& aValue );
+        void HandlePropertyChangeErrorL( const TUid& aCategory, TUint aKey, TInt aError );
+        
+    private:
+    
+        /**
+        * Constructor.
+        * @param    aObserver   The observer to be notified of the changes in the keys.
+        */
+        CFMRadioActiveIdleEngine( MFMRadioActiveIdleEngineNotifyHandler& aObserver );
+    
+        /**
+        * Second-phase constructor.
+        */
+        void ConstructL();        
+        
+    protected:
+    
+        /** The observer to be notified of the changes in the listened keys. */
+        MFMRadioActiveIdleEngineNotifyHandler& iObserver;
+        /** Array of status observers. */
+        RPointerArray<CFMRadioPropertyObserver> iPropertyObserverArray;
+
+	private:
+        
+    };
+
+#endif //__FMRADIOACTIVEIDLEENGINE_H__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/activeidleengine/inc/fmradioactiveidleenginenotifyhandler.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,115 @@
+/*
+* Copyright (c) 2005-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: Observer interface for active idle engine
+*
+*/
+
+
+#ifndef __FMRADIOACTIVEIDLEENGINENOTIFYHANDLER_H__
+#define __FMRADIOACTIVEIDLEENGINENOTIFYHANDLER_H__
+
+#include <fmradiointernalpskeys.h>
+
+/**
+* Observer interface for active idle engine.
+* The observer is notified about the changes in relevant keys through this interface.
+*/
+NONSHARABLE_CLASS(MFMRadioActiveIdleEngineNotifyHandler)
+    {
+    public:
+    
+        /**
+        * Invoked when the radio volume has changed.
+        * @param    aVolume     The new radio volume.
+        */
+        virtual void HandleRadioVolumeChangeL( TInt aVolume ) = 0;
+        
+        /**
+        * Invoked when tuning has taken more than one second, or tuning was previously on, but now completed.
+        * @param    aTuningState    The new tuning state.
+        */
+        virtual void HandleTuningStateChangeL( TFMRadioPSTuningState aTuningState ) = 0;
+        
+        /**
+        * Invoked when a new channel has been tuned into.
+        * @param    aIndex      The index of the channel.
+        */
+        virtual void HandleChannelChangeL( TInt aIndex ) = 0;
+        
+        /**
+        * Invoked when a channel has been modifed.
+        * @param    aIndex    The index of the channel that was modified.
+        */
+        virtual void HandleChannelModifyL( TInt aIndex ) = 0;
+
+        /**
+        * Invoked when the frequency has changed.
+        * @param    aFrequency      The new frequency.
+        */
+        virtual void HandleFrequencyChangeL( TInt aFrequency ) = 0;
+        
+        /**
+        * Invoked when the muting state has changed.
+        * @param    aMuteState    The new mute state.
+        */
+        virtual void HandleMuteStateChangeL( TFMRadioPSRadioMuteState aMuteState ) = 0;
+
+        /**
+        * Invoked when the application's running state has changed.
+        * @param    aRunningState   The new running state.
+        */
+        virtual void HandleApplicationRunningStateChangeL( TFMRadioPSApplicationRunningState aRunningState ) = 0;
+
+        /**
+        * Invoked when the used decimal count is changed.
+        * @param    aDecimalCount   The new decimal count.
+        */
+        virtual void HandleFrequencyDecimalCountChangeL( TFMRadioPSFrequencyDecimalCount aDecimalCount ) = 0;
+        
+        /**
+        * Invoked when the antenna's connectivity status is changed.
+        * @param    aAntennaStatus      Antenna's new connectivity status.
+        */
+        virtual void HandleAntennaStatusChangeL( TFMRadioPSHeadsetStatus aAntennaStatus ) = 0;
+        
+        /**
+        * Invoked when radio's power state changes.
+        * @param    aPowerState      The new power state.
+        */
+        virtual void HandlePowerStateChangeL( TFMRadioPSRadioPowerState aPowerState ) = 0;
+        
+        /**
+        * Invoked when RDS Program Service information changes.
+        * @param    aProgramService      New Program Service info.
+        */
+        virtual void HandleRDSProgramServiceChangeL( const TDesC& aProgramService ) = 0;
+
+        /**
+        * Invoked when RDS Text information changes.
+        * @param    aRdsText      New Program Service info.
+        */        
+        virtual void HandleRDSRadioTextChangeL( const TDesC& aRdsText ) = 0;
+
+        /**
+        * Invoked when Channel name changes.
+        * @param    aName      New channel name.
+        */  
+        virtual void HandleChannelNameChangeL( const TDesC& aName ) = 0;
+        
+        virtual void HandlePresetListCountChangeL( TInt aPresetCount ) = 0;
+        virtual void HandlePresetListFocusChangeL( TInt aPresetFocus ) = 0;
+    };
+
+#endif // __FMRADIOACTIVEIDLEENGINENOTIFYHANDLER_H__
+           
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/activeidleengine/src/fmradioactiveidleengine.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,386 @@
+/*
+* 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: FMRadio active idle engine
+*
+*/
+
+
+#include <e32std.h>
+
+#include "fmradioactiveidleengine.h"
+#include "fmradioactiveidleenginenotifyhandler.h"
+
+
+/**
+* Listing of the subscribed P&S values.
+* Changing the order of this enumeration requires changes to CFMRadioActiveIdleEngine::ConstructL as well.
+*/
+
+enum TFMRadioActiveIdleStatusObserverArray
+    {
+    //EFMRadioActiveIdleRadioVolumeObserver,       /**< Index of the radio volume observer. */
+    EFMRadioActiveIdleTuningStateObserver,       /**< Index of the tuning state observer. */
+    EFMRadioActiveIdleFrequencyObserver,         /**< Index of the current frequency observer. */
+    EFMRadioActiveIdleChannelChangeObserver,     /**< Index of the current channel observer. */
+    EFMRadioActiveIdleChannelModifyObserver,     /**< Index of the channel modified observer. */
+    EFMRadioActiveIdleMuteStateObserver,         /**< Index of the muting state observer. */
+    EFMRadioActiveIdleApplicationObserver,       /**< Index of the FM Radio application observer used to observer whether the application is running or not. */
+    EFMRadioActiveIdleHeadsetStatusObserver,     /**< Index of the antenna status observer. */
+    EFMRadioActiveIdleDecimalCountObserver,      /**< Index of the frequency decimal count observer. */
+    EFMRadioActiveIdlePowerStateObserver,        /**< Index of the power state observer. */
+    EFMRadioActiveIdleRDSProgramServiceObserver,  /**< Index of the RDS Program Service observer. */
+    EFMRadioPSDataRDSRadioText,
+    EFMRadioPSDataChannelName,
+    EFMRadioActiveIdlePresetListCountObserver,   /**< Index of the active preset list count observer */
+    EFMRadioActiveIdlePresetListFocusObserver   /**< Index of the active preset list focus observer */
+    };
+
+// ==================== LOCAL FUNCTIONS ====================
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------------------------
+// Constructor.
+// ---------------------------------------------------------------------------
+//
+CFMRadioActiveIdleEngine::CFMRadioActiveIdleEngine( MFMRadioActiveIdleEngineNotifyHandler& aObserver )
+    : iObserver( aObserver )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// Second-phase constructor.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioActiveIdleEngine::ConstructL()
+    {
+    //User::LeaveIfError( iPropertyObserverArray.Append( CFMRadioPropertyObserver::NewL( *this, KFMRadioEnginePSUid, KFMRadioPSDataVolume, CFMRadioPropertyObserver::EFMRadioPropertyInt ) ) );
+    User::LeaveIfError( iPropertyObserverArray.Append( CFMRadioPropertyObserver::NewL( *this, KFMRadioPSUid, KFMRadioPSDataTuningState, CFMRadioPropertyObserver::EFMRadioPropertyInt ) ) );
+    User::LeaveIfError( iPropertyObserverArray.Append( CFMRadioPropertyObserver::NewL( *this, KFMRadioPSUid, KFMRadioPSDataFrequency, CFMRadioPropertyObserver::EFMRadioPropertyInt ) ) );
+    User::LeaveIfError( iPropertyObserverArray.Append( CFMRadioPropertyObserver::NewL( *this, KFMRadioPSUid, KFMRadioPSDataChannel, CFMRadioPropertyObserver::EFMRadioPropertyInt ) ) );
+    User::LeaveIfError( iPropertyObserverArray.Append( CFMRadioPropertyObserver::NewL( *this, KFMRadioPSUid, KFMRadioPSDataChannelDataChanged, CFMRadioPropertyObserver::EFMRadioPropertyInt ) ) );
+    User::LeaveIfError( iPropertyObserverArray.Append( CFMRadioPropertyObserver::NewL( *this, KFMRadioPSUid, KFMRadioPSDataRadioMuteState, CFMRadioPropertyObserver::EFMRadioPropertyInt ) ) );
+    User::LeaveIfError( iPropertyObserverArray.Append( CFMRadioPropertyObserver::NewL( *this, KFMRadioPSUid, KFMRadioPSDataApplicationRunning, CFMRadioPropertyObserver::EFMRadioPropertyInt ) ) );
+    User::LeaveIfError( iPropertyObserverArray.Append( CFMRadioPropertyObserver::NewL( *this, KFMRadioPSUid, KFMRadioPSDataHeadsetStatus, CFMRadioPropertyObserver::EFMRadioPropertyInt ) ) );
+    User::LeaveIfError( iPropertyObserverArray.Append( CFMRadioPropertyObserver::NewL( *this, KFMRadioPSUid, KFMRadioPSDataFrequencyDecimalCount, CFMRadioPropertyObserver::EFMRadioPropertyInt ) ) );
+    User::LeaveIfError( iPropertyObserverArray.Append( CFMRadioPropertyObserver::NewL( *this, KFMRadioPSUid, KFMRadioPSDataRadioPowerState, CFMRadioPropertyObserver::EFMRadioPropertyInt ) ) );
+    User::LeaveIfError( iPropertyObserverArray.Append( CFMRadioPropertyObserver::NewL( *this, KFMRadioPSUid, KFMRadioPSDataRDSProgramService, CFMRadioPropertyObserver::EFMRadioPropertyText ) ) );
+    User::LeaveIfError( iPropertyObserverArray.Append( CFMRadioPropertyObserver::NewL( *this, KFMRadioPSUid, KFMRadioPSDataRDSRadioText, CFMRadioPropertyObserver::EFMRadioPropertyText ) ) );
+    User::LeaveIfError( iPropertyObserverArray.Append( CFMRadioPropertyObserver::NewL( *this, KFMRadioPSUid, KFMRadioPSDataChannelName, CFMRadioPropertyObserver::EFMRadioPropertyText ) ) );
+    User::LeaveIfError( iPropertyObserverArray.Append( CFMRadioPropertyObserver::NewL( *this, KFMRadioPSUid, KFMRadioActiveIdlePresetListCount, CFMRadioPropertyObserver::EFMRadioPropertyInt ) ) );
+    User::LeaveIfError( iPropertyObserverArray.Append( CFMRadioPropertyObserver::NewL( *this, KFMRadioPSUid, KFMRadioActiveIdlePresetListFocus, CFMRadioPropertyObserver::EFMRadioPropertyInt ) ) );
+    }
+
+// ---------------------------------------------------------------------------
+// Makes all pubsub objects to subscribe.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFMRadioActiveIdleEngine::ActivateL()
+	{
+	for ( TInt i = 0; i < iPropertyObserverArray.Count(); i++ )
+		{
+		iPropertyObserverArray[i]->ActivateL();
+		}
+	}
+
+// ---------------------------------------------------------------------------
+// Cancels all pubsub objects.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFMRadioActiveIdleEngine::Cancel()
+	{
+	for ( TInt i = 0; i < iPropertyObserverArray.Count(); i++ )
+		{
+		iPropertyObserverArray[i]->Cancel();	
+		}
+	}
+
+// ---------------------------------------------------------------------------
+// Static constructor.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CFMRadioActiveIdleEngine* CFMRadioActiveIdleEngine::NewL( MFMRadioActiveIdleEngineNotifyHandler& aObserver )
+    {
+    CFMRadioActiveIdleEngine* self = new ( ELeave ) CFMRadioActiveIdleEngine( aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// Destructor.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CFMRadioActiveIdleEngine::~CFMRadioActiveIdleEngine()
+    {
+    iPropertyObserverArray.ResetAndDestroy();
+    iPropertyObserverArray.Close();
+	/*
+    if ( iServ )
+        {
+        iServ->Close();
+        }
+    delete iServ;
+    */
+    }
+
+// ---------------------------------------------------------------------------
+// Invoked when a listened integer P&S key is changed.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioActiveIdleEngine::HandlePropertyChangeL( const TUid& aCategory, TUint aKey, TInt aValue )
+    {
+    if ( aCategory == KFMRadioPSUid )
+        {
+        switch ( aKey )
+            {/*
+            case KFMRadioPSDataVolume:
+                iObserver.HandleRadioVolumeChangeL( aValue );
+            break;*/
+                    
+            case KFMRadioPSDataTuningState:
+                iObserver.HandleTuningStateChangeL( static_cast<TFMRadioPSTuningState>( aValue ) );
+            break;
+
+            case KFMRadioPSDataFrequency:
+                iObserver.HandleFrequencyChangeL( aValue );
+            break;
+            
+            case KFMRadioPSDataChannel:
+                // Sync the cache values for channel name and index
+                iPropertyObserverArray[EFMRadioPSDataChannelName]->ValueDes( ETrue );
+                iObserver.HandleChannelChangeL( aValue );
+            break;
+
+            case KFMRadioPSDataChannelDataChanged:
+                iPropertyObserverArray[EFMRadioPSDataChannelName]->ValueDes( ETrue );
+                iObserver.HandleChannelModifyL( aValue );
+            break;
+
+            case KFMRadioPSDataRadioMuteState:
+                iObserver.HandleMuteStateChangeL( static_cast<TFMRadioPSRadioMuteState>( aValue ) );
+            break;
+
+            case KFMRadioPSDataApplicationRunning:
+                iObserver.HandleApplicationRunningStateChangeL( static_cast<TFMRadioPSApplicationRunningState>( aValue ) );
+            break;
+            
+            case KFMRadioPSDataHeadsetStatus:
+                iObserver.HandleAntennaStatusChangeL( static_cast<TFMRadioPSHeadsetStatus>( aValue ) );
+            break;
+        
+            case KFMRadioPSDataFrequencyDecimalCount:
+                iObserver.HandleFrequencyDecimalCountChangeL( static_cast<TFMRadioPSFrequencyDecimalCount>( aValue ) );
+            break;
+
+            case KFMRadioPSDataRadioPowerState:
+                iObserver.HandlePowerStateChangeL( static_cast<TFMRadioPSRadioPowerState>( aValue ) );
+            break;
+            
+            case KFMRadioActiveIdlePresetListCount:
+               iObserver.HandlePresetListCountChangeL( aValue );
+            break;
+            
+            case KFMRadioActiveIdlePresetListFocus:
+               //iObserver.HandlePresetListFocusChangeL( aValue );
+            break;
+            
+            default:
+            break;
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Invoked when a listened byte array P&S key is changed.
+// ---------------------------------------------------------------------------
+//
+//void CFMRadioActiveIdleEngine::HandlePropertyChangeL( const TUid& /*aCategory*/, TUint /*aKey*/, const TDesC8& /*aValue*/ )
+//    {
+//    }
+    
+// ---------------------------------------------------------------------------
+// Invoked when a listened text P&S key is changed.
+// ---------------------------------------------------------------------------
+//
+
+void CFMRadioActiveIdleEngine::HandlePropertyChangeL( const TUid& aCategory, TUint aKey, const TDesC& aValue )
+    {
+	if ( aCategory == KFMRadioPSUid )
+    	{
+    	switch ( aKey )
+    	    {
+            case KFMRadioPSDataRDSProgramService:
+    	        iObserver.HandleRDSProgramServiceChangeL( aValue );
+    	    break;
+            case KFMRadioPSDataRDSRadioText:
+                iObserver.HandleRDSRadioTextChangeL( aValue );
+                break;
+            case KFMRadioPSDataChannelName:
+                // Sync the cache valuse for channel name and index
+                iPropertyObserverArray[EFMRadioActiveIdleChannelChangeObserver]->ValueInt( ETrue );
+                iObserver.HandleChannelNameChangeL( aValue );
+                break;
+            default:
+            break;
+    	    }
+    	}
+
+    }
+// ---------------------------------------------------------------------------
+// Invoked when a listened text P&S key is changed.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioActiveIdleEngine::HandlePropertyChangeL( const TUid&, TUint, const TDesC8&)
+    {
+    }
+    
+// ---------------------------------------------------------------------------
+// Invoked when an error has occured while fetching the new value of any listened P&S key.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioActiveIdleEngine::HandlePropertyChangeErrorL( const TUid& /*aCategory*/, TUint /*aKey*/, TInt aError )
+    {
+    if (aError < 0)
+    	{
+    	// If any error should pass to this method, handle it like 'application shutdown'.
+    	// This situation will realize whenever the application is killed, by accident/by system/by an app crash
+    	// or due to change to offline mode.
+		HandlePropertyChangeL(KFMRadioPSUid, KFMRadioPSDataApplicationRunning, EFMRadioPSApplicationClosing);
+    	}
+    }
+
+// ---------------------------------------------------------------------------
+// Returns the current radio volume.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CFMRadioActiveIdleEngine::RadioVolume() const
+    {
+    //return iPropertyObserverArray[EFMRadioActiveIdleRadioVolumeObserver]->ValueInt();
+    return 0;
+    }
+
+// ---------------------------------------------------------------------------
+// Sets the radio volume.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFMRadioActiveIdleEngine::AdjustRadioVolume( TFMRadioPSAdjustVolume aVolume ) const
+    {
+    RProperty::Set( KFMRadioPSUid, KFMRadioPSControlAdjustVolume, aVolume );
+    }
+
+
+// ---------------------------------------------------------------------------
+// Returns the current tuning state.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TFMRadioPSTuningState CFMRadioActiveIdleEngine::TuningState() const
+    {
+    return static_cast<TFMRadioPSTuningState>( iPropertyObserverArray[EFMRadioActiveIdleTuningStateObserver]->ValueInt() );
+    }
+
+// ---------------------------------------------------------------------------
+// Returns the current frequency.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CFMRadioActiveIdleEngine::Frequency() const
+    {
+    return iPropertyObserverArray[EFMRadioActiveIdleFrequencyObserver]->ValueInt();
+    }
+
+// ---------------------------------------------------------------------------
+// Returns the currently active channel ID.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CFMRadioActiveIdleEngine::Channel() const
+    {
+    return iPropertyObserverArray[EFMRadioActiveIdleChannelChangeObserver]->ValueInt();
+    }
+
+// ---------------------------------------------------------------------------
+// Returns the currently active channel name.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C const TDesC& CFMRadioActiveIdleEngine::ChannelName() const
+    {
+    return iPropertyObserverArray[EFMRadioPSDataChannelName]->ValueDes();
+    }
+
+// ---------------------------------------------------------------------------
+// Returns the current mute state.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TFMRadioPSRadioMuteState CFMRadioActiveIdleEngine::MuteState() const
+    {
+    return static_cast<TFMRadioPSRadioMuteState>( iPropertyObserverArray[EFMRadioActiveIdleMuteStateObserver]->ValueInt() );
+    }
+
+// ---------------------------------------------------------------------------
+// Sets the mute state.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFMRadioActiveIdleEngine::SetMuteState( TFMRadioPSRadioMuteState aMuteState ) const
+    {
+    RProperty::Set( KFMRadioPSUid, KFMRadioPSControlSetRadioMuteState, aMuteState );
+    }
+
+// ---------------------------------------------------------------------------
+// Returns the current antenna connectivity status.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TFMRadioPSHeadsetStatus CFMRadioActiveIdleEngine::AntennaStatus() const
+    {
+    return static_cast<TFMRadioPSHeadsetStatus>( iPropertyObserverArray[EFMRadioActiveIdleHeadsetStatusObserver]->ValueInt() );
+    }
+
+// ---------------------------------------------------------------------------
+// Returns the current frequency decimal count.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TFMRadioPSFrequencyDecimalCount CFMRadioActiveIdleEngine::FrequencyDecimalCount() const
+    {
+    return static_cast<TFMRadioPSFrequencyDecimalCount>( iPropertyObserverArray[EFMRadioActiveIdleDecimalCountObserver]->ValueInt() );
+    }
+
+// ---------------------------------------------------------------------------
+// Returns FM Radio application's running state.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TFMRadioPSApplicationRunningState CFMRadioActiveIdleEngine::ApplicationRunningState() const
+    {
+    return static_cast<TFMRadioPSApplicationRunningState>( iPropertyObserverArray[EFMRadioActiveIdleApplicationObserver]->ValueInt() );
+    }
+
+// ---------------------------------------------------------------------------
+// Returns the radio's power state.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TFMRadioPSRadioPowerState CFMRadioActiveIdleEngine::PowerState() const
+    {
+    return static_cast<TFMRadioPSRadioPowerState>( iPropertyObserverArray[EFMRadioActiveIdlePowerStateObserver]->ValueInt() );
+    }
+
+// ---------------------------------------------------------------------------
+// Returns RDS Program Service information.
+// ---------------------------------------------------------------------------
+//
+
+EXPORT_C const TDesC& CFMRadioActiveIdleEngine::RDSProgramService() const
+    {
+    return iPropertyObserverArray[EFMRadioActiveIdleRDSProgramServiceObserver]->ValueDes();
+    }
+
+// ================= OTHER EXPORTED FUNCTIONS ==============
+
Binary file fmradio/conf/fmradio.confml has changed
Binary file fmradio/conf/fmradio_2001b25e.crml has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/aif/fmradioaif.rss	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,29 @@
+/*
+* Copyright (c) 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:  Resource file for creating the aif file for FMRadio.
+*
+*/
+
+#include <aiftool.rh>
+#include <bldvariant.hrh>
+
+RESOURCE AIF_DATA
+    {
+    app_uid=0x10207A89;
+    num_icons=2;
+    embeddability=KAppNotEmbeddable;
+    newfile=KAppDoesNotSupportNewFile;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/aif/qgn_indi_tb_ovi_music.svg	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
+<svg baseProfile="tiny" height="22px" version="1.1" viewBox="0 0 22 22" width="22px" x="0px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" y="0px">
+<path d="M18.5,4.592V3.5c0-0.414-0.336-0.75-0.75-0.75h-16C1.336,2.75,1,3.086,1,3.5v15  c0,0.414,0.336,0.75,0.75,0.75h16c0.414,0,0.75-0.336,0.75-0.75v-1.092c2.168-1.428,3.5-3.852,3.5-6.413  C22,8.439,20.668,6.018,18.5,4.592z" fill-opacity="0.3"/>
+<rect fill="none" height="22" width="22"/>
+<path d="M1.75,18.5h1v-15h-1V18.5z M3.5,18.5h14.25v-15H3.5V18.5z M8.22,13.184c0.525-0.092,1.029-0.025,1.457,0.146  V5.137c1.663,0,3.224,0.432,4.58,1.188v2.295c-1.041-0.579-2.198-0.971-3.434-1.122v7.31c0.033,0.93-0.793,1.809-1.963,2.014  c-1.256,0.223-2.42-0.414-2.598-1.416C6.091,14.398,6.961,13.406,8.22,13.184z M18.75,5.729V16.27c1.527-1.297,2.5-3.228,2.5-5.274  C21.25,8.947,20.277,7.021,18.75,5.729z" fill="#FFFFFF"/>
+</svg>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/data/fmradio.rh	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,56 @@
+/*
+* 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:  Resource headers for project FMRadio
+*
+*/
+
+
+#ifndef FMRADIO_RH
+#define FMRADIO_RH
+
+#include <avkon.hrh>
+
+// ---------------------------------------------------------------------------
+// Frequency editor struct
+// ---------------------------------------------------------------------------
+//
+STRUCT FMRADIO_FREQUENCY_EDITOR
+    {
+    BYTE flags = 0;
+    }
+
+// ---------------------------------------------------------------------------
+// Struct for defining a fadable icon
+// ---------------------------------------------------------------------------
+//
+STRUCT FMRADIO_FADABLE_ICON
+    {
+    LTEXT bmpfile;
+    LONG bitmap;
+    LONG mask;
+    WORD fadetime = 1000; // fading time in milliseconds, defaults to one second
+    BYTE invisible_percentage = 0; // Percentage how much the icon is shown when it is faded out
+    }
+
+// ---------------------------------------------------------------------------
+// Struct for defining a bitmap animation composed of fadable icons.
+// ---------------------------------------------------------------------------
+//
+STRUCT FMRADIO_BITMAP_ANIMATION
+    {
+    LONG frameInterval;         // Interval between frames.
+    STRUCT frames[];            // Bitmap animation frames of type FMRADIO_FADABLE_ICON.
+    }
+
+#endif // FMRADIO_RH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/data/fmradio.rss	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,1736 @@
+/*
+* 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:  FM Radio resource definitions
+*
+*
+*/
+
+
+// RESOURCE IDENTIFIER
+//
+NAME FMRD // 4 letter ID
+
+// INCLUDES
+//
+#include <bldvariant.hrh>
+#include <data_caging_paths_strings.hrh>
+#include <aknsconstants.hrh>
+#include <e32keys.h>
+#include <eikon.rh>
+#include <eikon.rsg>
+#include <avkon.rsg>
+#include <avkon.mbg>
+#include <avkon.rh>
+#include <avkon.loc>
+#include <avkon.hrh>
+#include <uikon.rh>
+#include <appinfo.rh>
+#include <avkon.loc>
+
+#include <fmradio.mbg>
+#include "fmradio.rh"
+#include "fmradio.hrh"
+
+#include <fmradio.loc>
+
+#define KFMRadioBitmapFile APP_BITMAP_DIR "\\fmradio.mif"
+
+// RESOURCE DEFINITIONS 
+//
+RESOURCE RSS_SIGNATURE { }
+
+RESOURCE TBUF { buf="FM Radio"; }
+
+
+RESOURCE EIK_APP_INFO
+    {
+    menubar = r_fmradio_main_menu;  // Resource defining the menu. 
+    status_pane = r_fmradio_status_pane;
+    }
+    
+// For scalable AIF 
+RESOURCE LOCALISABLE_APP_INFO r_fmradio_localisable_app_info
+    {
+    short_caption = qtn_fmradio_app_menu_list;
+    caption_and_icon = CAPTION_AND_ICON_INFO
+        {
+        caption = qtn_fmradio_app_menu_grid;
+#ifdef __SCALABLE_ICONS
+    number_of_icons = 1;
+    icon_file = APP_BITMAP_DIR"\\FMRadio_aif.mif";
+#else
+        number_of_icons = 2;
+        icon_file = APP_BITMAP_DIR"\\FMRadio_aif.mbm";
+#endif
+        };
+    }
+
+// ---------------------------------------------------------------------------
+//    r_fmradio_setting_frequency_editor
+//    Editor for setting frequency of a channel.
+// ---------------------------------------------------------------------------
+//
+RESOURCE FMRADIO_FREQUENCY_EDITOR r_fmradio_setting_frequency_editor
+    {
+    }
+
+// ---------------------------------------------------------------------------
+//    r_fmradio_manual_tuning_query
+//    Manual tuning query resources
+// ---------------------------------------------------------------------------
+//
+RESOURCE DIALOG r_fmradio_manual_tuning_query
+    {
+    flags = EGeneralQueryFlags | EEikDialogFlagDontEatUpDownEvents;
+    buttons = r_fmradio_softkeys_save_cancel__save;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EFMRadioCtFrequencyQuery;
+            id = EGeneralQuery;
+            control = AVKON_DATA_QUERY
+                {
+                layout = ETimeLayout;
+                control = FMRADIO_FREQUENCY_EDITOR
+                    {
+                    };
+                };
+            }
+        };
+    }
+
+RESOURCE AVKON_BUTTON_STATE_EXTENSION  r_fmradio_toolbar_prev_button_state_extension
+    {
+    bmbSkinIdMajor = EAknsMajorGeneric; 
+    bmbSkinIdMinor = EAknsMinorGenericQgnIndiTbRadioPrevious;
+    }
+
+RESOURCE AVKON_BUTTON_STATE_EXTENSION  r_fmradio_toolbar_next_button_state_extension
+    {
+    bmbSkinIdMajor = EAknsMajorGeneric; 
+    bmbSkinIdMinor = EAknsMinorGenericQgnIndiTbRadioNext;
+    }
+    
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_fmradio_toolbar_rename_button_state_extension
+    {
+    bmbSkinIdMajor = EAknsMajorGeneric; 
+    bmbSkinIdMinor = EAknsMinorGenericQgnIndiTbRename;
+    }
+    
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_fmradio_toolbar_save_button_state_extension
+    {
+    bmbSkinIdMajor = EAknsMajorGeneric; 
+    bmbSkinIdMinor = EAknsMinorGenericQgnIndiTbRadioStationSave;
+    }
+
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_fmradio_toolbar_delete_button_state_extension
+    {
+    bmbSkinIdMajor = EAknsMajorGeneric; 
+    bmbSkinIdMinor = EAknsMinorGenericQgnIndiCam4TbDelete;
+    }
+
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_fmradio_toolbar_mshop_button_state_extension
+    {
+    bmbSkinIdMajor = EAknsMajorGeneric; 
+    bmbSkinIdMinor = EAknsMinorGenericQgnIndiRadioTbMshop;
+    }
+
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_fmradio_toolbar_ihfon_button_state_extension
+    {
+    bmbSkinIdMajor = EAknsMajorGeneric; 
+    bmbSkinIdMinor = EAknsMinorGenericQgnIndiTbIhfOn;
+    }
+
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_fmradio_toolbar_ihfoff_button_state_extension
+    {
+    bmbSkinIdMajor = EAknsMajorGeneric; 
+    bmbSkinIdMinor = EAknsMinorGenericQgnIndiTbIhfOff;
+    }
+
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_fmradio_toolbar_web_button_state_extension
+    {
+    bmbSkinIdMajor = EAknsMajorGeneric; 
+    bmbSkinIdMinor = EAknsMinorGenericQgnIndiRadioTbGotoweb;
+    }
+
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_fmradio_toolbar_stations_button_state_extension
+    {
+    bmbSkinIdMajor = EAknsMajorGeneric; 
+    bmbSkinIdMinor = EAknsMinorGenericQgnIndiRadioTbList;
+    }
+
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_fmradio_toolbar_ovi_button_state_extension
+    {
+    bmbSkinIdMajor = EAknsMajorGeneric; 
+    bmbSkinIdMinor = EAknsMinorGenericQgnMenuOviMusic;
+    }
+
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_fmradio_toolbar_manual_tuning_button_state_extension
+    {
+    bmbSkinIdMajor = EAknsMajorGeneric; 
+    bmbSkinIdMinor = EAknsMinorGenericQgnIndiRadioTbManualtune;
+    }
+    
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_fmradio_toolbar_scan_button_state_extension
+    {
+    bmbSkinIdMajor = EAknsMajorGeneric; 
+    bmbSkinIdMinor = EAknsMinorGenericQgnIndiTbRadioScan;
+    }
+
+RESOURCE AVKON_BUTTON_STATE_EXTENSION r_fmradio_toolbar_save_all_button_state_extension
+    {
+    bmbSkinIdMajor = EAknsMajorGeneric; 
+    bmbSkinIdMinor = EAknsMinorGenericQgnIndiTbRadioStationSaveAll;
+    }
+
+// ---------------------------------------------------------------------------
+// r_fmradio_main_view_toolbar
+// ---------------------------------------------------------------------------
+//
+RESOURCE AVKON_TOOLBAR r_fmradio_main_view_toolbar
+    {
+    flags = KAknToolbarTransparent|KAknToolbarWithoutCba|KAknToolbarFixed;
+    items =
+        {
+        TBAR_CTRL
+            {
+            type = EAknCtButton;
+            id = EFMRadioToolbarButtonCmdTuneDown;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonReportOnLongPress;
+                states = 
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        bmpfile = KFMRadioBitmapFile;
+                        bmpid = EMbmFmradioQgn_indi_tb_radio_previous; 
+                        bmpmask = EMbmFmradioQgn_indi_tb_radio_previous_mask;
+                        extension = r_fmradio_toolbar_prev_button_state_extension;
+                        }
+                    };
+                };
+            },
+            TBAR_CTRL
+                {
+                type = EAknCtToolbarExtension;
+                id = EFMRadioToolbarButtonCmdExtensionList;
+                control = AVKON_TOOLBAR_EXTENSION
+                    {
+                    helptxt = qtn_fmradio_tooltip_extension;
+                    items =
+                        {
+                        TBAR_CTRL
+                            {
+                            type = EAknCtButton;
+                            id = EFMRadioCmdRename;
+                            control = AVKON_BUTTON
+                                {
+                                flags = KAknButtonRequestExitOnButtonUpEvent;
+                                states = 
+                                    {
+                                     AVKON_BUTTON_STATE
+                                        {
+                                        txt = qtn_tbextension_rename;
+                                        helptxt = qtn_fmradio_tooltip_rename;
+                                        bmpfile = KFMRadioBitmapFile;
+                                        bmpmask = EMbmFmradioQgn_indi_tb_rename;
+                                        bmpid = EMbmFmradioQgn_indi_tb_rename_mask; 
+                                        extension = r_fmradio_toolbar_rename_button_state_extension;
+                                        }
+                                    };
+                                };
+                            },
+                        TBAR_CTRL
+                            {
+                            type = EAknCtButton;
+                            id = EFMRadioCmdSaveChannel;
+                            control = AVKON_BUTTON
+                                {
+                                flags = KAknButtonRequestExitOnButtonUpEvent;
+                                states = 
+                                    {
+                                     AVKON_BUTTON_STATE
+                                        {
+                                        txt = qtn_tbextension_save;
+                                        helptxt = qtn_fmradio_tooltip_save;
+                                        bmpfile = KFMRadioBitmapFile;
+                                        bmpid = EMbmFmradioQgn_indi_tb_radio_station_save; 
+                                        bmpmask = EMbmFmradioQgn_indi_tb_radio_station_save_mask;
+                                        extension = r_fmradio_toolbar_save_button_state_extension;
+                                        }
+                                    };
+                                };
+                            },
+                        TBAR_CTRL
+                            {
+                            type = EAknCtButton;
+                            id = EFMRadioCmdErase;
+                            control = AVKON_BUTTON
+                                {
+                                flags = KAknButtonRequestExitOnButtonUpEvent;
+                                states = 
+                                    {
+                                     AVKON_BUTTON_STATE
+                                        {
+                                        txt = qtn_tbextension_delete;
+                                        helptxt = qtn_fmradio_tooltip_delete;
+                                        bmpfile = KFMRadioBitmapFile;
+                                        bmpmask = EMbmFmradioQgn_indi_cam4_tb_delete_mask;
+                                        bmpid = EMbmFmradioQgn_indi_cam4_tb_delete; 
+                                        extension = r_fmradio_toolbar_delete_button_state_extension;
+                                        }
+                                    };
+                                };
+                            },
+                        TBAR_CTRL
+                            {
+                            type = EAknCtButton;
+                            id = EFMRadioToolbarButtonCmdOperatorMusicStore;
+                            control = AVKON_BUTTON
+                                {
+                                flags = KAknButtonRequestExitOnButtonUpEvent;
+                                states = 
+                                    {
+                                     AVKON_BUTTON_STATE
+                                        {
+                                        txt = qtn_tbextension_operator_music;
+                                        bmpfile = KFMRadioBitmapFile;
+                                        bmpmask = EMbmFmradioQgn_indi_radio_tb_mshop;
+                                        bmpid = EMbmFmradioQgn_indi_radio_tb_mshop_mask;
+                                        extension = r_fmradio_toolbar_mshop_button_state_extension;
+                                        }
+                                    };
+                                };
+                            },
+                        TBAR_CTRL
+                            {
+                            type = EAknCtButton;
+                            id = EFMRadioToolbarButtonCmdToggleIhf;
+                            control = AVKON_BUTTON
+                                {
+                                flags = KAknButtonRequestExitOnButtonUpEvent;
+                                states = 
+                                    {
+                                    AVKON_BUTTON_STATE
+                                        {
+                                        txt = qtn_tbextension_activate_loudspeaker;
+                                        helptxt = qtn_fmradio_tooltip_activate_loudspeaker;
+                                        bmpfile = KFMRadioBitmapFile;
+                                        bmpid = EMbmFmradioQgn_indi_tb_ihf_on;
+                                        bmpmask = EMbmFmradioQgn_indi_tb_ihf_on_mask;
+                                        extension = r_fmradio_toolbar_ihfon_button_state_extension;
+                                        },
+                                    AVKON_BUTTON_STATE
+                                        {
+                                        txt = qtn_tbextension_deactivate_loudspeaker;
+                                        helptxt = qtn_fmradio_tooltip_deactivate_loudspeaker;
+                                        bmpfile = KFMRadioBitmapFile;
+                                        bmpid = EMbmFmradioQgn_indi_tb_ihf_off; 
+                                        bmpmask = EMbmFmradioQgn_indi_tb_ihf_off_mask;
+                                        extension = r_fmradio_toolbar_ihfoff_button_state_extension;
+                                        }
+                                    };
+                                };
+                            },
+                        TBAR_CTRL
+                            {
+                            type = EAknCtButton;
+                            id = EMPXPbvCmdInternetGoToWeb;
+                            control = AVKON_BUTTON
+                                {
+                                flags = KAknButtonRequestExitOnButtonUpEvent;
+                                states = 
+                                    {
+                                     AVKON_BUTTON_STATE
+                                        {
+                                        txt = qtn_tbextension_station_web;
+                                        helptxt = qtn_fmradio_tooltip_web;
+                                        bmpfile = KFMRadioBitmapFile;
+                                        bmpmask = EMbmFmradioQgn_indi_radio_tb_gotoweb;
+                                        bmpid = EMbmFmradioQgn_indi_radio_tb_gotoweb_mask; 
+                                        extension = r_fmradio_toolbar_web_button_state_extension;
+                                        }
+                                    };
+                                };
+                            },
+                        TBAR_CTRL
+                            {
+                            type = EAknCtButton;
+                            id = EFMRadioCmdChannelList;
+                            control = AVKON_BUTTON
+                                {
+                                flags = KAknButtonRequestExitOnButtonUpEvent;
+                                states = 
+                                    {
+                                     AVKON_BUTTON_STATE
+                                        {
+                                        txt = qtn_tbextension_list_view;
+                                        helptxt = qtn_fmradio_tooltip_stations;
+                                        bmpfile = KFMRadioBitmapFile;
+                                        bmpid = EMbmFmradioQgn_indi_radio_tb_list; 
+                                        bmpmask = EMbmFmradioQgn_indi_radio_tb_list_mask;
+                                        extension = r_fmradio_toolbar_stations_button_state_extension;
+                                        }
+                                    };
+                                };
+                            },
+                        TBAR_CTRL
+                            {
+                            type = EAknCtButton;
+                            id = EFMRadioToolbarButtonCmdNokiaMusicStore;
+                            control = AVKON_BUTTON
+                                {
+                                flags = KAknButtonRequestExitOnButtonUpEvent;
+                                states = 
+                                    {
+                                     AVKON_BUTTON_STATE
+                                        {
+                                        txt = qtn_tbextension_ovi_music;
+                                        helptxt = qtn_fmradio_tooltip_nokia_music_store;
+                                        bmpfile = KFMRadioBitmapFile;
+                                        bmpid = EMbmFmradioQgn_indi_tb_ovi_music;
+                                        bmpmask = EMbmFmradioQgn_indi_tb_ovi_music_mask;
+                                        extension = r_fmradio_toolbar_ovi_button_state_extension;
+                                        }
+                                    };
+                                };
+                            }
+                        };
+                    };
+                },
+        TBAR_CTRL
+            {
+            type = EAknCtButton;
+            id = EFMRadioToolbarButtonCmdTuneUp;
+            control = AVKON_BUTTON
+                {
+                flags = KAknButtonReportOnLongPress;
+                states =
+                    {
+                     AVKON_BUTTON_STATE
+                        {
+                        bmpfile = KFMRadioBitmapFile;
+                        bmpid = EMbmFmradioQgn_indi_tb_radio_next; 
+                        bmpmask = EMbmFmradioQgn_indi_tb_radio_next_mask;
+                        extension = r_fmradio_toolbar_next_button_state_extension;
+                        }
+                    };
+                };
+            }
+        };
+    }
+
+//----------------------------------------------------
+//   
+//    r_fmradio_status_pane
+//
+//----------------------------------------------------
+//
+RESOURCE STATUS_PANE_APP_MODEL r_fmradio_status_pane
+    {
+    layout = R_AVKON_STATUS_PANE_LAYOUT_USUAL;
+    panes =
+        {
+        SPANE_PANE
+            {
+            id = EEikStatusPaneUidTitle;
+            type = EAknCtTitlePane;
+            resource = r_qtn_fmradio_title;
+            }
+        };
+    }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_title
+//----------------------------------------------------
+//
+RESOURCE TITLE_PANE r_qtn_fmradio_title
+    { 
+    txt = qtn_fmradio_title; 
+    }
+
+// ============================ Application views ============================
+//
+RESOURCE CBA r_fmradio_softkeys_select_exit__select
+    {
+    buttons=
+        {
+        CBA_BUTTON { id = EAknSoftkeySelect; txt = text_softkey_select; },
+        CBA_BUTTON { id = EAknSoftkeyExit; txt = text_softkey_exit; },
+        CBA_BUTTON { id = EAknSoftkeySelect; txt = text_softkey_select; }
+        };
+    }
+
+//----------------------------------------------------
+// Resource     : r_fmradio_softkeys_drop_done
+// Description  : Reorder functionality softkeys
+//----------------------------------------------------
+//
+RESOURCE CBA r_fmradio_softkeys_drop_done
+    {
+    buttons=
+           {
+           CBA_BUTTON { id = EFMRadioCmdDrop; txt = qtn_fmradio_softkey_drop; },
+           CBA_BUTTON { id = EFMRadioCmdDone; txt = text_softkey_done; }
+           };
+    }
+//----------------------------------------------------
+// Resource     : r_fmradio_softkeys_drop_cancel
+// Description  : Reorder functionality softkeys
+//----------------------------------------------------
+//
+RESOURCE CBA r_fmradio_softkeys_drop_cancel
+    {
+    buttons=
+           {
+           CBA_BUTTON { id = EFMRadioCmdDrop; txt = qtn_fmradio_softkey_drop; },
+           CBA_BUTTON { id = EAknSoftkeyCancel; txt = text_softkey_cancel; }
+           };
+    }
+//----------------------------------------------------
+// Resource     : r_fmradio_softkeys_drop_done
+// Description  : Reorder functionality softkeys
+//----------------------------------------------------
+//
+RESOURCE CBA r_fmradio_softkeys_grab_cancel
+    {
+    buttons=
+           {
+           CBA_BUTTON { id = EFMRadioCmdGrap; txt = qtn_fmradio_softkey_grab; },
+           CBA_BUTTON { id = EAknSoftkeyCancel; txt = text_softkey_cancel; }
+           };
+    }
+//----------------------------------------------------
+// Resource     : r_fmradio_softkeys_grap_done
+// Description  : Move functionality softkeys
+//----------------------------------------------------
+//
+RESOURCE CBA r_fmradio_softkeys_grap_done
+    {
+    buttons=
+           {
+           CBA_BUTTON { id = EFMRadioCmdGrap; txt = qtn_fmradio_softkey_grab; },
+           CBA_BUTTON { id = EFMRadioCmdDone; txt = text_softkey_done; }
+           };
+    }
+//----------------------------------------------------
+// Resource     : r_fmradio_softkeys_save_cancel__save
+// Description  : softkeys for manual tuning dialog
+//----------------------------------------------------
+//
+RESOURCE CBA r_fmradio_softkeys_save_cancel__save
+    {
+    buttons=
+        {
+        CBA_BUTTON { id = EAknSoftkeySave; txt = text_softkey_save; },
+        CBA_BUTTON { id = EAknSoftkeyCancel; txt = text_softkey_cancel; },
+        CBA_BUTTON { id = EAknSoftkeySave; txt = text_softkey_save; }
+        };
+    }
+
+//----------------------------------------------------
+// Resource     : r_fmradio_main_view
+// Description  : Application main view. (View ID=1)
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_fmradio_main_view
+    {
+    menubar = r_fmradio_main_menu; 
+    cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
+    toolbar = r_fmradio_main_view_toolbar;
+    }
+
+// ---------------------------------------------------------
+//    r_fmradio_main_view_tuning_state_softkeys
+// ---------------------------------------------------------
+//
+RESOURCE CBA r_fmradio_main_view_tuning_state_softkeys
+    {
+    buttons =
+        {
+        CBA_BUTTON { txt = text_softkey_empty; },
+        CBA_BUTTON { id = EFMRadioCmdStopTuning; txt = text_softkey_stop; }
+        };
+    }
+
+// ---------------------------------------------------------
+//    r_fmradio_softkeys_exit
+// ---------------------------------------------------------
+//
+RESOURCE CBA r_fmradio_softkeys_exit
+    {
+    buttons =
+        {
+        CBA_BUTTON { txt = text_softkey_empty; },
+        CBA_BUTTON { id = EAknSoftkeyExit; txt = text_softkey_exit; }
+        };
+    }
+
+//----------------------------------------------------
+// Resource     : r_fmradio_ch_list_view
+// Description  : Stations view. (View ID=2)
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_fmradio_ch_list_view
+    {
+    menubar = r_fmradio_channel_list_menu;
+    cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
+    toolbar = r_fmradio_channel_list_toolbar;
+    }
+
+// ================================ View titles ==============================
+//
+
+// ---------------------------------------------------------------------------
+//    r_fmradio_stations_view_title
+//    Title of stations view.
+// ---------------------------------------------------------------------------
+//
+RESOURCE TBUF r_fmradio_stations_view_title { buf = qtn_fmradio_stations_title; }
+
+// ---------------------------------------------------------------------------
+//    r_fmradio_search_stations_view_title
+//    Title of scan local stations view.
+// ---------------------------------------------------------------------------
+//
+RESOURCE TBUF r_fmradio_search_stations_view_title { buf = qtn_fmradio_search_stations_title; }
+
+
+// ================================ Menu titles ==============================
+//
+
+//----------------------------------------------------
+// Resource     : r_fmradio_main_menu
+// Description  : Title for the Main menu.
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_fmradio_main_menu
+    {
+    titles=
+        {
+        MENU_TITLE { menu_pane = r_fmradio_main_options_menu; txt = ""; }
+        };
+    }
+
+
+//----------------------------------------------------
+// Resource     : r_fmradio_channel_list_menu
+// Description  : Title for the channel list menu.
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_fmradio_channel_list_menu
+    {
+    titles=
+        {
+        MENU_TITLE { menu_pane = r_fmradio_ch_list_options_menu; txt = ""; }
+        };
+    }
+    
+
+// ================================ Menu items ===============================
+//
+
+//----------------------------------------------------
+// Resource     : r_fmradio_main_options_menu
+// Description  : Main options menu items v2.
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_fmradio_main_options_menu
+    {
+    items=
+        {
+        MENU_ITEM { command = EMPXPbvCmdInternetGoToWeb; txt = qtn_fmradio_options_web_address; },
+        MENU_ITEM { command = EFMRadioCmdChannelList;   txt = qtn_fmradio_options_stations; },
+        MENU_ITEM { command = EFMRadioCmdSaveChannel;   txt = qtn_fmradio_options_save; },
+        MENU_ITEM { command = EFMRadioCmdErase;         txt = qtn_fmradio_options_delete; },
+        MENU_ITEM { command = EFMRadioCmdRename;        txt = qtn_fmradio_options_rename; },
+        MENU_ITEM { command = EFMRadioCmdActivateIhf;   txt = qtn_fmradio_options_activate; },
+        MENU_ITEM { command = EFMRadioCmdDeactivateIhf; txt = qtn_fmradio_options_deactivate; },
+        MENU_ITEM { command = EFMRadioCmdOpenAFSubmenu; txt = qtn_fmradio_options_alternative_freq; cascade = r_fmradio_options_af_sub_menu; },
+        MENU_ITEM { command = EAknCmdHelp;              txt = qtn_options_help; },
+        MENU_ITEM { command = EAknCmdExit;              txt = qtn_options_exit; }
+        };
+    }
+
+//----------------------------------------------------
+// Resource     : r_fmradio_options_af_sub_menu
+// Description  : Sub options menu for alternative frequency.
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_fmradio_options_af_sub_menu
+    {
+    items =
+        {
+        MENU_ITEM
+            {
+            command = EFMRadioCmdEnableRdsAfSearch;
+            txt = qtn_fmradio_options_on;
+            flags = EEikMenuItemRadioStart;
+            },
+        MENU_ITEM
+            {
+            command = EFMRadioCmdDisableRdsAfSearch;
+            txt = qtn_fmradio_options_off;
+            flags = EEikMenuItemRadioEnd;
+            }
+        };
+    }
+
+//----------------------------------------------------
+// Resource     : r_fmradio_ch_list_options_menu
+// Description  : Channel list options menu items.
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_fmradio_ch_list_options_menu
+    {
+    items=
+        {
+        MENU_ITEM { command = EFMRadioCmdRename; txt = qtn_fmradio_options_rename; flags = EEikMenuItemSpecific; },
+        MENU_ITEM { command = EFMRadioCmdErase; txt = qtn_fmradio_options_delete; flags = EEikMenuItemSpecific; },
+        MENU_ITEM { command = EFMRadioCmdMove; txt = qtn_fmradio_move; flags = EEikMenuItemSpecific; },
+        MENU_ITEM { command = EFMRadioCmdScanLocalStations; txt = qtn_fmradio_options_search_stations; },
+        MENU_ITEM { command = EFMRadioCmdTuneManually;  txt = qtn_fmradio_options_tune_manually; },
+        MENU_ITEM { command = EFMRadioCmdActivateIhf;   txt = qtn_fmradio_options_activate; },
+        MENU_ITEM { command = EFMRadioCmdDeactivateIhf; txt = qtn_fmradio_options_deactivate; },
+        MENU_ITEM { command = EAknCmdHelp;              txt = qtn_options_help; },
+        MENU_ITEM { command = EAknCmdExit;              txt = qtn_options_exit; }
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// r_fmradio_channel_list_toolbar
+// ---------------------------------------------------------------------------
+//
+RESOURCE AVKON_TOOLBAR r_fmradio_channel_list_toolbar
+    {
+    flags = KAknToolbarTransparent|KAknToolbarWithoutCba|KAknToolbarFixed;
+    items =
+        {
+        TBAR_CTRL
+            {
+            type = EAknCtButton;
+            id = EFMRadioCmdTuneManually;
+            control = AVKON_BUTTON
+                {
+                states = 
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        helptxt = qtn_fmradio_tooltip_tune_manually;
+                        bmpfile = KFMRadioBitmapFile;
+                        bmpid = EMbmFmradioQgn_indi_radio_tb_manualtune; 
+                        bmpmask = EMbmFmradioQgn_indi_radio_tb_manualtune_mask;
+                        extension = r_fmradio_toolbar_manual_tuning_button_state_extension;
+                        }
+                    };
+                };
+            },
+        TBAR_CTRL
+            {
+            type = EAknCtButton;
+            id = EFMRadioCmdScanLocalStations;
+            control = AVKON_BUTTON
+                {
+                states = 
+                    {                           
+                    AVKON_BUTTON_STATE
+                        {
+                        helptxt = qtn_fmradio_tooltip_search_stations;
+                        bmpfile = KFMRadioBitmapFile;
+                        bmpid = EMbmFmradioQgn_indi_tb_radio_scan; 
+                        bmpmask = EMbmFmradioQgn_indi_tb_radio_scan_mask;
+                        extension = r_fmradio_toolbar_scan_button_state_extension;
+                        }
+                    };
+                };
+            },  
+        TBAR_CTRL
+            {
+            type = EAknCtButton;
+            id = EFMRadioToolbarButtonCmdToggleIhf;
+            control = AVKON_BUTTON
+                {
+                states = 
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        helptxt = qtn_fmradio_tooltip_activate_loudspeaker;
+                        bmpfile = KFMRadioBitmapFile;
+                        bmpid = EMbmFmradioQgn_indi_tb_ihf_on;
+                        bmpmask = EMbmFmradioQgn_indi_tb_ihf_on_mask;
+                        extension = r_fmradio_toolbar_ihfon_button_state_extension;
+                        },
+                    AVKON_BUTTON_STATE
+                        {
+                        helptxt = qtn_fmradio_tooltip_deactivate_loudspeaker;
+                        bmpfile = KFMRadioBitmapFile;
+                        bmpid = EMbmFmradioQgn_indi_tb_ihf_off; 
+                        bmpmask = EMbmFmradioQgn_indi_tb_ihf_off_mask;
+                        extension = r_fmradio_toolbar_ihfoff_button_state_extension;
+                        }
+                    };
+                };
+            }
+        };
+    }
+
+// ============================= Data queries ==============================
+//
+
+RESOURCE AVKON_LIST_QUERY r_fmradio_listquery_save_all_replace_append
+    {
+    softkeys=R_AVKON_SOFTKEYS_SELECT_CANCEL;
+    items =
+        {
+        AVKON_LIST_QUERY_DLG_LINE
+            {
+            control = AVKON_LIST_QUERY_CONTROL
+                {
+                listtype = EAknCtSinglePopupMenuListBox;
+                heading = qtn_fmradio_list_query_save_all;
+                listbox = AVKON_LIST_QUERY_LIST
+                    {
+                    array_id = r_fmradio_listquery_save_all_replace_append_items;
+                    };
+                };
+            }
+        };
+    }
+
+
+RESOURCE ARRAY r_fmradio_listquery_save_all_replace_append_items
+    {
+    items =
+        {
+        LBUF {txt = qtn_fmradio_list_query_replace_all; },
+        LBUF {txt = qtn_fmradio_list_query_append; }
+        };
+    }
+
+RESOURCE AVKON_LIST_QUERY r_fmradio_listquery_save_all_replace_append_list_almost_full
+    {
+    softkeys=R_AVKON_SOFTKEYS_SELECT_CANCEL;
+    items =
+        {
+        AVKON_LIST_QUERY_DLG_LINE
+            {
+            control = AVKON_LIST_QUERY_CONTROL
+                {
+                listtype = EAknCtSinglePopupMenuListBox;
+                heading = qtn_fmradio_list_query_list_full;
+                listbox = AVKON_LIST_QUERY_LIST
+                    {
+                    array_id = r_fmradio_listquery_save_all_replace_append_items_list_almost_full;
+                    };
+                };
+            }
+        };
+    }
+
+RESOURCE ARRAY r_fmradio_listquery_save_all_replace_append_items_list_almost_full
+    {
+    items =
+        {
+        LBUF {txt = qtn_fmradio_list_query_all_fits; },
+        LBUF {txt = qtn_fmradio_list_query_replace_all; }
+        };
+    }
+
+RESOURCE DIALOG r_fmradio_rename_query
+{
+    flags=EGeneralQueryFlags;
+    buttons=R_AVKON_SOFTKEYS_OK_CANCEL;
+    items=
+        {
+        DLG_LINE
+            {
+            type=EAknCtQuery;
+            id=EGeneralQuery;
+            control= AVKON_DATA_QUERY 
+                { 
+                    layout = EDataLayout;
+                    label = qtn_fmradio_query_rename;
+                    control = EDWIN
+                        {
+                        flags= EEikEdwinNoHorizScrolling | EEikEdwinResizable; 
+                        maxlength=20; 
+                        width=16; 
+                        lines=1; 
+                        max_view_height_in_lines=1; // (5 or less lines are permitted)
+                        base_line_delta=21; 
+                        };
+                };
+            }
+        };
+}
+
+RESOURCE AVKON_LIST_QUERY r_fmradio_select_region_query
+    {
+    flags = EGeneralQueryFlags | EEikDialogFlagWait;
+    softkeys = r_fmradio_softkeys_select_exit__select;
+
+    items = 
+        {
+        AVKON_LIST_QUERY_DLG_LINE 
+            {
+            control = AVKON_LIST_QUERY_CONTROL
+                {
+                listtype = EAknCtSinglePopupMenuListBox;
+                listbox = AVKON_LIST_QUERY_LIST
+                    {
+                    };
+                heading = qtn_fmradio_popup_head_select_reg;
+                };
+            }
+        };
+    }
+
+// ========================= Confirmation queries ==========================
+//
+
+//----------------------------------------------------
+// Resource     : r_fmradio_activate_in_offline_query
+// Description  : A dialog shown when starting FM Radio 
+//                and off-line mode is active.
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_fmradio_activate_in_offline_query
+    {
+    flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_YES_NO;
+    items = 
+        { 
+        DLG_LINE 
+            { 
+            type = EAknCtQuery; 
+            id = EGeneralQuery; 
+            control = AVKON_CONFIRMATION_QUERY 
+                { 
+                layout = EConfirmationQueryLayout;
+                label = qtn_fmradio_query_offline_activate;
+                }; 
+            }
+        };
+    }
+
+//----------------------------------------------------
+// Resource     : r_fmradio_continue_in_offline_query
+// Description  : A dialog shown when coming to 
+//                foreground and off-line mode has been
+//                activated in background.
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_fmradio_continue_in_offline_query
+    {
+    flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_YES_NO;
+    items = 
+        { 
+        DLG_LINE 
+            { 
+            type = EAknCtQuery; 
+            id = EGeneralQuery; 
+            control = AVKON_CONFIRMATION_QUERY 
+                { 
+                layout = EConfirmationQueryLayout;
+                label = qtn_fmradio_query_offline_use;
+                }; 
+            }
+        };
+    }
+
+//----------------------------------------------------
+// Resource     : r_fmradio_save_ch_confirmation_query
+// Description  : Confirmation query used when user
+//                tries to save a channel to a reserved
+//                channel slot. User is asked to
+//                confirm is the intention to replace
+//                the existing channel in that channel
+//                slot.   
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_fmradio_save_ch_confirmation_query
+{
+    flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_YES_NO;
+    items =
+    {
+        DLG_LINE
+        {
+            type = EAknCtQuery;
+            id = EGeneralQuery;
+            control = AVKON_CONFIRMATION_QUERY 
+            { 
+                layout = EConfirmationLayout;
+            };
+        }
+    };
+}
+
+//----------------------------------------------------
+// Resource     : r_fmradio_erase_ch_confirmation_query
+// Description  : Confirmation query used when user
+//                tries to delete a channel from a
+//                channel slot. User is asked to
+//                confirm is the intention to really
+//                delete the existing channel in that 
+//                channel slot or was it just an
+//                accidental menu selection...   
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_fmradio_erase_ch_confirmation_query
+{
+    flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_YES_NO;
+    items =
+    {
+        DLG_LINE
+        {
+            type = EAknCtQuery;
+            id = EGeneralQuery;
+            control = AVKON_CONFIRMATION_QUERY 
+            { 
+                layout = EConfirmationLayout;
+            };
+        }
+    };
+}
+
+RESOURCE DIALOG r_fmradio_connect_headset_note
+    {
+    flags = EAknDialogGenericQueryFlags;
+    buttons = r_fmradio_softkeys_exit;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtQuery;
+            id = EConfirmationLayout;
+            control = AVKON_CONFIRMATION_QUERY 
+                { 
+                layout = EConfirmationQueryLayout;
+                bmpfile = KFMRadioBitmapFile;
+                bmpid = EMbmFmradioQgn_note_radio_jackmini;
+                bmpmask = EMbmFmradioQgn_note_radio_jackmini_mask;
+                };
+            }
+        };
+    }
+
+//----------------------------------------------------
+// Resource     : r_fmradio_query_save_current
+// Description  : query for saving channel that has not been saved
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_fmradio_query_save_current
+    {
+    flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_YES_NO;
+    items = 
+        { 
+        DLG_LINE 
+            { 
+            type = EAknCtQuery; 
+            id = EGeneralQuery; 
+            control = AVKON_CONFIRMATION_QUERY 
+                { 
+                layout = EConfirmationQueryLayout;
+                label = qtn_fmradio_query_save_current;
+                }; 
+            }
+        };
+    }
+
+//----------------------------------------------------
+// Resource     : r_fmradio_replace_existing_channels_query
+// Description  : Shown when starting channel list is full 
+//                and user presses save all in scan stations.
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_fmradio_replace_existing_channels_query
+    {
+    flags = EGeneralQueryFlags;
+    buttons = R_AVKON_SOFTKEYS_YES_NO;
+    items = 
+        { 
+        DLG_LINE 
+            { 
+            type = EAknCtQuery; 
+            id = EGeneralQuery; 
+            control = AVKON_CONFIRMATION_QUERY 
+                { 
+                layout = EConfirmationQueryLayout;
+                label = qtn_fmradio_query_replace_all;
+                }; 
+            }
+        };
+    }
+// ============================== Notes ===================================
+
+//----------------------------------------------------
+// Resource     : r_fmradio_rtplus_firsttime_note
+// Description  : A wait note used while seek is
+//                in progress.
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_fmradio_rtplus_firsttime_note
+    {
+    flags = EGeneralQueryFlags | EEikDialogFlagNoBorder | EEikDialogFlagNoShadow;
+    buttons = R_AVKON_SOFTKEYS_OK_EMPTY;
+    items =
+        {
+        DLG_LINE 
+            {
+            type = EAknCtPopupHeadingPane;
+            id = EAknMessageQueryHeaderId;
+            control = AVKON_HEADING
+                {
+                headinglayout = R_AVKON_WML_SIGN_QUERY_HEADING_PANE;
+                };
+            },
+        DLG_LINE
+            {
+            type = EAknCtMessageQuery;
+            id = EAknMessageQueryContentId;
+            control = AVKON_MESSAGE_QUERY 
+                {
+                };
+            }
+        };
+    }
+
+// ======================== Dynamic menu strings ===========================
+//
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_options_activate
+// Description  : String for a menu item when IHF-
+//                speaker is inactive.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_options_activate  { buf = qtn_fmradio_options_activate; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_options_deactivate
+// Description  : String for a menu item when IHF-
+//                speaker is active.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_options_deactivate    { buf = qtn_fmradio_options_deactivate; }
+
+//----------------------------------------------------
+// Resource     : r_fmradio_options_music_store
+// Description  : Options menu item for music store.
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_fmradio_options_music_store
+    {
+    items =
+        {
+        MENU_ITEM
+            {
+            command = EFMRadioMusicStore;
+            txt = qtn_fmradio_options_music_store;
+            }
+        };
+    }
+
+//----------------------------------------------------
+// Resource     : r_fmradio_options_music_store_with_sub_menu
+// Description  : Sub options menu for music store.
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_fmradio_options_music_store_with_sub_menu
+    {
+    items =
+        {
+        MENU_ITEM
+            {
+            command = EFMRadioMusicStore;
+            txt = qtn_fmradio_options_music_store_submenu;
+            cascade = r_fmradio_options_music_store_sub_menu;
+            }
+        };
+    }
+
+//----------------------------------------------------
+// Resource     : r_fmradio_options_music_store_sub_menu
+// Description  : Sub options menu for music store.
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_fmradio_options_music_store_sub_menu
+    {
+    items =
+        {
+        MENU_ITEM
+            {
+            command = EFMRadioMusicStoreOperator;
+            txt = "";  // Operator Music Store
+            },
+        MENU_ITEM
+            {
+            command = EFMRadioMusicStoreNokiaMusicShop;
+            txt = qtn_fmradio_options_nokia_music_store;
+            }
+        };
+    }
+
+
+// ====================== Strings from fmradio.loc =========================
+//
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_query_offline_use
+// Description  : Prompt text for text query dialog.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_query_offline_use { buf = qtn_fmradio_query_offline_use; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_mem_location_freq
+// Description  : Text including channel index and
+//                frequency. Used in main view.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_mem_location_freq { buf = qtn_fmradio_mem_location_freq; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_mem_location_name
+// Description  : Text including channel index and
+//                channel name. Used in main view.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_mem_location_name { buf = qtn_fmradio_mem_location_name; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_freq
+// Description  : Text to display frequency of current station
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_freq { buf= qtn_fmradio_freq; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_media_idle_freq
+// Description  : Text to display frequency in media idle
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_media_idle_freq { buf= qtn_fmradio_media_idle_freq; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_rds
+// Description  : Text to rds indicator
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_rds { buf = qtn_fmradio_rds; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_af
+// Description  : Text to af indicator
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_af { buf = qtn_fmradio_af; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_rtplus_indicator_text
+// Description  : Text to af indicator
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_rtplus_indicator_text { buf = qtn_fmradio_rtplus; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_rtplus_firsttime
+// Description  : Text to a note which is shown when RT+
+//                interactions become available for the first time.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_rtplus_firsttime { buf = qtn_fmradio_query_rtplus_enabled; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_query_delete
+// Description  : Used in confirmation query when user
+//                is asked to confirm deleting a
+//                channel from the channel list.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_query_delete { buf = qtn_fmradio_query_delete; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_query_delete_mhz
+// Description  : Used in confirmation query when user
+//                is asked to confirm deleting a
+//                channel from the channel list. Used
+//                for frequency if the channel name
+//                is not set
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_query_delete_mhz { buf = qtn_fmradio_query_delete_mhz; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_tuning
+// Description  : A label used while 
+//                tuning is in progress.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_tuning { buf = qtn_fmradio_scanning; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_use_long_tap
+// Description  : Text for the information note that 
+//                will be shown when the channels haven't been saved 
+//                and tryed to change channel.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_use_long_tap { buf = qtn_fmradio_use_long_tap; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_list_query_list_full
+// Description  : If the amount of added stations is about to exceed 
+//                  the limit, a List query is displayed with a prompt 
+//                  text Station list full:
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_list_query_list_full { buf = qtn_fmradio_list_query_list_full; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_error_con_headset
+// Description  : Text for the error note about
+//                a missing headset.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_error_con_headset { buf = qtn_fmradio_error_con_headset; }
+
+//text for the frequence range note. User has selected range manually
+RESOURCE TBUF128 r_qtn_fmradio_conf_freq_band_set_manual { buf = qtn_fmradio_conf_freq_band_set_manual; }
+RESOURCE TBUF128 r_qtn_fmradio_conf_freq_band_set_autom { buf = qtn_fmradio_conf_freq_band_set_autom; }
+RESOURCE TBUF128 r_qtn_fmradio_manual_tune_freq { buf = qtn_fmradio_query_frequency; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_stations_saved
+// Description  : Text "%N stations saved to the stations list." used in Scan Local Stations list.
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_stations_saved { buf = qtn_fmradio_saving_done; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_list_no_stations_found
+// Description  : Text "No stations found. Please try again." 
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_list_no_stations_found { buf = qtn_fmradio_list_no_stations_found; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_no_stations_found
+// Description  : Text "No stations found." 
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_no_stations_found { buf = qtn_fmradio_no_stations_found; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_msk_listen
+// Description  : String for the listen text  
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_msk_listen { buf = qtn_fmradio_msk_listen; }
+
+RESOURCE TBUF r_qtn_fmradio_none { buf = ""; } 
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_list_no_stations
+// Description  : String for empty stations list  
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_list_no_stations { buf = qtn_fmradio_list_no_stations; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_note_fmtx_unable_to_start
+// Description  : FM transmitter is active during radio launch 
+// text         : "FM Radio cannot be started when FM transmitter is on." 
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_note_fmtx_unable_to_start     { buf = qtn_fmradio_note_fmtx_unable_to_start; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_note_fmtx_close_application
+// Description  : 
+// text         : "FM Radio cannot be used when the FM transmitter is on. FM Radio is closed."
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_note_fmtx_close_application   { buf = qtn_fmradio_note_fmtx_close_application; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_saving_done_one
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_saving_done_one  { buf = qtn_fmradio_saving_done_one; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_saving_done_one_no_name
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_saving_done_one_no_name  { buf = qtn_fmradio_saving_done_one_no_name; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_double1_freq
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_double1_freq  { buf = qtn_fmradio_double1_freq; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_double2_freq
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_double2_freq  { buf = qtn_fmradio_double2_freq; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_single_freq
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_single_freq  { buf = qtn_fmradio_single_freq; }
+
+//----------------------------------------------------
+// Resource     : r_qtn_fmradio_single_freq_name
+//----------------------------------------------------
+//
+RESOURCE TBUF r_qtn_fmradio_single_freq_name { buf = qtn_fmradio_single_freq_name; }
+
+// ============================ Application views ============================
+
+// ---------------------------------------------------------------------------
+//    r_fmradio_softkeys_empty_stop
+// ---------------------------------------------------------------------------
+//
+RESOURCE CBA r_fmradio_softkeys_empty_stop
+    {
+    buttons=
+        {
+            CBA_BUTTON { txt = text_softkey_empty; },
+            CBA_BUTTON { id = EAknSoftkeyCancel; txt = text_softkey_stop; }
+        };
+    }
+
+// ---------------------------------------------------------------------------
+//    r_fmradio_softkeys_empty_cancel
+// ---------------------------------------------------------------------------
+//
+RESOURCE CBA r_fmradio_softkeys_empty_cancel
+    {
+    buttons=
+        {
+            CBA_BUTTON { txt = text_softkey_empty; },
+            CBA_BUTTON { id = EAknSoftkeyCancel; txt = text_softkey_cancel; }
+        };
+    }
+
+// Search Stations view
+
+//----------------------------------------------------
+// Resource     : r_fmradio_search_stations__view
+// Description  : Search Stations view. (View ID=4)
+//----------------------------------------------------
+//
+RESOURCE AVKON_VIEW r_fmradio_search_stations_view
+    {
+    menubar = r_fmradio_search_stations_menu;
+    cba = R_AVKON_SOFTKEYS_OPTIONS_BACK;
+    toolbar = r_fmradio_search_stations_toolbar;
+    }
+
+//----------------------------------------------------
+// Resource     : r_fmradio_search_stations_menu
+// Description  : Search Stations menu.
+//----------------------------------------------------
+//
+RESOURCE MENU_BAR r_fmradio_search_stations_menu
+    {
+    titles=
+        {
+        MENU_TITLE { menu_pane = r_fmradio_search_stations_options_menu; txt = ""; }
+        };
+    }
+
+//----------------------------------------------------
+// Resource     : r_fmradio_search_stations_options_menu
+// Description  : Search Stations options menu items.
+//----------------------------------------------------
+//
+RESOURCE MENU_PANE r_fmradio_search_stations_options_menu
+    {
+    items=
+        {
+        MENU_ITEM { command = EFMRadioCmdSaveChannel; txt = qtn_fmradio_options_save; flags = EEikMenuItemSpecific; },
+        MENU_ITEM { command = EFMRadioCmdSaveAllChannels; txt = qtn_fmradio_options_save_all; },
+        MENU_ITEM { command = EFMRadioCmdScanLocalStationsScan; txt = qtn_fmradio_options_search_stations; },
+        MENU_ITEM { command = EFMRadioCmdActivateIhf;   txt = qtn_fmradio_options_activate; },
+        MENU_ITEM { command = EFMRadioCmdDeactivateIhf; txt = qtn_fmradio_options_deactivate; },
+        MENU_ITEM { command = EAknCmdHelp;              txt = qtn_options_help; },
+        MENU_ITEM { command = EAknCmdExit;              txt = qtn_options_exit; }
+        };
+    }
+
+// ---------------------------------------------------------------------------
+// r_fmradio_search_stations_toolbar
+// ---------------------------------------------------------------------------
+//
+RESOURCE AVKON_TOOLBAR r_fmradio_search_stations_toolbar
+    {
+    flags = KAknToolbarTransparent|KAknToolbarWithoutCba|KAknToolbarFixed;
+    items =
+        {
+        TBAR_CTRL
+            {
+            type = EAknCtButton;
+            id = EFMRadioToolbarButtonCmdSaveAll;
+            control = AVKON_BUTTON
+                {
+                states = 
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        helptxt = qtn_fmradio_tooltip_save_all;
+                        bmpfile = KFMRadioBitmapFile;
+                        bmpid = EMbmFmradioQgn_indi_tb_radio_station_save_all;
+                        bmpmask = EMbmFmradioQgn_indi_tb_radio_station_save_all_mask;
+                        extension = r_fmradio_toolbar_save_all_button_state_extension;
+                        }
+                    };
+                };
+            },
+        TBAR_CTRL
+            {
+            type = EAknCtButton;
+            id = EFMRadioToolbarButtonCmdScan;
+            control = AVKON_BUTTON
+                {
+                states = 
+                    {
+                     AVKON_BUTTON_STATE
+                        {
+                        helptxt = qtn_fmradio_tooltip_search_stations;
+                        bmpfile = KFMRadioBitmapFile;
+                        bmpid = EMbmFmradioQgn_indi_tb_radio_scan; 
+                        bmpmask = EMbmFmradioQgn_indi_tb_radio_scan_mask;
+                        extension = r_fmradio_toolbar_scan_button_state_extension;
+                        }
+                    };
+                };
+            },
+        TBAR_CTRL
+            {
+            type = EAknCtButton;
+            id = EFMRadioToolbarButtonCmdToggleIhf;
+            control = AVKON_BUTTON
+                {
+                states = 
+                    {
+                    AVKON_BUTTON_STATE
+                        {
+                        helptxt = qtn_fmradio_tooltip_activate_loudspeaker;
+                        bmpfile = KFMRadioBitmapFile;
+                        bmpid = EMbmFmradioQgn_indi_tb_ihf_on; 
+                        bmpmask = EMbmFmradioQgn_indi_tb_ihf_on_mask;
+                        extension = r_fmradio_toolbar_ihfon_button_state_extension;
+                        },
+                    AVKON_BUTTON_STATE
+                        {
+                        helptxt = qtn_fmradio_tooltip_deactivate_loudspeaker;
+                        bmpfile = KFMRadioBitmapFile;
+                        bmpid = EMbmFmradioQgn_indi_tb_ihf_off; 
+                        bmpmask = EMbmFmradioQgn_indi_tb_ihf_off_mask;
+                        extension = r_fmradio_toolbar_ihfoff_button_state_extension;
+                        }
+                    };
+                };
+            }
+        };
+    }
+
+// ======================== Notes for the Scan Local Stations View ====================
+
+//----------------------------------------------------
+// Resource     : r_fmradio_search_stations_wait_note
+// Description  : A wait note used while station scanning is in progress.
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_fmradio_search_stations_wait_note
+    {
+    flags = EAknWaitNoteFlags;
+    buttons = r_fmradio_softkeys_empty_stop;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+            id = EGeneralNote;
+            control = AVKON_NOTE
+                { 
+                layout = EWaitLayout;
+                singular_label = qtn_fmradio_wait_note_scanning;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                };
+            }
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//   
+//    r_radio_cui_fill_stations_ctx_menubar
+//    Menu bar used by channel list view context sensitive menu.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_fmradio_scan_stations_ctx_menubar
+    {
+    titles =
+        {
+        MENU_TITLE
+            { 
+            menu_pane = r_fmradio_scan_stations_ctx_menu;
+            }
+        };
+    }
+
+RESOURCE MENU_PANE r_fmradio_scan_stations_ctx_menu
+    {
+    items =
+        {
+        MENU_ITEM { command = EFMRadioCmdSaveChannel;   txt = qtn_fmradio_options_save; }
+        };
+    }
+
+// -----------------------------------------------------------------------------
+//   
+//    r_radio_cui_fill_stations_ctx_menubar
+//    Menu bar used by channel list view context sensitive menu.
+//
+// -----------------------------------------------------------------------------
+//
+RESOURCE MENU_BAR r_fmradio_scan_stations_ctx_menubar_save
+    {
+    titles =
+        {
+        MENU_TITLE
+            { 
+            menu_pane = r_fmradio_scan_stations_ctx_menu_save;
+            }
+        };
+    }
+
+RESOURCE MENU_PANE r_fmradio_scan_stations_ctx_menu_save
+    {
+    items =
+        {
+        MENU_ITEM { command = EFMRadioCmdSaveChannel;   txt = qtn_fmradio_options_save; }
+        };
+    }
+
+//----------------------------------------------------
+// Resource     : r_fmradio_search_stations_wait_note
+// Description  : A wait note used while station scanning is in progress.
+//----------------------------------------------------
+//
+RESOURCE DIALOG r_fmradio_search_stations_wait_cancel_note
+    {
+    flags = EAknWaitNoteFlags;
+    buttons = r_fmradio_softkeys_empty_cancel;
+    items =
+        {
+        DLG_LINE
+            {
+            type = EAknCtNote;
+            id = EGeneralNote;
+            control = AVKON_NOTE
+                { 
+                layout = EWaitLayout;
+                singular_label = qtn_fmradio_wait_note_scanning;
+                animation = R_QGN_GRAF_WAIT_BAR_ANIM;
+                };
+            }
+        };
+    }
+// ---------------------------------------------------------------------------
+// r_fmradio_wait_anim_tuning
+// Tuning animation.
+// ---------------------------------------------------------------------------
+//
+RESOURCE FMRADIO_BITMAP_ANIMATION r_fmradio_wait_anim_tuning
+    {
+    frameInterval = 20;
+    frames = 
+        {
+        FMRADIO_FADABLE_ICON
+            {
+            bmpfile = KFMRadioBitmapFile;
+            bitmap = EMbmFmradioQgn_graf_ring_wait_01;
+            mask = EMbmFmradioQgn_graf_ring_wait_01_mask;
+            },
+        FMRADIO_FADABLE_ICON
+            {
+            bmpfile = KFMRadioBitmapFile;
+            bitmap = EMbmFmradioQgn_graf_ring_wait_02;
+            mask = EMbmFmradioQgn_graf_ring_wait_02_mask;
+            },
+        FMRADIO_FADABLE_ICON
+            {
+            bmpfile = KFMRadioBitmapFile;
+            bitmap = EMbmFmradioQgn_graf_ring_wait_03;
+            mask = EMbmFmradioQgn_graf_ring_wait_03_mask;
+            },
+        FMRADIO_FADABLE_ICON
+            {
+            bmpfile = KFMRadioBitmapFile;
+            bitmap = EMbmFmradioQgn_graf_ring_wait_04;
+            mask = EMbmFmradioQgn_graf_ring_wait_04_mask;
+            },
+        FMRADIO_FADABLE_ICON
+            {
+            bmpfile = KFMRadioBitmapFile;
+            bitmap = EMbmFmradioQgn_graf_ring_wait_05;
+            mask = EMbmFmradioQgn_graf_ring_wait_05_mask;
+            },
+        FMRADIO_FADABLE_ICON
+            {
+            bmpfile = KFMRadioBitmapFile;
+            bitmap = EMbmFmradioQgn_graf_ring_wait_06;
+            mask = EMbmFmradioQgn_graf_ring_wait_06_mask;
+            },
+        FMRADIO_FADABLE_ICON
+            {
+            bmpfile = KFMRadioBitmapFile;
+            bitmap = EMbmFmradioQgn_graf_ring_wait_07;
+            mask = EMbmFmradioQgn_graf_ring_wait_07_mask;
+            },
+        FMRADIO_FADABLE_ICON
+            {
+            bmpfile = KFMRadioBitmapFile;
+            bitmap = EMbmFmradioQgn_graf_ring_wait_08;
+            mask = EMbmFmradioQgn_graf_ring_wait_08_mask;
+            },
+        FMRADIO_FADABLE_ICON
+            {
+            bmpfile = KFMRadioBitmapFile;
+            bitmap = EMbmFmradioQgn_graf_ring_wait_09;
+            mask = EMbmFmradioQgn_graf_ring_wait_09_mask;
+            },
+        FMRADIO_FADABLE_ICON
+            {
+            bmpfile = KFMRadioBitmapFile;
+            bitmap = EMbmFmradioQgn_graf_ring_wait_10;
+            mask = EMbmFmradioQgn_graf_ring_wait_10_mask;
+            }
+        };
+    } 
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/data/fmradio_caption.rss	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,25 @@
+/*
+* Copyright (c) 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:  FM Radio UI
+*
+*/
+
+#include <fmradio.loc>
+#include <apcaptionfile.rh>
+
+RESOURCE CAPTION_DATA
+    {
+    caption = qtn_fmradio_app_menu_list;
+    shortcaption = qtn_fmradio_app_menu_grid;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/data/fmradio_reg.rss	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,35 @@
+/*
+* 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:  FMRadio
+*
+*/
+
+
+#include <appinfo.rh>
+#include <fmradio.rsg>
+#include <bldvariant.hrh>
+#include <data_caging_paths_strings.hrh>
+
+UID2 KUidAppRegistrationResourceFile
+UID3 0x10207A89  // MyApp UID
+
+RESOURCE APP_REGISTRATION_INFO
+    {
+    app_file = "fmradio";
+    embeddability=KAppNotEmbeddable;
+    newfile=KAppDoesNotSupportNewFile;
+           
+    localisable_resource_file = APP_RESOURCE_DIR"\\fmradio";
+    localisable_resource_id = R_FMRADIO_LOCALISABLE_APP_INFO;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/group/bld.inf	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,51 @@
+/*
+* 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 the information required for building the
+*               FMRadio application.
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+// stub sis
+../../sis/fmradio_default/stub.sis  /epoc32/data/z/system/install/fmradio_stub.sis
+../inc/fmradiocommandlineparams.h   APP_LAYER_PLATFORM_EXPORT_PATH(fmradiocommandlineparams.h)
+../inc/fmradiouids.h                APP_LAYER_PLATFORM_EXPORT_PATH(fmradiouids.h)
+
+// iby file
+../rom/fmradio.iby            CORE_APP_LAYER_IBY_EXPORT_PATH(fmradio.iby)
+../rom/fmradioresources.iby   LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(fmradioresources.iby)
+
+PRJ_EXTENSIONS
+
+START EXTENSION s60/mifconv
+OPTION TARGETFILE fmradio.mif
+OPTION HEADERFILE fmradio.mbg
+OPTION SOURCEDIR ../aif
+OPTION SOURCEFILE iconlist.txt
+END
+
+START EXTENSION s60/mifconv
+OPTION TARGETFILE fmradio_aif.mif
+OPTION SOURCES -c8,8 qgn_menu_radio
+END
+
+PRJ_MMPFILES
+
+fmradio.mmp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/group/fmradio.mmp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,118 @@
+/*
+* 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:  Project definition file for project FMRadio
+*
+*/
+
+
+
+#include <bldvariant.hrh>
+#include <data_caging_paths.hrh>
+
+#include <platform_paths.hrh>
+TARGET  fmradio.exe
+TARGETTYPE  exe
+epocstacksize 0x10000
+
+UID  0x100039CE 0x10207A89
+
+VENDORID    VID_DEFAULT 
+CAPABILITY  CAP_APPLICATION MultimediaDD ReadUserData
+
+PAGED
+
+START RESOURCE ../data/fmradio.rss
+HEADER
+TARGETPATH APP_RESOURCE_DIR
+LANGUAGE_IDS
+END  //RESOURCE
+
+START RESOURCE ../data/fmradio_reg.rss
+DEPENDS fmradio.rsg
+TARGETPATH /private/10003a3f/import/apps
+END
+
+SOURCEPATH      ../src
+
+SOURCE  fmradioalfbitmapanimation.cpp
+SOURCE  fmradioalfindicator.cpp
+SOURCE  fmradioalfmediaidle.cpp
+SOURCE  fmradioalfvisualizer.cpp
+SOURCE  fmradioapp.cpp
+SOURCE  fmradioappui.cpp
+SOURCE  fmradiobacksteppingservicewrapper.cpp
+SOURCE  fmradiochannellistview.cpp
+SOURCE  fmradiochannellistcontainer.cpp
+SOURCE  fmradiocontroleventobserverimpl.cpp
+SOURCE  fmradiodocument.cpp
+SOURCE  fmradiomaincontainer.cpp
+SOURCE  fmradiomainview.cpp
+SOURCE  fmradiosvkevents.cpp
+SOURCE  fmradioglobalconfirmationquery.cpp
+SOURCE  fmradioscanlocalstationsview.cpp
+SOURCE  fmradioscanlocalstationscontainer.cpp
+SOURCE  fmradiofrequencyeditor.cpp
+SOURCE  fmradiofrequencynumber.cpp
+SOURCE  fmradiofrequencyquerycontrol.cpp
+SOURCE  fmradiofrequencyquerydialog.cpp
+SOURCE  fmradioalfrdsviewer.cpp
+SOURCE  fmradiomusicstorehandler.cpp
+SOURCE  fmradiopreset.cpp
+SOURCE  fmradioidlecontroller.cpp
+SOURCE  fmradiologo.cpp
+
+USERINCLUDE  ../inc
+USERINCLUDE  ../../inc
+USERINCLUDE  ../../fmradioengine/inc
+USERINCLUDE  ../../help/inc 
+
+APP_LAYER_SYSTEMINCLUDE
+
+LIBRARY aknnotify.lib
+LIBRARY alfclient.lib
+LIBRARY euser.lib 
+LIBRARY apparc.lib 
+LIBRARY cone.lib 
+LIBRARY eikcore.lib 
+LIBRARY eikdlg.lib 
+LIBRARY ws32.lib 
+LIBRARY eikcoctl.lib 
+LIBRARY avkon.lib 
+LIBRARY efsrv.lib 
+LIBRARY featmgr.lib
+LIBRARY bafl.lib 
+LIBRARY commonengine.lib 
+LIBRARY aknskins.lib 
+LIBRARY egul.lib 
+LIBRARY eikctl.lib 
+LIBRARY fmradioengine.lib
+LIBRARY hlplch.lib 
+LIBRARY cdlengine.lib
+LIBRARY apgrfx.lib
+LIBRARY remconcoreapi.lib
+LIBRARY remconinterfacebase.lib
+LIBRARY remconextensionapi.lib
+LIBRARY gdi.lib
+LIBRARY numberconversion.lib 
+LIBRARY aknlayout2.lib       
+LIBRARY aknlayout2scalable.lib
+LIBRARY hwrmlightclient.lib
+LIBRARY iaupdateapi.lib
+LIBRARY liwservicehandler.lib
+LIBRARY centralrepository.lib
+LIBRARY ecom.lib
+LIBRARY gesturehelper.lib
+LIBRARY touchfeedback.lib
+
+DEBUGLIBRARY flogger.lib
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/group/iconlist.txt	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,38 @@
+-c24,8 qgn_indi_radio_default.svg
+-c8,8 qgn_indi_tb_radio_previous.svg
+-c8,8 qgn_indi_tb_radio_next.svg
+-c8,8 qgn_indi_tb_radio_scan.svg
+-c8,8 qgn_indi_tb_radio_station_save.svg
+-c8,8 qgn_indi_tb_radio_station_save_all.svg
+-c8,8 qgn_indi_radio_playing.svg
+-c24,8 qgn_menu_radio.svg
+-c8,8 qgn_graf_ring_wait_01.svg
+-c8,8 qgn_graf_ring_wait_02.svg
+-c8,8 qgn_graf_ring_wait_03.svg
+-c8,8 qgn_graf_ring_wait_04.svg
+-c8,8 qgn_graf_ring_wait_05.svg
+-c8,8 qgn_graf_ring_wait_06.svg
+-c8,8 qgn_graf_ring_wait_07.svg
+-c8,8 qgn_graf_ring_wait_08.svg
+-c8,8 qgn_graf_ring_wait_09.svg
+-c8,8 qgn_graf_ring_wait_10.svg
+-c8,8 qgn_prop_msk_menu.svg
+-c8,8 qgn_prop_image_tb_prev.svg
+-c8,8 qgn_prop_image_tb_next.svg
+-c8,8 qgn_prop_image_tb_prev_dimmed.svg
+-c8,8 qgn_prop_image_tb_next_dimmed.svg
+-c8,8 qgn_indi_music_widget_tb_radio_sound.svg
+-c8,8 qgn_indi_music_widget_tb_radio_sound_dimmed.svg
+-c8,8 qgn_indi_music_widget_tb_radio_sound_muted.svg
+-c8,8 qgn_indi_music_widget_tb_radio_sound_muted_dimmed.svg
+-c8,8 qgn_indi_radio_tb_list.svg
+-c8,8 qgn_indi_tb_rename.svg
+-c8,8 qgn_indi_cam4_tb_delete.svg
+-c8,8 qgn_indi_tb_ihf_on.svg
+-c8,8 qgn_indi_tb_ihf_off.svg
+-c8,8 qgn_indi_radio_tb_manualtune.svg
+-c8,8 qgn_indi_radio_tb_mshop.svg
+-c8,8 qgn_indi_radio_tb_gotoweb.svg
+-c8,8 qgn_note_radio_jackmini.svg
+-c8,8 qgn_indi_tb_ovi_music.svg
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/debug.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,114 @@
+/*
+* 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:  Central place for nice debug-type macros & functions
+*
+*
+*/
+
+
+#ifndef FMRADIO_DEBUG_H
+#define FMRADIO_DEBUG_H
+
+#ifdef _DEBUG
+
+#ifdef __WINS__
+#define __CLOGGING__
+// File logging for WIS
+//#define __FLOGGING__
+
+#else
+
+// Logging with RDebug for target HW
+#define __CLOGGING__
+//#define __FLOGGING__
+
+#endif //__WINS__
+
+#endif
+
+#if defined ( __FLOGGING__ )
+
+_LIT(KLogFile,"FMRadioLog.txt");
+_LIT(KLogDir,"FMRadio");
+
+#include <f32file.h>
+#include <flogger.h>
+
+#define FLOG(a) {FPrint(a);}
+
+#define FLOGHEX(value, len) {RFileLogger::HexDump(KLogDir, KLogFile, EFileLoggingModeAppend, "", " ",value, len);}
+
+#define FDEBUGVAR(a) a
+#define FTRACE(a) {a;}
+
+#define FDEBUGVAR(a) a
+
+// 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 FHex(const TUint8* aPtr, TInt aLen)
+{
+    RFileLogger::HexDump(KLogDir, KLogFile, EFileLoggingModeAppend, 0, 0, aPtr, aLen);
+}
+
+inline void FHex(const TDesC8& aDes)
+{
+    FHex(aDes.Ptr(), aDes.Length());
+}
+
+// RDebug logging
+#elif defined(__CLOGGING__)
+
+#include <e32svr.h>
+
+#define FLOG(a) {RDebug::Print(a);}
+
+#define FLOGHEX(a)
+
+#define FDEBUGVAR(a) a
+#define FTRACE(a) {a;}
+
+#define FDEBUGVAR(a) a
+
+// Declare the FPrint function
+
+inline void FPrint(const TRefByValue<const TDesC> 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);
+}
+
+
+#else   // No loggings --> reduced code size
+#define FLOG(a)
+#define FLOGHEX(a)
+#define FDEBUGVAR(a)
+#define FTRACE(a)
+#define FDEBUGVAR(a)
+
+#endif //_DEBUG
+
+#endif // FMRADIO_DEBUG_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradio.hrh	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,151 @@
+/*
+* Copyright (c) 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:  This file contains declarations for constants of FMRadio.
+*					The file can be included in C++ or resource file.
+*
+*/
+
+
+#ifndef FMRADIO_HRH
+#define FMRADIO_HRH
+
+enum TFMRadioViewCBAButtons // CBA button ID's
+    {
+    EIdCBAStop = 550
+    };
+
+enum TFMRadioCommandIds // Menu command ID's
+    {
+    // Main menu commands
+    EFMRadioCmdChannelList = 600,
+    EFMRadioCmdSeekUp,
+    EFMRadioCmdSeekDown,
+    EFMRadioCmdScanLocalStations,
+    EFMRadioCmdSaveChannel,
+    EFMRadioCmdSettings,
+    EFMRadioCmdOpenAFSubmenu,
+
+    //RT+
+    EMPXPbvCmdInternet,
+    EMPXPbvCmdInternetGoogle,
+    EMPXPbvCmdInternetWikipedia,
+    EMPXPbvCmdInternetAmg,
+    EMPXPbvCmdInternetNokiaMusicStore,
+    EMPXPbvCmdInternetMusicPortl,
+    EMPXPbvCmdInternetGoToWeb,
+    
+    // Channel list menu commands
+    EFMRadioCmdErase,
+    EFMRadioCmdRename,
+    EFMRadioCmdListenCh,
+    
+    // Manual tuning menu commands
+    EFMRadioCmdTuneManually,
+    EFMRadioCmdClose,
+        
+    // Scan local stations menu commands
+    EFMRadioCmdSaveAllChannels,
+    EFMRadioCmdScanLocalStationsScan,
+
+    // Used in both menus
+    EFMRadioCmdActivateIhf,
+    EFMRadioCmdDeactivateIhf,
+    EFMRadioCmdHelp,
+    EFMRadioCmdExitApp,
+    
+    // Move commands
+    EFMRadioCmdMove,
+    EFMRadioCmdDone,
+    EFMRadioCmdDrop,
+    EFMRadioCmdGrap,
+    
+
+    // General commands
+    EFMRadioCmdNextChannel,
+    EFMRadioCmdPrevChannel,
+    EFMRadioCmdRecord,
+    EFMRadioCmdStop,//620
+    EFMRadioCmdUpdateVolume,
+    EFMRadioCmdStopTuning,
+    EFMRadioCmdScanLocalStationsViewActive,
+    EFMRadioCmdChannelListViewActive,
+    EFMRadioCmdMainViewActive,
+    EFMRadioCmdMuteOn,
+    EFMRadioCmdMuteOff,
+    EFMRadioCmdMute,
+    EFMRadioCmdEnableRdsAfSearch,
+    EFMRadioCmdDisableRdsAfSearch,
+    
+    //toolbar
+    EFMRadioToolbarButtonCmdTuneDown,
+    EFMRadioToolbarButtonCmdTuneUp,
+    EFMRadioToolbarButtonCmdExtensionList,
+    EFMRadioToolbarButtonCmdAutoSeekDown,
+    EFMRadioToolbarButtonCmdAutoSeekUp,
+    EFMRadioToolbarButtonCmdSaveAll,
+    EFMRadioToolbarButtonCmdScan,
+    EFMRadioToolbarButtonCmdToggleIhf,
+    EFMRadioToolbarButtonCmdNokiaMusicStore,
+    EFMRadioToolbarButtonCmdOperatorMusicStore,
+    EFMRadioChannelListToolbarButtonCmdSearchStations,
+    
+    //rocker
+    EFMRadioRockerButtonKeyLeft,
+    EFMRadioRockerButtonKeyLeftLong,
+    EFMRadioRockerButtonKeyRight,
+    EFMRadioRockerButtonKeyRightLong,
+    EFMRadioRockerButtonKeyUp,
+    EFMRadioRockerButtonKeyDown
+    };
+
+enum TFMRadioNoteDialog
+    {
+    EHeadsetErrorNote = 750,
+    EChNotFoundInformationNote
+    };
+
+enum TFMRadioStationChangeType
+	{
+	EFMRadioStationChangeNone = 950,
+	EFMRadioStationChangeNext, 
+	EFMRadioStationChangePrevious,
+	EFMRadioStationChangeScanUp,
+	EFMRadioStationChangeScanDown
+	};
+	
+enum
+    {
+    EFMRadioFrequencyEditor = 0x2000,
+    EFMRadioCtFrequencyQuery
+    };
+
+enum TFMRadioCancelScanType
+    {
+    EFMRadioCancelScanDefault = 0,
+    EFMRadioCancelScanBySoftkey,
+    EFMRadioCancelScanByHeadsetDisconnect
+    };
+
+enum TFMRadioMusicStoreCommandIds
+    {
+    EFMRadioMusicStore = 40567,
+    EFMRadioMusicStoreGoogle,
+    EFMRadioMusicStoreWikipedia,
+    EFMRadioMusicStoreAmg,
+    EFMRadioMusicStoreNokiaMusicShop,
+    EFMRadioMusicStoreMusicPortl,
+    EFMRadioMusicStoreOperator
+    };
+
+#endif      // FMRADIO_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradioalfbitmapanimation.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,155 @@
+/*
+* 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:  Tuning animation for RadioGaGa
+*
+*/
+
+
+#ifndef CMFRADIOALFBITMAPANIMATION_H
+#define CMFRADIOALFBITMAPANIMATION_H
+
+
+// INCLUDES
+
+#include <alf/alfcontrol.h>
+
+
+// FORWARD DECLARATIONS
+
+class CAlfImageVisual;
+class CAlfAnchorLayout;
+
+
+// CONSTANTS
+
+
+/**
+ * Alf control to show tuning animation
+ */
+class CFMRadioAlfBitmapAnimation : public CAlfControl
+    {
+
+	public:			
+	    /**
+	     * Two-phased constructor.
+	     * @param aEnv Alf environment
+	    */
+	    static CFMRadioAlfBitmapAnimation* NewL( CAlfEnv& aEnv );	    
+	    /**
+	     * Destructor.
+	     */
+	    virtual ~CFMRadioAlfBitmapAnimation();
+			
+	public: // from base class 
+		/**
+ 	     * From CAlfControl, takes care of alfred event handling.
+ 	     */
+		TBool OfferEventL( const TAlfEvent& aEvent );	
+
+	public: // New functions
+				/**
+		* Shows the indicator with the defined opacity value.
+		* @param aShowWithFading ETrue if the indicator will be shown with fading; EFalse otherwise.
+		* @see SetOpacityInVisibleState()
+		*/
+		void Show( TBool aShowWithFading );
+		/**
+		* Hides the indicator with the defined opacity value.
+		* @param aHideWithFading ETrue if the indicator will be hidden with fading; EFalse otherwise. 
+		* @see SetOpacityInHiddenState()
+		*/
+		void Hide( TBool aHideWithFading );								
+		/** 
+		* Sets the indicator rectangle
+		* @param aRect Rectangle to the indicator
+	    */	
+		void SetRect( const TRect& aRect );
+		/**
+		* Starts bitmap animation after delay and
+		* fades it in while animation is running
+		*/
+		void StartBmpAnimation();
+		/**
+		* Stops bitmap animation after delay and
+		* fades it out while animation is running		
+		*/
+		void StopBmpAnimation();
+
+	private:
+		// Custom events for the bitmap animation. 
+		enum TBmpAnimationCustomEvent
+			{
+			EBmpAnimationStart,
+			EBmpAnimationContinue,
+			EBmpAnimationStop
+			};
+				
+		enum TBmpAnimationRunningState
+		    {
+		    EBmpAnimationStopped,
+		    EBmpAnimationStartup,
+		    EBmpAnimationRunning
+		    };
+		
+		void StartAnimation();
+
+	    CFMRadioAlfBitmapAnimation();
+
+	    void ConstructL( CAlfEnv& aEnv );
+	
+		void CreateImageAnimationVisualL();
+		
+		void CreateBitmapAnimationArrayL();	
+						
+		void ContinueBmpAnimation();
+		
+		/**
+	    * Sets absolute rect of the anchor by top left and bottom right points.
+	    * @param aAnchor Anchor layout for setting placement
+	    * @param aOrdinal Index of visual element
+	    * @param aTopLeftPosition Top left point of the rect
+	    * @param aBottomRightPosition Bottom right point of the rect
+	    */
+		void SetAbsoluteCornerAnchors( CAlfAnchorLayout* aAnchor,
+									   TInt aOrdinal,
+								       const TPoint& aTopLeftPosition,
+									   const TPoint& aBottomRightPosition );
+
+	private: // data
+
+		// Visual containing current frame
+		CAlfImageVisual* iAnimationImageVisual;
+		// Animation frame array
+		RArray<TAlfImage> iFrames;
+		// Interval to change frames
+		TInt iFrameInterval;
+		// mbm file for bitmaps
+		HBufC* iBitmapFileName;			    	 
+	    /** Anchor layout for Bmpanimation */
+	    CAlfAnchorLayout* iBmpAnimationAnchor;
+	    TInt iCurrentFrameIndex;
+	   	/** Bmpanimation opacity in visible state */
+	    TReal iOpacityInVisibleState;
+	    /** Bmpanimation opacity in hidden state */
+	    TReal iOpacityInHiddenState;
+	   	/** Bmpanimation rectangle */
+	    TRect iRect;
+	    /** Animation state */
+	    TBmpAnimationRunningState iAnimationState;
+	    
+	    	
+    };
+
+
+#endif // CMFRADIOALFBITMAPANIMATION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradioalfindicator.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,188 @@
+/*
+* 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:  Definition of the class CFMRadioAlfIndicator.
+*
+*/
+
+
+#ifndef ALF_INDICATOR_H
+#define ALF_INDICATOR_H
+
+// INCLUDES
+
+#include <AknUtils.h>
+#include <alf/alfcontrol.h>
+#include <alf/alfanchorlayout.h>
+
+// FORWARD DECLARATIONS
+
+class CAlfTextVisual;
+
+// CLASS DEFINITION
+
+/**
+* Text indicator control class
+* 
+* Provides means to show and fade in/out a specific text inside the supplied "layout".
+* 
+*/ 
+class CFMRadioAlfIndicator : public CAlfControl
+	{
+public:		// Constructors and destructor
+
+		/**
+	    * Epoc two-phased constructor.
+	    * @param aEnv Reference to the HitchCock environment instance.
+        * @return Pointer to this Indicator component.
+	    */
+		static CFMRadioAlfIndicator* NewL( CAlfEnv& aEnv );
+		/**
+        * Destructor
+        */
+		virtual ~CFMRadioAlfIndicator();
+public: 	// Functions from base classes		
+		/**
+ 	    * From CAlfControl, takes care of alfred event handling.
+ 	    * @param aEvent
+ 	    */
+		TBool OfferEventL( const TAlfEvent& aEvent );	
+public:		// New functions	
+		/**
+		* Shows the indicator with the defined opacity value.
+		* @param aShowWithFading ETrue if the indicator will be shown with fading; EFalse otherwise.
+		* @see SetOpacityInVisibleState()
+		*/
+		void Show( TBool aShowWithFading );
+		/**
+		* Hides the indicator with the defined opacity value.
+		* @param aHideWithFading ETrue if the indicator will be hidden with fading; EFalse otherwise. 
+		* @see SetOpacityInHiddenState()
+		*/
+		void Hide( TBool aHideWithFading );	
+		/**
+	    * Sets the indicator opacity in visible state.
+	    * @param aOpacity The indicator opacity
+	    */
+		void SetOpacityInVisibleState( const TReal aOpacity );
+		/**
+	    * Sets the indicator opacity in hidden state.
+	    * @param aOpacity The indicator opacity
+	    */
+		void SetOpacityInHiddenState( const TReal aOpacity );	
+		/**
+	    * Sets the indicator text.
+	    * @param aText The indicator text to be shown
+	    */
+		void SetTextL( const TDesC& aText );
+		/**
+	    * Changes indicator text color
+	    * @param aTextColor Color of the indicator text
+	    */		
+		void SetTextColor( const TRgb& aTextColor );
+		/** 
+		* Sets the indicator rectangle
+		* @param aRect Rectangle to the indicator
+	    */	
+		void SetRect( const TRect& aRect );
+private:
+		/**
+		* C++ default constructor
+		*/
+		CFMRadioAlfIndicator( );
+		/**
+	    * EPOC second phase constructor.
+	    * @param aEnv Reference to the Hitchcock environment instance.
+	    */
+		void ConstructL( CAlfEnv& aEnv );
+private:	// New functions
+		/**
+	    * Sets the fading animation to the CAlfVisual object.
+	    * @param aVisual a pointer to the visual object
+	    * @param aFadingTime Time duration after the visual object has been faded. Fading duration in milliseconds. 
+	    * @param aOpacity Target opacity value
+	    */
+		void Fade( CAlfVisual* aVisual, TInt aFadingTime, TReal aOpacity ) const;
+		/**
+	    * Sets absolute rect of the anchor by top left and bottom right points.
+	    * @param aAnchor Anchor layout for setting placement
+	    * @param aOrdinal Index of visual element
+	    * @param aTopLeftPosition Top left point of the rect
+	    * @param aBottomRightPosition Bottom right point of the rect
+	    */
+		void SetAbsoluteCornerAnchors( CAlfAnchorLayout* aAnchor,
+									   TInt aOrdinal,
+								       const TPoint& aTopLeftPosition,
+									   const TPoint& aBottomRightPosition );
+        /**
+	    * Sets absolute rect of the anchor by top left and size of the rect.
+	    * @param aAnchor Anchor layout for setting placement
+	    * @param aOrdinal Index of visual element
+	    * @param aTopLeftPosition Top left point of the rect
+	    * @param aSize Size of the rect
+	    */	
+		void SetAbsoluteCornerAnchors( CAlfAnchorLayout* aAnchor,
+									   TInt aOrdinal,
+									   const TPoint& aTopLeftPosition,
+									   const TSize& aSize );
+		/**
+	    * Sets relative rect of the anchor by top left and bottom right points.
+	    * @param aAnchor Anchor layout for setting placement
+	    * @param aOrdinal Index of visual element
+	    * @param aTopLeftPosition Top left point of the rect
+	    * @param aBottomRightPosition Bottom right point of the rect
+	    */
+		void SetRelativeCornerAnchors( CAlfAnchorLayout* aAnchor,
+									   TInt aOrdinal,
+									   const TAlfRealPoint& aTopLeftPosition,
+									   const TAlfRealPoint& aBottomRightPosition );
+		/**
+	    * Sets relative rect of the anchor by top left and size of the rect.
+	    * @param aAnchor Anchor layout for setting placement
+	    * @param aOrdinal Index of visual element
+	    * @param aTopLeftPosition Top left point of the rect
+	    * @param aSize Size of the rect
+	    */
+		void SetRelativeCornerAnchors( CAlfAnchorLayout* aAnchor, 
+									   TInt aOrdinal, 
+									   const TAlfRealPoint& aTopLeftPosition, 
+									   const TAlfRealSize& aSize );	
+ 		/** 
+	    * Creates the needed drawing layers and visual objects
+		* for the indicator.
+	    */
+		void AddIndicatorLayerL();
+		/**
+ 	    * Creates the text style for the indicator
+ 	    */
+		void SetTextStyleL();
+		
+private:	// Data
+	    	 
+	    /** Anchor layout for indicator */
+	    CAlfAnchorLayout* iIndicatorTextAnchor;
+	    /** Visual object of the indicator. Not owned. */
+	    CAlfTextVisual* iText;   		
+	    /** Text color of the indicator text */
+	    TRgb iTextColor;	    
+	    /** Text style id of the indicator text */
+	    TInt iTextStyleId;
+	    /** Indicator opacity in visible state */
+	    TReal iOpacityInVisibleState;
+	    /** Indicator opacity in hidden state */
+	    TReal iOpacityInHiddenState;
+	    /** Indicator rectangle */
+	    TRect iRect;    	  
+	};
+
+#endif //ALF_INDICATOR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradioalfmediaidle.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,373 @@
+/*
+* 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:  Definition of the class CFMRadioAlfMediaIdle.
+*
+*/
+
+
+#ifndef FMRADIOALFMEDIAIDLE_H_
+#define FMRADIOALFMEDIAIDLE_H_
+
+// INCLUDES
+
+#include <AknUtils.h>
+#include <alf/alfcontrol.h>
+#include <alf/alfanchorlayout.h>
+
+#include "fmradioidlecontrolinterface.h"
+
+// FORWARD DECLARATIONS
+
+class CAlfGradientBrush;
+class CAlfEnv;
+class CAlfVisual;
+
+// CONSTANTS
+
+// CLASS DEFINITIONS
+
+/**
+* CFMRadioAlfMediaIdle class
+* 
+* Class launches animated information in the defined subregion of the display. 
+*/ 
+NONSHARABLE_CLASS(CFMRadioAlfMediaIdle) : public CAlfControl,
+                                          public MFMRadioIdleControlInterface
+	{
+public:		// Constructors and destructor
+
+		/** Display orientations. */
+		enum TOrientation
+			{
+			EPortrait = 0x4A, 
+			ELandscape,
+			EOrientationNone
+			};
+			
+		/**
+	    * Epoc two-phased constructor.
+	    * @param aEnv Reference to Alfred environment instance.
+        * @return Pointer to this media idle component.
+	    */
+		static CFMRadioAlfMediaIdle* NewL( CAlfEnv& aEnv );
+		/**
+        * Destructor
+        */
+		virtual ~CFMRadioAlfMediaIdle();
+public: 	// Functions from base classes		
+		/**
+ 	    * From CAlfControl, takes care of alfred event handling.
+ 	    */
+		TBool OfferEventL( const TAlfEvent& aEvent );	
+		
+public:		// New functions
+		
+		/** Media idle modes. */
+		enum TMediaIdleMode
+			{
+			EOnlyBackgroundText = 0xB0, 
+			EBackgroundTextAndMediaIdleItems
+			};
+				
+		/**
+ 	    * Adds media idle item text to be used in the media idle
+ 	    * @param aMediaIdleItemText Text of the media idle item
+ 	    */								   
+		void AddMediaIdleContentL( const TDesC& aMediaIdleItemText );
+		/**
+	    * Removes all media idle item texts
+		*/			
+		void ResetMediaIdleContent();
+		/**
+	    * Returns number of media idle content items
+	    * @return content count
+		*/	
+		TInt MediaIdleContentCount() const;
+		/**
+	    * Sets the mode request for mode change. The mode 
+	    * will be changed as soon as possible. 
+	    * @param aRequestedMode Requested mode
+		*/
+		void SetModeChangeRequestL( TMediaIdleMode aRequestedMode );
+		/**
+	    * Retrieves the media idle mode
+		*/
+		CFMRadioAlfMediaIdle::TMediaIdleMode Mode();
+		/**
+ 	    * Sets primary color for the media idle
+ 	    * @param aColor The color that is used as primary color of media idle
+ 	    */
+		void SetPrimaryColor( const TRgb& aColor );
+		/**
+ 	    * Sets secondary color for the media idle
+ 	    * @param aColor The color that is used as secondary color of media idle
+ 	    */
+		void SetSecondaryColor( const TRgb& aColor ); 
+
+		/**
+ 	    * Return orientation of the display
+ 	    */
+		CFMRadioAlfMediaIdle::TOrientation Orientation();
+		/**
+ 	    * Set orientation of the display
+ 	    * @param aOrientation The display orientation
+ 	    */
+		void SetOrientation( TOrientation aOrientation );		
+		/** 
+		* Calculates display layout
+	    */			
+		void UpdateLayout();
+		/** 
+		* Adds PS name to the media idle item array
+	    */	
+        void AddPsNameToMediaIdleL( const TDesC& aPsName );
+
+private:
+		/**
+		* C++ default constructor
+		*/
+		CFMRadioAlfMediaIdle( );
+		/**
+	    * EPOC second phase constructor.
+	    * @param aEnv Reference to the Hitchcock environment instance.
+	    */
+		void ConstructL( CAlfEnv& aEnv );
+		
+private:	// New functions
+
+		/** Scroll directions for the media idle item. */
+		enum TMediaIdleItemScrollDirection
+			{	
+			EScrollLeftToRight = 0xA0,
+			EScrollRightToLeft,
+			EScrollNone
+			};
+			
+        /** States of media idle. */
+        enum TMediaIdleState
+            {
+            ERunning = 0xA0,
+            EStopped
+            };
+            
+        /** Custom events for the media idle. */
+        enum TMediaIdleCustomEvent
+            {
+            EMediaIdleItemTransformationEnd = 0x5B,
+            EMediaIdleBackgroundTextScrollEnd,
+            EMediaIdleFadeOutAnimationEnd,
+            EMediaIdleChangeMode,
+            EMediaIdleEventNone
+            };
+        
+        /**
+        * Launches media idle immediately.
+        */	
+        void StartMediaIdleL();	
+		/**
+ 	    * Creates media idle with passed number of the media idle items
+ 	    * @param aNumberOfMediaIdleItems Number of the media idle items
+ 	    */
+		void AddMediaIdleL( const TInt aNumberOfMediaIdleItems );
+		/**
+ 	    * Creates the media idle item to the passed media idle view port.
+ 	    * @param aMediaIdle The view port of the media idle
+ 	    * @param aMediaIdleItemText Text of the media idle item
+ 	    * @param aMediaIdleItemHasBackground TBool to indicate background visibility
+ 	    * @param aBackgroundColor The background color of the media idle item
+ 	    * @param aBackgroundOpacity The background opacity of the media idle item
+ 	    */
+		CAlfTextVisual* AddMediaIdleItemL( CAlfLayout* aMediaIdle, 
+										   const TDesC& aMediaIdleItemText, 
+									       TBool aMediaIdleItemHasBackground = EFalse, 
+										   const TRgb& aBackgroundColor = KRgbWhite, 
+										   const TReal aBackgroundOpacity = 0.5f );
+		/**
+ 	    * Initializes the media idle items
+ 	    * @param aNumberOfMediaIdleItems Number of the media idle items
+ 	    */
+		void InitializeMediaIdleItemsL( const TInt aNumberOfMediaIdleItems );
+		/**
+ 	    * Sets defined animation to the created media idle items
+ 	    */
+		void AnimateMediaIdleItems();		
+		/**
+ 	    * Retrieves text from randomly chousen media idle item
+ 	    */	
+		HBufC* GetRandomMediaIdleContentL();
+		/**
+ 	    * Sets color, opacity and scaling settings to the media idle item
+ 	    * @param aMediaIdleItem The media idle item 
+ 	    * @param aMediaIdleItemText Text of the media idle item
+ 	    * @param aTextStyleId Text style for text of the media idle item
+ 	    */		   
+		void SetMediaIdleItemSettingsL( CAlfTextVisual* aMediaIdleItem, const TDesC& aMediaIdleItemText, const TInt aTextStyleId );
+		/**
+ 	    * Sets translating animations to the media idle item
+ 	    * @param aMediaIdleItem The media idle item 
+ 	    */
+		void SetMediaIdleItemAnimation( CAlfTextVisual* aMediaIdleItem );
+		/**
+	    * Sets the media idle mode
+		*/
+		void SetMode( TMediaIdleMode aMode );
+		/**
+	    * Sets image to display
+	    * @param aBitmapFileName Full path to image file
+	    * @param aAbsoluteRect   Rect of the image
+	    * @param aBorders 		 
+	    * @param aParentLayout   
+	    */
+		void SetImageByAbsoluteRectL( const TDesC& aBitmapFileName,
+									  const TRect& aAbsoluteRect,
+									  TBool aBorders,
+									  CAlfLayout* aParentLayout = 0 );		
+		/**
+	    * Fades in media idle
+	    * @param aNow If ETrue shows media idle immediately otherwise
+	    * fades with defined fading duration
+		*/
+		void MediaIdleFadeIn( TBool aNow = EFalse );
+		/**
+	    * Fades out media idle
+	    * @param aNow If ETrue hides media idle immediately otherwise
+	    * fades with defined fading duration
+		*/
+		void MediaIdleFadeOut( TBool aNow = EFalse );
+		
+		/**
+ 	    * @param aVisual a pointer to the visual object
+ 	    * @param aTransitionTime Duration for reaching the target.
+ 	    * @param aEventAfterScrollingEnd custom even that will be sent when transition time is end
+ 	    */
+		void SetScrollingToBackgroundText( CAlfTextVisual* aVisual,
+							    TInt aTransitionTime,
+							    TMediaIdleCustomEvent aEventAfterScrollingEnd = EMediaIdleEventNone ) ;		
+		/**
+	    * Sets fade-in animation to the CAlfVisual.
+	    * @param aVisual a pointer to the visual object
+	    * @param aFadingTime Time duration after the visual object has been faded in.
+	    *                    Fading duration in milliseconds 
+	    * @param aOpacity Target opacity value
+	    */
+		void FadeIn( CAlfVisual* aVisual, TInt aFadingTime, TReal aOpacity = 1.0f ) const;
+		/**
+	    * Sets fade-out animation to the CAlfVisual.
+	    * @param aVisual a pointer to the visual object
+	    * @param aFadingTime Time duration after the visual object has been faded out.
+	    *                    Fading duration in milliseconds 
+	    * @param aOpacity Target opacity value
+	    */
+		void FadeOut( CAlfVisual* aVisual, TInt aFadingTime, TReal aOpacity = 0.0f ) const;
+		/**
+ 	    * Translates the visual object with passed arguments
+ 	    * @param aTextVisual a pointer to the visual object 
+ 	    * @param aX Translation value in the horizontal direction
+ 	    * @param aY Translation value in the vertical direction
+ 	    */
+		void Translate( CAlfTextVisual* aTextVisual, const TAlfTimedValue& aX, const TAlfTimedValue& aY );		
+		/**
+ 	    * Removes all transformations of the visual object such as the scaling and translating.
+ 	    * @param aTextVisual a pointer to the visual object 
+ 	    */
+		void LoadTextVisualIdentity( CAlfTextVisual* aTextVisual );
+		/**
+	    * Sets absolute rect of the anchor by top left and bottom right points.
+	    * @param aAnchor Anchor layout for setting placement
+	    * @param aOrdinal Index of visual element
+	    * @param aTopLeftPosition Top left point of the rect
+	    * @param aBottomRightPosition Bottom right point of the rect
+	    */
+        void SetAbsoluteCornerAnchors( CAlfAnchorLayout* aAnchor,
+                                       TInt aOrdinal,
+                                       const TPoint& aTopLeftPosition,
+                                       const TPoint& aBottomRightPosition );
+        /*
+         * Transformation end event received
+         */
+		void HandleMediaIdleItemTransformationEndEventL( const TAlfEvent& aEvent );
+        
+		/**
+		 * Background text scroll end event received
+		 */
+        void HandleBackgroundTextScrollEndEventL( const TAlfEvent& aEvent );
+        
+        /**
+         ** Create fonts for media idle; based on a list of relative font sizes
+         */
+        void CreateFontsL();
+        
+        /**
+         * Create a background idle text visual
+         */
+        void CreateBackgroundTextL();
+        /**
+         * Stops media idle
+         */
+        void StopAndFadeOutMediaIdle();
+        
+        // from MFMRadioIdleControlInterface
+        void Show();
+        
+        /**
+        * from MFMRadioIdleControlInterface
+        */            
+        void Hide();
+        
+        /**
+        * from MFMRadioIdleControlInterface
+        */        
+        void Deactivate();
+
+private:	// Data 	    
+        /** Status flag for knowing should the fonts be recreated or not */
+        TOrientation iFontsOrientation;
+		/** Display orientation */
+	    TOrientation iOrientation;
+
+	    /** Layout for media idle */
+	    TAknLayoutRect iMediaIdleLayout; 
+	    /** Text style id of the media idle background text */
+        TInt iMediaIdleItemBackgroundTextStyleId;
+        /** States of media idle */
+		TMediaIdleState iMediaIdleState;
+		/** Keeps track of the current media idle mode */
+		TMediaIdleMode  iMediaIdleMode;
+		/** Keeps track of the requested mode */
+		TMediaIdleMode  iMediaIdleRequestedMode;
+	    /** Counts the items that have finished their transformations for mode change */
+		TInt iItemsTransformationEndEventCounter;
+		
+	    /** Color to be used for the media idle items */
+	    TRgb iMediaIdlePrimaryColor;
+	    /** Color to be used for the media idle items */
+	    TRgb iMediaIdleSecondaryColor;
+	    /** Scroll direction for the media idle item */
+	    TMediaIdleItemScrollDirection iScrollDirection;
+	    	
+		/** Array for the strings of the media idle items */
+        CDesCArrayFlat* iMediaIdleItemArray;
+		/** Array for the text styles of the media idle items */
+        RArray<TInt> iTextStyleIdArray;
+	    /** Scroll direction for the media idle background text */
+	    TMediaIdleItemScrollDirection iBackgroundTextScrollDirection;		 	   
+	    /** Indicates whether the instance is fully constructed */  
+	    TBool iIsConstructed;
+	    /** the latest PS name added to the media idle item array. Owned */
+	    HBufC* iPsName;
+	    /** The last size for font creation */
+	    TInt iFontReferenceHeight;
+	};
+
+#endif /*FMRADIOALFMEDIAIDLE_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradioalfrdsviewer.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,202 @@
+/*
+* 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:  Definition of the class CFMRadioAlfRDSViewer.
+*
+*/
+
+
+#ifndef ALF_RDS_VIEWR_H
+#define ALF_RDS_VIEWR_H
+
+// INCLUDES
+
+#include <alf/alfcontrol.h>
+#include <alf/alfanchorlayout.h>
+
+#include "fmradioidlecontrolinterface.h"
+// FORWARD DECLARATIONS
+
+class CAlfTextVisual;
+class MFMRadioAlfRdsViewObserver;
+// CLASS DEFINITION
+
+/**
+* Text indicator control class
+* 
+* Provides means to show and fade in/out a specific text inside the supplied "layout".
+* 
+*/ 
+class CFMRadioAlfRDSViewer : public CAlfControl,
+                             public MFMRadioIdleControlInterface
+    {
+public:    // Constructors and destructor
+
+        /**
+        * Epoc two-phased constructor.
+        * @param aEnv Reference to the HitchCock environment instance.
+        * @return Pointer to this Indicator component.
+        */
+        static CFMRadioAlfRDSViewer* NewL( CAlfEnv& aEnv );
+        /**
+        * Destructor
+        */
+        virtual ~CFMRadioAlfRDSViewer();
+public:    // Functions from base classes
+        /**
+        * From CAlfControl, takes care of alfred event handling.
+        * @param aEvent
+        */
+        TBool OfferEventL( const TAlfEvent& aEvent );
+public:    // New functions	
+        /**
+        * Resets the RDS viewer and
+        * cancels alf events.
+        */
+        void Reset();
+        /**
+        * Sets the indicator opacity in visible state.
+        * @param aOpacity The indicator opacity
+        */
+        void SetOpacityInVisibleState( const TReal aOpacity );
+        /**
+        * Sets the indicator opacity in hidden state.
+        * @param aOpacity The indicator opacity
+        */
+        void SetOpacityInHiddenState( const TReal aOpacity );	
+        /**
+        * Sets the indicator text.
+        * @param aText The indicator text to be shown
+        */
+        TBool SetTextL( const TDesC& aText );
+        /**
+        * Changes indicator text color
+        * @param aTextColor Color of the indicator text
+        */
+        void SetTextColor( const TRgb& aTextColor );
+        /** 
+        * Sets the indicator rectangle
+        * @param aRect Rectangle to the indicator
+        */
+        void SetRect( const TRect& aRect );
+        /**
+        * Get RDS text area visibility
+        * @return visibility status
+        */
+        TBool IsShowingRdsTextArea() const;
+        /** 
+        * Sets the Observer
+        * @param aObserver The object to observe the control
+        */
+        
+        void SetObserver( MFMRadioAlfRdsViewObserver* aObserver );
+        /** 
+        * Removes the observer
+        */
+        void RemoveObserver( MFMRadioAlfRdsViewObserver* aObserver );
+        
+        /**
+         * Check if the same rds text has been displayed
+         * for the predefined time period
+         * @return timer status 
+         */
+        TBool IsRdsTextVisibilityTimerCompleted();
+private:
+        /**
+        * C++ default constructor
+        */
+        CFMRadioAlfRDSViewer();
+        /**
+        * EPOC second phase constructor.
+        * @param aEnv Reference to the Hitchcock environment instance.
+        */
+        void ConstructL( CAlfEnv& aEnv );
+        /**
+        * from MFMRadioIdleControlInterface
+        */
+        void Show();
+        /**
+        * from MFMRadioIdleControlInterface
+        */
+        void Hide();
+        
+        /**
+        * from MFMRadioIdleControlInterface
+        */
+        void Deactivate();
+        
+private:    // New functions
+        /**
+        * Sets the fading animation to the CAlfVisual object.
+        * @param aVisual a pointer to the visual object
+        * @param aFadingTime Time duration after the visual object has been faded. Fading duration in milliseconds. 
+        * @param aOpacity Target opacity value
+        */
+        void Fade( CAlfVisual* aVisual, TInt aFadingTime, TReal aOpacity ) const;
+        /**
+        * Sets absolute rect of the anchor by top left and bottom right points.
+        * @param aAnchor Anchor layout for setting placement
+        * @param aOrdinal Index of visual element
+        * @param aTopLeftPosition Top left point of the rect
+        * @param aBottomRightPosition Bottom right point of the rect
+        */
+        void SetAbsoluteCornerAnchors( CAlfAnchorLayout* aAnchor,
+                                       TInt aOrdinal,
+                                       const TPoint& aTopLeftPosition,
+                                       const TPoint& aBottomRightPosition );
+
+        /**
+        * Creates the needed drawing layers and visual objects
+        * for the indicator.
+        */
+        void AddIndicatorLayerL();
+        /**
+        * Creates the text style for the indicator
+        */
+        void SetTextStyleL();
+
+private:
+
+    enum TFadeCustomEvent
+        {
+        EFadeInCompleted,
+        EOldTextFadeEffectCompleted,
+        ERDSDisplayTimerCompleted
+        };
+
+private:// Data
+        /** Anchor layout for indicator */
+        CAlfAnchorLayout* iIndicatorTextAnchor;
+        /** Visual object of the indicator. Not owned. */
+        CAlfTextVisual* iText;   		
+        /** Text color of the indicator text */
+        TRgb iTextColor;	    
+        /** Text style id of the indicator text */
+        TInt iTextStyleId;
+        /** Indicator opacity in visible state */
+        TReal iOpacityInVisibleState;
+        /** Indicator opacity in hidden state */
+        TReal iOpacityInHiddenState;
+        /** Indicator rectangle */
+        TRect iRect;
+        /** flag for RDS text area visibility */
+        TBool iIsRdsTextVisible;
+        /** local copy of latest RT */
+        RBuf iRadioText;
+        /** Array of observers. */
+        RPointerArray<MFMRadioAlfRdsViewObserver> iObservers;
+        // flag for rds text timer
+        TBool iRdsTextVisibilityTimerCompleted;
+    };
+
+#endif //ALF_RDS_VIEWR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradioalfrdsviewobserver.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,33 @@
+/*
+* 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 an interface for observing rds text events
+*
+*/
+
+#ifndef FMRADIOALFRDSVIEWOBSERVER_H_
+#define FMRADIOALFRDSVIEWOBSERVER_H_
+
+/*
+ * Interface for notifying rds text events. 
+ */
+class MFMRadioAlfRdsViewObserver
+    {
+    public:
+        /*
+         * Called when the same rds text has been
+         * displayed for predifined time period
+         */
+        virtual void NotifyRdsTextTimerCompletion() = 0;
+    };
+#endif /* FMRADIOALFRDSVIEWOBSERVER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradioalfvisualizer.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,433 @@
+/*
+* 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:  Definition of the class CFMRadioAlfVisualizer.
+*
+*/
+
+
+#ifndef FMRADIOALFVISUALIZER_H
+#define FMRADIOALFVISUALIZER_H
+
+// INCLUDES
+
+#include <AknUtils.h>
+#include <alf/alfcontrol.h>
+#include <alf/alfanchorlayout.h>
+#include <gesturecontrol.h>
+#include <gestureobserver.h>
+
+#include "fmradiodefines.h"
+#include "fmradio.hrh"
+
+// CONSTANTS
+        
+/** Scroll directions of the visual objects. */
+enum TScrollDirection
+    {    
+    EScrollLeftToRight = 0xA0,
+    EScrollRightToLeft,
+    EScrollNone
+    };
+        
+/** Possible display styles. */
+enum TFMRadioDisplayStyle
+    {
+    EFMRadioDisplaySingleLine = 0,  /**< Single line display. */
+    EFMRadioDisplayDoubleLine,       /**< Double line display. */
+    EFMRadioDisplayTuning,           /**< Tuning display. */
+    EFMRadioDisplayNoDisplay         /**< No display used. */
+    };
+        
+/** Display orientations. */
+enum TDisplayOrientation
+    {
+    EPortrait = 0x4A, 
+    ELandscape,
+    EOrientationNone
+    };
+
+// FORWARD DECLARATIONS
+
+class CAlfTextVisual;
+class CAlfViewportLayout;
+class CAlfGradientBrush;
+class CFMRadioAlfBitmapAnimation;
+class CFMRadioAppUi;
+class MTouchFeedback;
+
+using namespace GestureHelper;
+// CLASS DEFINITION
+
+/**
+* CFMRadioAlfVisualizer class
+* 
+* Visualizes informations of the FMRadio to the display by Hitchcock UI Toolkit
+*/ 
+NONSHARABLE_CLASS(CFMRadioAlfVisualizer) : public CGestureControl, public MGestureObserver
+    {
+public:        // Constructors and destructor
+
+        /**
+         * Epoc two-phased constructor.
+         * @param aEnv Reference to the HitchCock environment instance.
+         * @return Pointer to this Visualizer component.
+         */
+        static CFMRadioAlfVisualizer* NewL( CAlfEnv& aEnv );
+        /**
+         * Destructor
+         */
+        virtual ~CFMRadioAlfVisualizer();
+public:     // Functions from base classes        
+        /**
+          * From CGestureControl/CAlfControl, takes care of alfred event handling.
+          * @param aEvent
+          */
+        TBool OfferEventL( const TAlfEvent& aEvent );    
+
+        /**
+         * From CGestureControl, takes care of gesture event handling.
+         * @param aEvent
+         */
+        void HandleGestureL( const MGestureEvent& aEvent );
+public:        // New functions               
+        /**
+         * Changes station to next with scrolling and fading station's 
+         * information (name, frequency, etc.).
+         * @param aChangeType The change type
+         * @param aFirstLine The text shown in the first line
+         * @param aSecondLine The text shown in the second line, or NULL
+         */
+        void ChangeStationL( TFMRadioStationChangeType aChangeType, 
+                             const TDesC& aFirstLine, 
+                             const TDesC* aSecondLine = NULL );
+        /**
+         * Scrolls out the current station information lines by 
+         * hiding actual visuals and scrolling out the created temporary information lines.
+         * @param aChangeType Station change type
+         */
+        void ScrollOutCurrentStationInformationL( TFMRadioStationChangeType aChangeType );
+        /**
+         * Resets the station information and sets static text to the third line
+         * @param aInfoText an information text to show
+         * @param aChangeType The change type
+         */
+        void SetStaticInfoTextL( TFMRadioStationChangeType aChangeType, const TDesC& aInfoText );
+        /**
+         * Change text color of the text visuals
+         * @param aTextColor Color of the visual texts
+         */        
+        void SetStationInformationTextColor( const TRgb& aTextColor );
+        /**
+         * Sets the display style in use.
+         * @param   aDisplayStyle Display style to use.
+         */
+        void SetDisplayStyle( TFMRadioDisplayStyle aDisplayStyle );        
+        /**
+         * Returns the display style.
+         * @return  Display style.
+         */
+        TFMRadioDisplayStyle DisplayStyle() const;        
+        /** 
+         * Calculates display layout
+         */            
+        void UpdateLayout();            
+        /**
+         * Return orientation of the display
+         */
+        TDisplayOrientation Orientation();
+        /**
+         * Set orientation of the display
+         * @param aOrientation Orientation of the display
+         */
+        void SetOrientation( TDisplayOrientation aOrientation );
+        /**
+         * Set mirrored layout state
+         * @param aIsMirrored state
+         */
+        void SetMirrored( const TBool aIsMirrored );
+        /**
+         * @return Mirrored layout state
+         */
+        TBool IsMirrored() const;    
+        
+        /**
+         * Starts tuning animation after delay
+         */        
+        void StartTuningAnimation();
+        
+        /**
+         * Stops tuning animation by fading it away
+         */            
+        void StopTuningAnimation();
+private:
+        /**
+         * C++ default constructor
+         */
+        CFMRadioAlfVisualizer( );
+        /**
+         * EPOC second phase constructor.
+         * @param aEnv Reference to the Hitchcock environment instance.
+         */
+        void ConstructL( CAlfEnv& aEnv );
+private:    // New functions
+        
+        /** The visuals of the station information display. */
+        enum TStationInformationVisual
+            {
+            EFirstLineTextVisual = 0x1,  /**< Text visual of the first line. */
+            ESecondLineTextVisual = 0x2, /**< Text visual of the second line. */
+            ETuningTextVisual = 0x4,     /* Tuning text visual. */
+            EAllVisuals = EFirstLineTextVisual |
+                          ESecondLineTextVisual |
+                          ETuningTextVisual
+            };
+        
+        /**
+         * Specifies the axis that is currently used in the station info drag
+         */
+        enum TFMRadioDragAxis
+            {
+            EFMRadioDragAxisNone = 0,
+            EFMRadioDragAxisX,
+            EFMRadioDragAxisY
+            };
+        
+        /**
+         * Sets text to the defined station information visual. 
+         * @param  aVisual     The text visual object for showing
+         * @param  aText      Text   
+         */
+        void SetVisualTextL( TStationInformationVisual aVisual, const TDesC& aText );    
+        /**
+         * Shows the defined station information visual. 
+         * @param  aVisual     The text visual object for showing
+         * @param  aFade     <code>ETrue</code> if fade effect it to be used, <code>EFalse</code> otherwise.
+         */
+        void ShowVisual( TStationInformationVisual aVisual, TBool aFade );
+        /**
+         * Hides the defined station information visual. 
+         * @param aVisual The text visual object for hiding
+         */
+        void HideVisual( TStationInformationVisual aVisual );    
+        /**
+         * Sets and starts scrolling and fading animations to CAlfTextVisual.
+         * The visual object is scrolled from right side of the display to 
+         * original position of the visual object.
+         * @param aVisual a pointer to the visual object
+         */
+        void ScrollRightToLeftWithFadeIn( CAlfVisual& aVisual ) const;
+        /**
+         * Sets and starts scrolling and fading animations to CAlfTextVisual.
+         * The visual object is scrolled from left side of the display to 
+         * original position of the visual object.
+         * @param aVisual a pointer to the visual object
+         */
+        void ScrollLeftToRightWithFadeIn( CAlfVisual& aVisual ) const;
+        /**
+         * Sets and starts scrolling and fading animations to CAlfTextVisual.
+         * The visual object is scrolled from top of the display to 
+         * original position of the visual object.
+         * @param aVisual a pointer to the visual object
+         */
+        void ScrollInFromTop( CAlfVisual& aVisual ) const;
+        /**
+         * Sets and starts scrolling and fading animations to CAlfTextVisual.
+         * The visual object is scrolled from bottom of the display to 
+         * original position of the visual object.
+         * @param aVisual a pointer to the visual object
+         */
+        void ScrollInFromBottom( CAlfVisual& aVisual ) const;
+        /**
+         * Moves the visual back to it's original position
+         * @param aVisual The visual to be moved
+         */
+        void RevertVisual( CAlfVisual& aVisual );        
+        /**
+          * Sets and starts scrolling animation to CAlfVisual.
+          * The visual object is scrolled from current position to 
+          * right side of the display
+          * @param aVisual a reference to the visual object
+          * @param aTime Time duration after the visual object has been scrolled to the target. 
+          * Scrolling duration in milliseconds.
+          */
+        void ScrollToRight( CAlfVisual& aVisual, TInt aTime ) const;
+        /**
+          * Sets and starts scrolling animation to CAlfVisual.
+          * The visual object is scrolled from current position to 
+          * left side of the display
+          * @param aVisual a reference to the visual object
+          * @param aTime Time duration after the visual object has been scrolled to the target. 
+          * Scrolling duration in milliseconds.
+          */
+        void ScrollToLeft( CAlfVisual& aVisual, TInt aTime ) const;
+        /**
+         * Sets and starts scrolling animation to CAlfVisual.
+         * The visual object is scrolled from current position above the the display
+         * @param aVisual a reference to the visual object
+         * @param aTime Time duration after the visual object has been scrolled to the target. 
+         * Scrolling duration in milliseconds.
+         */
+        void ScrollUp( CAlfVisual& aVisual, TInt aTime ) const;
+        /**
+         * Sets and starts scrolling animation to CAlfVisual.
+         * The visual object is scrolled from current position below the the display
+         * @param aVisual a reference to the visual object
+         * @param aTime Time duration after the visual object has been scrolled to the target. 
+         * Scrolling duration in milliseconds.
+         */
+        void ScrollDown( CAlfVisual& aVisual, TInt aTime ) const;
+        /**
+         * Sets fade-in animation to the CAlfVisual.
+         * @param aVisual a reference to the visual object
+         * @param aFadingTime Time duration after the visual object has been faded in.
+         *                    Fading duration in milliseconds
+         * @param aOpacity Target opacity value
+         */
+        void FadeIn( CAlfVisual& aVisual, TInt aFadingTime, TReal aOpacity = 1.0f ) const;
+        /**
+         * Sets fade-out animation to the CAlfVisual.
+         * @param aVisual a reference to the visual object
+         * @param aFadingTime Time duration after the visual object has been faded out.
+         *                    Fading duration in milliseconds
+         * @param aOpacity Target opacity value
+         */
+        void FadeOut( CAlfVisual& aVisual, TInt aFadingTime, TReal aOpacity = 0.0f ) const;
+        /**
+          * Translates the visual object with passed arguments
+          * @param aTextVisual a pointer to the visual object 
+          * @param aX Translation value in the horizontal direction
+          * @param aY Translation value in the vertical direction
+          */
+        void Translate( CAlfTextVisual* aTextVisual, const TAlfTimedValue& aX, const TAlfTimedValue& aY );    
+        /**
+         * Removes all transformations of the visual object such as the scaling and translating.
+         * @param aTextVisual a pointer to the visual object 
+         */
+        void LoadTextVisualIdentity( CAlfTextVisual* aTextVisual );
+        /**
+         * Sets absolute rect of the anchor by top left and bottom right points.
+         * @param aAnchor Anchor layout for setting placement
+         * @param aOrdinal Index of visual element
+         * @param aTopLeftPosition Top left point of the rect
+         * @param aBottomRightPosition Bottom right point of the rect
+         */
+        void SetAbsoluteCornerAnchors( CAlfAnchorLayout* aAnchor,
+                                       TInt aOrdinal,
+                                       const TPoint& aTopLeftPosition,
+                                       const TPoint& aBottomRightPosition );
+
+         /** 
+          * Creates the needed drawing layers and visual objects
+          * for visualiazing the station information.
+          */
+        void AddInformationLayersL();
+        /**
+          * Creates the text styles to be used by station information visualiazing
+          */
+        void CreateTextStylesForStationInformationL();
+        /**
+         * Creates copy of current station information
+         */
+        void CreateTemporaryStationInformationVisualsL();
+        /**
+         * Animates temporary station infoout of the display
+         * @param aChangeType Change type
+         */
+        void AnimateTemporaryStationInformationVisuals( TFMRadioStationChangeType aChangeType );    
+        /**
+         * Triggers the command to view handling
+         * @param aCommand command id
+         */
+        void TriggerCommandL( TInt aCommand = 0 );
+        /**
+         * Static call back for the long key press timer.
+         * @param   aSelf   Pointer to self.
+         * @return  KErrNone
+         */
+        static TInt StaticLongPressCallBack( TAny* aSelf );
+private:    // Data
+            
+        /** Layout for the station information */
+        TAknLayoutRect iStationInformationLayout; 
+        /** Layout for the transparent background layer of the station information */
+        TAknLayoutRect iTransparentBackgroundLayout;
+        
+        /** Layout for the first line. */
+        TAknLayoutText iFirstLineLayout;
+        /** Layout for the second line */
+        TAknLayoutText iSecondLineLayout;
+        /** Layout for the tuning text. */
+        TAknLayoutText iTuningTextLayout;
+        /** Layout for the tuning animation. */
+        TAknLayoutRect iTuningAnimationLayout;
+                
+        /** Visual object of the first line. Not owned. */
+        CAlfTextVisual* iFirstLineVisualText;  
+        /** Visual object of the second line. Not owned. */
+        CAlfTextVisual* iSecondLineVisualText;
+        /** Visual text for tuning text. Not owned */
+        CAlfTextVisual* iTuningVisualText;
+
+        /** The layout for the station info visuals */
+        CAlfAnchorLayout* iStationInformationAnchorLayout;
+        /** The layout for temporary station info fade out effect */
+        CAlfAnchorLayout* iStationInformationTempAnchorLayout;
+        
+        /** Text color of the station information visuals */
+        TRgb iStationInformationTextColor;
+                
+        /** Text style id of the first line */
+        TInt iFirstLineTextStyleId;
+        /** Text style id of the second line */
+        TInt iSecondLineTextStyleId;
+        /** Text style id of the tuning text line */
+        TInt iTuningTextStyleId;
+        
+        /** Display style         */
+        TFMRadioDisplayStyle iDisplayStyle;
+        /** Display orientation */
+        TDisplayOrientation iOrientation;
+        /** Scroll direction */
+        TScrollDirection iScrollDirection;
+        // Bitmap Animation
+        CFMRadioAlfBitmapAnimation* iBmpAnimation;
+        // Flag to indicate mirrored layout usage
+        TBool iMirrored;
+        // visual size for bitmap animation positioning
+        TSize iTuningTextVisualSize;
+        // counts rt text (3rd line) scrollout -events for rt-timeout.
+        TInt iScrollOutCounter;
+        // Pointer to CFMRadioAppUi. Not owned
+        CFMRadioAppUi* iAppUi;
+        // key event
+        TInt iKeyScanCode;
+        /**
+        * If the long key event was detected or not. If it was, the subsequent key up should be ignored
+        */
+        TBool iLongKeyTriggered;
+        /** 
+        * Long key press timer. Owned.
+        */
+        CPeriodic* iLongPressTimer;
+        // The position of the visual before the dragging started
+        TAlfTimedPoint iDragStartPosition;
+        // Status for determinging whether or not to revert the visual back to it's original position
+        TBool iRevertGestureDrag;
+        // The axis for the currently ongoing stroke
+        TFMRadioDragAxis iDragAxis;
+        // Tactile feedback for closing the popup
+        MTouchFeedback* iTouchFeedback; // For Tactile feedback
+    };
+
+#endif //FMRADIOALFVISUALIZER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradioapp.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,90 @@
+/*
+* 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:  Main application class definitions.
+*
+*/
+
+/*! \mainpage
+*
+* @section intro Introduction
+*
+* @subsection abstract Abstract
+*
+* Application provides FM radio functionality for
+* finding, saving and playing radio stations. 
+* 
+* @subsection architecture Basic architecture
+*
+* FMRadio constructs from the following program modules:
+* application UI, application engine, plugin extensions and interfaces to external components.
+** 
+* @subsection containedcomponents Contained Components/Executables
+*
+* - fmradio.exe / UI application
+* - fmradioengine.dll / Application engine
+* - fmradioactiveidleengine200.dll / Active idle engine. Notify observers about P&S changes
+* - fmradioactionhandler.dll / Action handler plugin. Handles P&S commands
+* - fmradiomcpplugin100.dll / Content publisher plugin. Publishes radio data to other components
+*
+* @subsection providedapis Provided APIs
+*
+* - FM Radio command line parameters.
+* - Publish & Subscribe interface.
+* 
+* @section usecases Use cases
+*
+* \image html fmradio_use_case.png "Use cases"
+*
+
+*
+*/
+
+#ifndef FMRADIOAPP_H
+#define FMRADIOAPP_H
+
+// INCLUDES
+#include <aknapp.h>
+
+// CONSTANTS
+
+// CLASS DECLARATION
+
+/**
+* CFMRadioApp application class.
+* This class is a part of the standard application framework. The application 
+* gets instantiated by this class. Provides a factory method for 
+* instantiating the document object.
+*
+* @since 2.6
+*/
+class CFMRadioApp : public CAknApplication
+    {
+    
+    private:
+        /**
+        * From CApaApplication, creates CFMRadioDocument document object.
+        * @return A pointer to the created document object.
+        */
+        CApaDocument* CreateDocumentL();
+        /**
+        * From CApaApplication, returns application's UID (KUidFMRadio).
+        * @return The value of KUidFMRadio.
+        */
+        TUid AppDllUid() const;
+    };
+
+#endif
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradioappui.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,795 @@
+/*
+* 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:  Definition of class FMRadioAppUi. Provides command
+*                      and callback interfaces to control the engine and the
+*                     application views.
+*
+*/
+
+#ifndef FMRADIOAPPUI_H
+#define FMRADIOAPPUI_H
+
+// INCLUDES
+#include <eikapp.h>
+#include <eikdoc.h>
+#include <e32std.h>
+#include <coeccntx.h>
+#include <aknViewAppUi.h>
+#include <coecntrl.h>
+#include <aknnotedialog.h>
+#include <aknnotewrappers.h>
+#include <iaupdateobserver.h>
+
+#include "fmradioenginestatechangecallback.h"
+#include "fmradioengine.h"
+#include "fmradiodefines.h"
+#include "fmradiosvkevents.h"
+#include "fmradioglobalconfirmationquery.h"
+#include "mchannellisthandler.h"
+
+
+// FORWARD DECLARATIONS
+class CAknQueryDialog;
+class CFMRadioBackSteppingServiceWrapper;
+class CFMRadioDocument;
+class CFMRadioMainContainer;
+class CFMRadioScanLocalStationsView;
+class CFMRadioChannelListView;
+class CFMRadioMainView;
+class CEikMenuPane;
+class MFMRadioLayoutChangeObserver;
+class CAlfEnv;
+class CAknVolumePopup;
+class CAknInformationNote;
+class CAknGlobalNote;
+class CIAUpdate;
+class CIAUpdateParameters;
+class CFMRadioControlEventObserverImpl;
+class CRepository;
+// CLASS DECLARATION
+
+/**
+* Interface to tell when dialog was terminated
+*
+*    @since 2.6
+*/
+class MInformationNoteInterface
+    {
+    public:
+        /**
+        * tells when dialog was terminated
+        */
+        virtual void DialogTerminated() = 0;
+    };
+
+/**
+* Information note for headset key events. Enabling functionality to disable new dialog creation 
+* when dialog is active
+*
+*    @since 2.6
+*/
+class CFMInformationNote: public CAknInformationNote
+    {
+    public:
+    
+        /**
+        * default constructor.
+        */
+        CFMInformationNote( MInformationNoteInterface& aObserver);
+        
+        /**
+        * Destructor.
+        */
+        virtual ~CFMInformationNote();
+        
+    private:
+        
+        // Dialog event observer
+        MInformationNoteInterface& iDialogObserver;
+    
+    };
+
+/**
+* Instantiates the application views. It also acts as the default command handler for the
+*  application. Part of the standard application framework.
+*
+*    @since 2.6
+*/
+
+class CFMRadioAppUi : public CAknViewAppUi,
+                      public MFMRadioSvkEventsObserver,
+                      public MCoeControlObserver,
+                      private MRadioEngineStateChangeCallback,
+                      private MFMRadioGlobalConfirmationQueryObserver,
+                      private MInformationNoteInterface,
+                      public MChannelListHandler,
+                      public MIAUpdateObserver
+                      
+    {
+    public:
+        // Volume, seek, tune and channel changing directions
+        enum TFMRadioDirections
+            {
+            EDirectionUp,
+            EDirectionNone,
+            EDirectionDown
+            };
+        
+        enum TRadioState
+            {
+            EFMRadioStateOff = 0,            // Radio off
+            EFMRadioStateOffForPhoneCall,    // Radio off because a phone call
+            EFMRadioStateOffBeforePhoneCall, // Radio was off + phone call going on -> no resume
+            EFMRadioStateOn,
+            EFMRadioStateRecording,
+            EFMRadioStateBusyRadioOn,
+            EFMRadioStateBusyRadioOff,
+            EFMRadioStateBusySeek,
+            EFMRadioStateBusyMute,
+            EFMRadioStateBusyVolume,
+            EFMRadioStateBusyManualTune,
+            EFMRadioStateBusyScanLocalStations,
+            EFMRadioStateExiting
+            };
+
+    public: // Constructors and destructor
+        /**
+        * EPOC default constructor.
+        */
+        void ConstructL();
+        
+        /**
+         * C++ default constructor.
+         */
+        CFMRadioAppUi();
+        
+        /**
+        * Destructor.
+        */
+        virtual ~CFMRadioAppUi();
+
+        /**
+         * Utility method to select the right layout resource according to 
+         * mirroring and orientation
+         *
+         * @param aNormalPortraitRes Normal portrait resource id
+         * @param aMirroredPortraitRes Mirrored portrait resource id
+         * @param aNormalLandscapeRes Normal landscape resource id
+         * @param aMirroredLandscapeRes Mirrored landscape resource id
+         * @return one of the resource id's passed to this method
+         */
+        TInt ChooseLayoutResource( const TInt aNormalPortraitRes, 
+                const TInt aMirroredPortraitRes,
+                const TInt aNormalLandscapeRes, 
+                const TInt aMirroredLandscapeRes ) const;
+    public: // Functions from base classes
+        
+        /**
+        * From CEikAppUi, takes care of command handling.
+        * @since 2.6
+        * @param aCommand command to be handled
+        */
+        void HandleCommandL( TInt aCommand );
+
+        /**
+        * Notification interface from RadioEngine. Used to inform
+        * us when requests have completed.
+        * @since 2.6
+        * @param aEventCode code corresponding to the event being propogated
+        * @param aErrorCode error code of the event being propogated
+        */
+        void HandleRadioEngineCallBack( MRadioEngineStateChangeCallback::TFMRadioNotifyEvent aEventCode, TInt aErrorCode );
+    public: // new functions 
+        /**
+        * Returns a pointer to the radio engine
+        *
+        * @return Radio engine
+        */
+        CRadioEngine* RadioEngine();
+
+        /**
+         * Returns a reference to Back Stepping wrapper
+         * 
+         * @return Reference to Back Stepping wrapper
+         */
+        CFMRadioBackSteppingServiceWrapper& BackSteppingWrapper() const;
+
+        /**
+         * Returns a pointer to FMRadio's document, cannot be null.
+         *
+         * @return A pointer to a CFMRadioDocument object.
+         */
+        CFMRadioDocument* Document() const;
+        /**
+        * Checks if current screen orientation is landscape
+        *
+        * @return ETrue if orientation is landscape, otherwise EFalse
+        */
+        TBool IsLandscapeOrientation() const;
+
+        /**
+        * Handles offline mode at startup.
+        */
+        void HandleOfflineModeAtStartUpL();
+
+        /**
+        * Handles start up foreground event.
+        */		
+        void HandleStartupForegroundEventL();
+        /**
+        * Nunber of channels stored in presets.
+        * @return number of channels in presets
+        */ 
+        TInt NumberOfChannelsStored() const;
+        /**
+        * Returns the UID of the currently active local view. KNullUid if none 
+        * active (construction/destruction).
+        * @return UID of the currently active local view, KNullUid if none 
+        * active.
+        */
+        TUid ActiveView() const;
+        /**
+        * Return startup scanning wizard status.
+        * @return running status
+        */
+        TBool IsStartupWizardRunning() const;
+        /**
+        * Set startup scanning wizard status.
+        * @param aRunningState running state
+        */
+        void SetStartupWizardRunning( const TBool aRunningState );
+        /**
+        * Tune to the specified frequency
+        * @since 2.6
+        * @param aFrequency the frequency to be tuned
+        */
+        void TuneL(TInt aFrequency);
+        /**        
+        * @return mirrored layout state
+        */
+        TBool IsLayoutMirrored() const;
+        /**
+        * Show currently active volume popup control
+        */
+        void ShowVolumePopupL();
+
+        /**
+         * From MChannelListHandler 
+         * Updates channels array in appui 
+         * @param aOperation tells which operation is made to array
+         * @param aIndex tells affecting index
+         * @param aMovedToNewIndex optional during move operation
+         */
+        void UpdateChannelsL( TMoveoperations aOperation, 
+                TInt aIndex, 
+                TInt aMovedToNewIndex  );
+
+        /**
+         * From MChannelListHandler
+         * Add a new channel to list of channels
+         * @param aChannelName Name of the channel to be saved
+         * @param aChannelFreq Channel frequency
+         */
+        void AddChannelToListL( const TDesC& aChannelName, TInt aChannelFreq );
+
+        /**
+         * From MChannelListHandler
+         * Accessory method to channels array
+         */
+         RPointerArray<CFMRadioPreset>& Channels();
+
+        void AutoTuneInMainView ( TBool aTune );
+        /**
+         * status of the startup wizard state
+         * @return wizard status
+         */
+        TBool IsStartupWizardHandled() const;
+        /**
+        * Return the index of the first channel that matches the 
+        * frequency specified.
+        * @since 2.6
+        * @param aFrequency The frequency to match against
+        * @return the index of the channel whose frequency matched.
+        *         -1 if no frequency matched.
+        */
+        TInt MatchingChannelL( TInt aFrequency );
+        
+        /**
+        * Erase a channel
+        * @param aIndex index to delete
+        * @return ETrue if user accepted delete, otherwise EFalse
+        */
+        TBool EraseChannelL( TInt aIndex );
+
+        /*
+         * Returns a pointer to the currently active volume popup control
+         * @return active volume popup
+         */
+        CAknVolumePopup* ActiveVolumePopup() const;
+        
+        /*
+         * Get current radio state.
+		 * @return TRadioState state of the radio
+         */
+        CFMRadioAppUi::TRadioState CFMRadioAppUi::RadioState() const;
+
+    protected:
+        /**
+        * From CEikAppUi HandleWsEventL
+        */
+        void HandleWsEventL(const TWsEvent& aEvent,CCoeControl* aDestination);
+
+        /**
+        * From base class CCoeAppUi    
+        */
+        void HandleForegroundEventL( TBool aForeground );
+
+    private: // Functions from base classes
+        /**
+        * Handles a change to the application's resources
+        * @param aType The type of changed resource
+        */
+        void HandleResourceChangeL( TInt aType );
+        /**
+        * Updates the landscape data. This is done separately 
+        * and not in IsLandscapeOrientation method as
+        * IsLandscapeOrientation MUST NOT do a window server flush
+        */
+        void UpdateLandscapeInformation();
+     private: // new functions
+
+        /**
+        * All leaving function calls are made here, so that nothing is left on the stack if the ConstructL leaves
+        * The reason for this behaviour is that the UI framework doesn't handle leaves from the AppUi correctly.
+        */
+        void SecondaryConstructL();
+        /**
+        * Perform object cleanup. This would normally be performed in the destructor, but since it can also be
+        * called from SecondaryConstructL it was moved into a seperate function.
+        */
+        void Cleanup();
+        /**
+        * Handles callback from engine
+        * @since 3.0
+        */
+        void HandleInitializedCallbackL();
+        /**
+        * Updates radio volume level by one step at time.
+        * @since 2.6
+        * @param aDirection Parameter is interpreted as
+        *        following: 1 = increase volume, 0 = no change,
+        *        -1 = decrease volume.
+        */
+        void UpdateVolume( CFMRadioAppUi::TFMRadioDirections aDirection );
+        /**
+        * Perform automatic tuning to the next available audible frequency
+        * @since 2.6
+        */
+        void ScanUpL();
+        /**
+        * Perform automatic tuning to the last available audible frequency
+        * @since 2.6
+        */
+        void ScanDownL();
+        /**
+        * Save currently tuned frequency to the currently selected channel
+        * @since 2.6
+        * @param aIndex the index of the slot to save the channel to.
+        */
+        void SaveChannelL( TInt aIndex );
+        /**
+        * Tune the radio hardware to the frequency saved at the specified channel
+        * @since 2.6
+        * @param aIndex index of channel to tune to
+        */
+        void PlayChannel( TInt aIndex );
+        /**
+        * Set the audio output of the radio, and update the UI
+        * @since 2.6
+        * @param aAudioOutput the audio output (headset or IHF)
+        */
+        void SetAudioOutput( CRadioEngine::TFMRadioAudioOutput aAudioOutput );
+        /**
+        * Cancel outstanding seek request
+        * @since 2.6
+        */
+        void CancelSeek();
+        /**
+        * Shutdown the application.
+        * @since 2.6
+        */
+        void ExitApplication();
+        /**
+        * Rename the currently selected channel
+        * @since 2.6
+        */
+        void RenameCurrentChannelL();
+        /**
+        * Display confirmation dialog for channel deletion
+        * @param aIndex the index of the channel to delete
+        */
+        TBool ConfirmChannelListDeleteL( TInt aIndex );
+        /**
+        * Saves channel to be last item in channels list
+        * @since 2.6
+        */
+        void SaveChannelToLastIntoListL();
+        /**
+        * Displays an error note with the text contained in the passed in reference
+        * @since 2.6
+        * @param aErrorNote id of the text to display in the error note
+        */
+        void DisplayErrorNoteL( TInt aErrorNote );
+
+        /**
+        * Displays an information note with the text contained in the passed in reference
+        * @since 2.6
+        * @param aInfoNote id of the text to display in the error note
+        */
+        void DisplayInformationNoteL( TInt aInfoNote );
+
+        /**
+        * Return the numeric key value corresponding to the key code
+        * @since 2.6
+        * @param aCode the Symbian key code
+        * @return the numeric key value
+        */
+        TInt NumericKeyValue( TUint aCode );
+        /**
+        * Turn the fm radio hardware on
+        * @since 2.6
+        */
+        void TurnRadioOn();
+        /**
+        * Processes "seek operation completed" callback
+        * @since 2.6
+        */
+        void HandleStopSeekCallback();
+        /**
+        * Processes "set mute state" callback
+        * @since 2.6
+        */
+        void HandleSetMuteStateCallback();
+        /**
+        * Processes "volume changed" callback
+        * @since 2.6
+        */
+        void HandleVolumeChangedCallback();
+        /**
+        * Processes "set audio output completed" callback
+        * @since 2.6
+        */
+        void HandleAudioOutputSetCallback();
+        /**
+        * Processes "headset reconnected" callback
+        * @since 2.6
+        */
+        void HandleHeadsetReconnectedCallback();
+        /**
+        * Processes "headset disconnected" callback
+        * @since 2.6
+        */
+        void HandleHeadsetDisconnectedCallback();
+        /**
+        * Processes "flightmode disabled" callback
+        * @since 2.6
+        */
+        void HandleFlightmodeDisabledCallback();
+        /**
+        * Processes "volume update failed" callback
+        * @since 2.6
+        */
+        void HandleVolumeUpdateFailedCallback();
+        /**
+        * Handles mute keypress from main view
+        * 
+        */
+        void HandleMuteCommand();
+        /**
+        * Processes "manual tune failed" callback
+        * @since 2.6
+        */
+        void HandleManualTuneFailedCallback();
+        /**
+        * Processes audio resource not available
+        * @since 3.0
+        */
+        void HandleAudioResourceNotAvailableL(TInt aErrorCode);
+
+        /**
+        * Processes audio resource available
+        * @since 3.0
+        */
+        void HandleAudioResourceAvailableL();
+
+        /**
+        * Processes FM Transmitter on.
+        * @since 3.2
+        */
+        void HandleFMTransmitterOnCallbackL();
+
+        /**
+        * Processes Frequency range changed.
+        * @since 3.2
+        */
+        void HandleFreqRangeChangedCallback();
+
+        /**
+        * Processes Frequency range changed.
+        * @since 3.2
+        */
+        void HandleFlightModeEnabledCallbackL();
+
+        /**
+        * Handle flight mode disabled.
+        * @since 3.2
+        */
+        void HandleFlightModeDisabledCallback();
+
+        /**
+        * Processes Frequency range changed.
+        * @since 3.2
+        */
+        void HandleTunerReadyCallback();
+
+        /**
+ 		* Get region automatically from network or manually by user choice if network
+        * is not available
+        */
+        TFMRadioRegionSetting HandleRegionsAtStartUpL();
+        
+        /**
+        * Is offline profile activated when radio audio was disabled.
+        * @return ETrue, if offline profile activated when radio 
+        * audio was disabled. EFalse otherwise.
+        */
+        TBool IsOfflineProfileActivatedWhenRadioAudioDisabled() const;
+
+        /**
+        * Sets the toolbar visibility.
+        * @param aVisible 
+        */ 
+        void ShowToolbar( TBool aVisible );
+
+        /**
+        * Determine if scan all local stations view should be started
+        * in wizard mode
+        */
+        void HandleStartupWizardL();
+
+        /**
+        * Start local stations scan
+        */        
+        void StartLocalStationsSeekL();
+
+        /**
+        * Tries to start radio again if the situation allows it
+        */        
+        void TryToResumeAudioL();
+        /**
+        * Fade and show exit on all views
+        */        
+        void FadeViewsAndShowExit( TBool aState );
+
+        /*
+        * Show connect headset query with only exit softkey
+        */
+        void ShowConnectHeadsetDialogL();
+
+        /*
+         * Get help context based on active view
+         * @return array containing help context for active view
+        */
+        CArrayFix<TCoeHelpContext>* GetCurrentHelpContextL() const;
+
+        /**
+        * A call back function for processing start up foreground event. 
+        *
+        * @param aSelfPtr  Pointer to self.
+        * @return Always 0.
+        */
+        static TInt StaticStartupForegroundCallback( TAny* aSelfPtr );
+    private:
+        /**
+        * Called when volume level should be changed.
+        * Set volume control visible.
+        * @param aVolumeChange: +1 change volume up
+        *                       -1 change volume down
+        */
+        void FMRadioSvkChangeVolumeL( TInt aVolumeChange );
+        /**
+        * Called when volume was changed last time 2 seconds ago or
+        * timer was started 2 seconds ago. The remove control timer
+        * is started when ChangeVolumeL() is called
+        * or when started through CMmsSvkEvents::StartRemoveTimerL()
+        */
+        void FMRadioSvkRemoveVolumeL( );
+        void FMRadioHeadsetEvent(TAccessoryEvent aEvent);
+        /**
+         * From MFMRadioGlobalConfirmationQueryObserver
+         * 
+         * @see MFMRadioGlobalConfirmationQueryObserver::GlobalConfirmationQueryDismissedL(TInt aSoftKey)
+         */
+        void GlobalConfirmationQueryDismissedL( TInt aSoftKey );
+        /**
+        *From MCoeControlObserver. To handle the volume events.
+        */
+        void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType );
+        /**
+        * From MInformationNoteInterface. To handle dialog terminated events.
+        */
+        void DialogTerminated();
+        /**
+        * Gets the Channels array
+        */
+        void GetChannelsArrayL();
+        /**
+        * Check available IAD updates
+        */
+        void HandleIADUpdateCheckL();
+        // from base class MIAUpdateObserver
+        void CheckUpdatesComplete( TInt aErrorCode, TInt aAvailableUpdates );
+        void UpdateComplete( TInt aErrorCode, CIAUpdateResult* aResultDetails );
+        void UpdateQueryComplete( TInt aErrorCode, TBool aUpdateNow );
+
+        /**
+         * Processes the tail of the command
+         * @param aTail The tail to be processed
+         */
+        void ProcessCommandTailL( const TDesC8& aTail );
+
+        // from base class CEikAppUi	
+        MCoeMessageObserver::TMessageResponse HandleMessageL(
+            TUint32 aClientHandleOfTargetWindowGroup, 
+            TUid aMessageUid, 
+            const TDesC8& aMessageParameters );
+
+        TBool ProcessCommandParametersL( TApaCommand aCommand, 
+                                         TFileName& aDocumentName, 
+                                         const TDesC8& aTail );
+
+        /**
+        * Check if Active Idle app is on foreground.
+        *
+        * @return ETrue if idle app is in the foreground, EFalse otherwise.
+        */
+        TBool IsIdleAppForeground();
+
+        /**
+        * Check if Active Idle is enabled.
+        *
+        * @return ETrue if active idle is in the enabled, EFalse otherwise.
+        */
+        TBool IsActiveIdleEnabled();
+
+        /**
+         * Handles the possibly pending view activation 
+         */
+        void HandlePendingViewActivationL();
+
+    private:
+            
+        /**
+         * State to indicate the mute status
+         */
+        enum TFMMuteStatus
+            {
+            EFMUninitialized = 0,       // Uninitialized value
+            EFMUnmuted,                 // Unmute state
+            EFMMuted                    // Mute state
+            };
+
+        // System's volume indicator
+        CAknVolumePopup* iIhfVolumePopupControl;
+        CAknVolumePopup* iHeadsetVolumePopupControl;
+        CAknVolumePopup* iActiveVolumePopupControl;
+                        
+        CRadioEngine*   iRadioEngine;
+        TRadioState iCurrentRadioState;
+        CFMRadioScanLocalStationsView* iScanLocalStationsView;
+        CFMRadioChannelListView* iChannelListView;
+        CFMRadioMainView* iMainView;
+        //all the possible radio UI states
+        TInt iFMRadioVariationFlags;
+        CFMRadioSvkEvents*   iSvkEvents;
+        TBool iAlreadyClean;
+        MFMRadioLayoutChangeObserver* iLayoutChangeObserver;
+        CFMRadioControlEventObserverImpl* iControlEventObserver;
+        /**
+        * Is audio resources available
+        */
+        TBool iAudioResourceAvailable;
+        
+        /**
+        * Was audio lost "permanently" due to another music playing application?
+        */
+        TBool iAudioLost;
+        
+        /**
+        * Global offline query. Owned
+        */
+        CFMRadioGlobalConfirmationQuery* iGlobalOfflineQuery;
+        
+        /**
+        * Local activate offline query. Owned
+        */  
+        CAknQueryDialog* iLocalActivateOfflineQuery;
+        
+        /**
+        * Local continue offline query. Owned
+        */
+        CAknQueryDialog* iLocalContinueOfflineQuery;
+        
+        /**
+        * Is offline profile activated when radio audio was disabled.
+        */
+        TBool iOfflineProfileActivatedWhenRadioAudioDisabled;
+        
+        /**
+        * Is the local "continue in offline" query visible.
+        */
+        TBool iShowingLocalOfflineContinueQuery;
+        
+        /**
+        * Is the local or global offline query activated.
+        */
+        TBool iOfflineQueryDialogActivated;
+        
+        /** 
+         * Is the start up of application ongoing.
+         */
+        TBool iStartUp;
+        
+        /**
+        * Is the screen orientation landscape
+        */
+        TBool iLandscape;
+        CAlfEnv* iAlfEnv; // Owned
+        // flag to indicate wizard handling
+        TBool iStartupWizardHandled;
+        // flag for startup wizard status
+        TBool iStartupWizardRunning;
+        // connect headset query
+        CAknQueryDialog* iConnectHeadsetQuery;
+        // flag to indicate if automatic tune is activated from startup wizard
+        TBool iTuneFromWizardActivated;
+        // akn information note ptr to check that dialog has dismissed from display
+        TBool iInfoNoteOn;
+        // global note for headset status when radio is background
+        CAknGlobalNote* iConnectHeadsetGlobalNote;
+        // flag for previous mute status 
+        TFMMuteStatus iMuteStatusBeforeRadioInit;
+        // Channels list
+        RPointerArray<CFMRadioPreset> iChannels;
+        // IAD client object. Owned.
+        CIAUpdate* iUpdate;
+        // Parameters for IAD update. Owned.
+        CIAUpdateParameters* iParameters;
+        // The backstepping wrapper. Owned.
+        CFMRadioBackSteppingServiceWrapper* iBsWrapper;
+        // Is feature manager initialized, used for uninitializing feature manager
+        TBool iFeatureManagerInitialized;
+        // own, for active idle setting
+        CRepository* iSettingsRepository;
+        // Callback for processing start up foreground event. 
+        CAsyncCallBack* iStartupForegroundCallback;
+        // The view id of the view that is to be activated when possible
+        TUid iPendingViewId;
+        // Boolean for region change, force rescanning
+        TBool iRegionChanged;
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiobacksteppingservicewrapper.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,126 @@
+/*
+* 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:  Declaration of the class CFMRadioBackSteppingServiceWrapper
+*
+*/
+
+#ifndef CFMRADIOBACKSTEPPINGSERVICEWRAPPER_H
+#define CFMRADIOBACKSTEPPINGSERVICEWRAPPER_H
+
+#include <coeview.h>
+#include <e32base.h>
+#include <vwsdef.h>
+
+class MLiwInterface;
+class CLiwGenericParamList;
+class CLiwServiceHandler;
+
+/**
+ *  Back Stepping (BS) Service wrapper.
+ */
+class CFMRadioBackSteppingServiceWrapper : public CBase, public MCoeViewActivationObserver
+    {
+
+public:
+
+    /**
+     * Static constructor.
+     * The object can be registered as view activation observer 
+     * or view activations can be notified explicitly by HandleViewActivationEventL.
+     * 
+     * @param aUid Application UID.
+     */
+    static CFMRadioBackSteppingServiceWrapper* NewL( TUid aUid );
+
+    /**
+     * Destructor.
+     */
+     ~CFMRadioBackSteppingServiceWrapper();
+
+    /**
+     * Forwards view activation event to BS Service.
+     *
+     * @param   aViewId View id of the view where back is called.
+     * @param   aEnter Indicates if it is entry or exit activation.
+     */
+    void HandleViewActivationEventL( const TVwsViewId aViewId, TBool aEnter );
+
+    /**
+     * Forwards back command to BS Service.
+     *
+     * @param   aViewId View id of the view where back is called.
+     * @return  Returns Etrue if BS Service consumed the command, otherwise returns EFalse.
+     */
+    TBool HandleBackCommandL( const TVwsViewId aViewId );
+
+private:
+
+    /**
+     * C++ default constructor.
+     */
+    CFMRadioBackSteppingServiceWrapper();
+
+    /**
+     * 2nd phase constructor
+     *
+     * @param aUid Application UID.
+     */
+    void ConstructL( TUid aUid );
+
+    /**
+     * Initializes BS Service.
+     *
+     * @param aUid Application UID.
+     */
+    void InitializeL( TUid aUid );
+
+    /**
+     * Handles the result of a LIW command
+     *
+     * @return Returns ETrue if LIW command executed, otherwise returns EFalse.
+     */
+    TBool HandleResultL();
+    
+    // from base class MCoeViewActivationObserver
+    void HandleViewActivation( const TVwsViewId& aNewlyActivatedViewId, 
+                               const TVwsViewId& aViewIdToBeDeactivated );
+
+private: // data
+
+    /**
+     * AIW Service Handler.
+     * Owned.
+     */
+    CLiwServiceHandler* iServiceHandler;
+
+    /**
+     * BS Service interface returned by LIW.
+     * Owned.
+     */
+    MLiwInterface* iBsInterface;
+
+    /**
+     * In param list.
+     * Not owned.
+     */
+    CLiwGenericParamList* iInParamList;
+
+    /**
+     * Out param list.
+     * Not owned.
+     */
+    CLiwGenericParamList* iOutParamList;
+    };
+
+#endif // CFMRADIOBACKSTEPPINGSERVICEWRAPPER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiochannellistcontainer.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,239 @@
+/*
+* 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:  definition of the class CFMRadioRecordingContainer
+*
+*/
+
+
+#ifndef FMRADIOCHANNELLISTCONTAINER_H
+#define FMRADIOCHANNELLISTCONTAINER_H
+
+// INCLUDES
+#include <coecntrl.h>
+#include <aknlists.h>
+
+#include "fmradiodefines.h"
+#include "fmradioengine.h"
+#include "mchannellisthandler.h"
+
+// FORWARD DECLARATIONS
+class CAknWaitDialog;
+class CFMRadioChannelListView;
+// CLASS DECLARATION
+
+/**
+* Creates and owns the UI components related to the Channel List view.
+* @since 2.6
+*/
+class CFMRadioChannelListContainer : public CCoeControl, 
+                                     public MEikListBoxObserver
+    {
+    public: // Constructors and destructor
+        /**
+        * Two-phase constructor of CFMRadioChannelListContainer
+        * @since 2.6
+        * @param aRect Frame rectangle for container
+        * @param aRadioEngine Radio engine
+        * @param aObserver Handler for channel list
+        */
+        static CFMRadioChannelListContainer* NewL( const TRect& aRect, 
+        		CRadioEngine& aRadioEngine,
+        		MChannelListHandler& aObserver);
+        /**
+        * Destructor.
+        */
+        virtual ~CFMRadioChannelListContainer();
+    public: // New functions
+        /**
+        * Returns the index of the selected channel item from the channel list.
+        * @since 2.6
+        * @return the index of the currently selected channel
+        */
+        TInt CurrentlySelectedChannel() const;
+        /**
+        * Update the content of the channel at aIndex with the values specified
+        * @since 2.6
+        * @param aIndex index of the channel to update
+        * @param aChannelName the new name of the channel
+        * @param aChannelFrequency the new frequency of the channel
+        */
+        void UpdateChannelListContentL( TInt aIndex, const TDesC& aChannelName, TInt aChannelFrequency );
+        /**
+	    * RemoveChannel from channel list 
+	    * @since 2.6
+	    * @param aIndex the index of the channel to update
+	    */
+	    void RemoveChannelL( TInt aIndex );
+	    /**
+	    * AddChannel from channel list 
+	    * @since 2.6
+	    * @param aChannelName the new name of the channel
+        * @param aChannelFrequency the new frequency of the channel
+        * @param aNowPlaying ETrue if channel is tuned
+        */
+	    void AddChannelL( const TDesC& aChannelName, TInt aChannelFrequency, TBool aNowPlaying ); 
+        /**
+        * Update the content of the channel at aIndex with the values specified
+        * @since 2.6
+        * @param aIndex index of the last selected channel
+        */
+        void UpdateLastListenedChannel( TInt aIndex );
+        /**
+        * Adds icon to a list item
+        * @param aIndex new icon index
+        * @param aIconIndex icon index in list icon array
+        */
+        void UpdateItemIconL( TInt aIndex, TInt aIconIndex );
+        /**
+        * Hide all icons from the list
+        */
+        void HideIconsL();
+        /**
+        * Fades the entire window and controls in the window owned by this container control.
+        * @since 2.6
+        * @param aFaded flag to indicate whether we should fade or unfade
+        */
+        void SetFaded( TBool aFaded );
+        /**
+        * From CCoeControl
+        */
+        void HandleResourceChange(TInt aType);
+        /**
+	    * MoveMode handled -> All Done
+	    */
+        void MoveDoneL();        
+        /**
+	    * ReIndexAll items in constainer list 
+	    */
+        void ReIndexAllL();        
+        /**
+         * Handle movable item drop
+         */
+        void HandleDropL();        
+        /**
+         * Move selected item in list up
+         */
+        void MoveUpL();        
+        /**
+         * Move selected item in list down
+         */
+        void MoveDownL();        
+        /**
+         * Activate move action -> when grab is selected
+         */
+        void ActivateMoveL();
+        /**
+         * Move action canceled, return list to previous state
+         */ 
+        TBool MoveCanceledL();    
+        /**
+         * Current Move action state.
+         */
+        TBool MoveAction();
+        /**
+	     * Touch pad move event handling
+	     */ 
+        void TouchMoveEventL( TInt aIndex );
+        
+    private: // Functions from base classes
+        /**
+        * Called by framework when the view size is changed
+        * @since 2.6
+        */
+        void SizeChanged();
+        /**
+        * Return the number of controls in the window owned by this container
+        * @since 2.6
+        * @return number of controls
+        */
+        TInt CountComponentControls() const;
+        /**
+        * Return the control corresponding to the specified index
+        * @since 2.6
+        * @param aIndex the index of the control to retrieve
+        * @return the control corresponding to the specified index
+        */
+        CCoeControl* ComponentControl( TInt aIndex ) const;
+        /**
+        * From MEikListBoxObserver, for listbox event handling.
+        * @since 2.6
+        * @param aListBox The originating list box.
+        * @param aEventType A code for the event.
+        */
+        void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
+        /**
+        * Allow the channel list to process key events
+        * @since 2.6
+        * @param aKeyEvent The key event.
+        * @param aType The type of key event.
+        */
+        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
+		/**
+        * Required for help.
+		* @since 2.7
+		* @param aContext the help context to be used.
+        */
+        void GetHelpContext(TCoeHelpContext& aContext) const;
+        
+        void FocusChanged(TDrawNow aDrawNow);
+        /*
+        * from CCoeControl
+        */
+        void HandlePointerEventL( const TPointerEvent& aPointerEvent );
+        
+    private: // new functions
+    	 // Default constructor
+    	CFMRadioChannelListContainer( CRadioEngine& aRadioEngine, MChannelListHandler& aObserver ); 
+        /**
+        * EPOC default constructor.
+        * @since 2.6
+        * @param aRect Frame rectangle for container.
+        */
+        void ConstructL( const TRect& aRect);
+
+        /*
+         * Adds icons to the icon array.
+         * @param aArray array to add icons 
+         */
+        void CreateListIconsL( CArrayPtr<CGulIcon>& aArray );
+
+        /**
+        * Create the channel list (initially all spots are set as empty)
+        * @since 2.6
+        */
+        void InitializeChannelListL();
+    private: //data
+        // The channel list listbox
+        CAknDoubleNumberStyleListBox* iChannelList;
+        // Array of channel list items
+        CDesCArray* iChannelItemArray;
+        // Index of the most recently listened channel to keep the listbox up-to-date.
+        TInt iLastChIndex;
+        // array for list icon bitmaps
+        RPointerArray<CFbsBitmap> iBitMaps;
+        TBool iFadeStatus;
+        CRadioEngine& iRadioEngine;
+        TBool iMoveAction;
+        TInt iMoveIndex;
+        TInt iTouchMoveIndex;
+        MChannelListHandler& iObserver;
+        // not owned
+        CFMRadioChannelListView* iChannelView;
+        // flag for rocker key move activation
+        TBool iKeyMoveActivated;
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiochannellistview.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,306 @@
+/*
+* 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:  definition of the class CFMRadioChannelListView
+*
+*/
+
+
+#ifndef FMRADIOCHANNELLISTVIEW_H
+#define FMRADIOCHANNELLISTVIEW_H
+
+// INCLUDES
+#include <aknview.h>
+#include <akntoolbarobserver.h> 
+
+#include "fmradiochannellistcontainer.h"
+#include "mfmradiolayoutchangeobserver.h"
+#include "fmradiordsobserver.h"
+#include "mchannellisthandler.h"
+
+
+// FORWARD DECLARATIONS
+class CFMRadioChannelListViewContainer;
+class CRadioEngine;
+
+// CLASS DECLARATION  
+
+/**
+* CFMRadioChannelListView view class.
+* @since 2.6
+*/
+class CFMRadioChannelListView : public CAknView,
+                                public MCoeControlObserver,
+                                public MFMRadioLayoutChangeObserver,
+                                public MFMRadioRdsObserver,
+                                public MAknToolbarObserver
+    {
+    public: // Constructors and destructor
+        /**
+        * Two-phase constructor of CFMRadioChannelListView
+        * @since 2.6
+        * @param aRadioEngine pointer to a radio engine object
+        * @param aObserver Handler for channel list
+        */
+        static CFMRadioChannelListView* NewL( CRadioEngine* aRadioEngine, 
+        		MChannelListHandler& aObserver );
+        
+        /**
+        * CFMRadioChannelListView.
+        * @since 2.6
+        */
+        CFMRadioChannelListView::CFMRadioChannelListView( MChannelListHandler& aObserver ) ;
+        
+        /**
+        * Destructor.
+        * @since 2.6
+        */
+        virtual ~CFMRadioChannelListView();
+    public:  // New functions
+        /**
+        * Return the unique identifier corresponding to this view
+        * @since 2.6
+        * @return the unique identifier corresponding to this view
+        */
+        TUid Id() const;
+        /**
+        * Keep track of the last selected channel
+        * @since 2.6
+        * @param aIndex the index of the last listened to channel
+        */
+        void SetLastListenedChannel( TInt aIndex );
+        /**
+        * Keep track of the current selected channel
+        * @param  aChannelIndex the index of the current channel
+        */
+        void SetNowPlayingChannel ( TInt aChannelIndex );
+         /**
+        * Returns the index of the playing channel item from the 
+        * channel list. 
+        * @return the currently playing channel
+        */
+        TInt CurrentlyPlayingChannel();
+        /**
+        * Returns the index of the selected channel item from the 
+        * channel list. If the container is active get the info from 
+        * it, because it may have more up-to-date info.
+        * @since 2.6
+        * @return the currently selected channel
+        */
+        TInt CurrentlySelectedChannel();
+        /**
+        * Make a request to the channel container to update the 
+        * content of the channel at aIndex with the values specified
+        * @since 2.6
+        * @param aIndex the index of the channel to update
+        * @param aChannelName the new name of the channel
+        * @param aChannelFrequency the new frequency
+        */
+        void UpdateChannelListContentL( TInt aIndex, const TDesC& aChannelName, TInt aChannelFrequency );
+        /**
+        * Return true/false to indicate whether the channel specified is in play
+        * @param aChannelIndex the index of the channel to check
+        * @return true/false to indicate whether the channel is currently being played
+        */
+        TBool ChannelInPlay( TInt aChannelIndex ) const; 
+        /**
+        * Retrieve the index of the next channel that has been set.
+        * @since 2.6
+        * @return the index of the next "in use" channel
+        */
+        TInt NextChannel();
+        /**
+        * Retrieve the index of the previous channel that has been set.
+        * @since 2.6
+        * @return the index of the previous "in use" channel
+        */
+        TInt PreviousChannel();
+        /**
+        * Initialize the channels with the values currently saved in 
+        * the radio engine
+        * @since 2.6
+        */
+        void InitializeChannelsL();
+        /**
+        * Fade the view and all controls associated with it. Change
+        * the soft keys so that "Exit" is displayed
+        * @since 2.6
+        * @param aFaded indicates whether the view should fade/unfade.
+        */
+        void FadeAndShowExit( TBool aFaded );
+        /**
+        * Update display when focus regained
+        * @since 3.0
+        */
+        void UpdateDisplayForFocusGained();
+        /**
+        * from MFMRadioLayoutChangeObserver
+		* This method gets called by the AppUI when a dynamic layout change
+		* event occurs.
+        * @param aType layout change type
+		*/
+		void LayoutChangedL( TInt aType );
+		/**
+		* Set empty channel list item 
+		* when preset is deleted from fmradiopresetutility
+		* @param aIndex list index to delete
+		*/
+		void SetEmptyChannelListItemL( const TInt aIndex ) const;
+		
+        /**
+        * From MAknToolbarObserver
+        * Handle commands from toolbar.
+        * @param aCommandId The command id
+        */        
+        void OfferToolbarEventL( TInt aCommandId );
+
+        /**
+        * Sets toolbar visibility
+        * @param aVisible 
+        * @return none
+        */
+        void ShowToolbar( TBool aVisible );
+
+        /**
+        *  From base class MFMRadioRdsObserver
+        */
+        void RdsDataProgrammeService( const TDesC& aProgramService );
+        void RdsDataPsNameIsStatic( TBool aStatic );
+        void RdsDataRadioText( const TDesC& aRadioText );
+        void RdsDataRadioTextPlus( const TInt aRTPlusClass, const TDesC& aRadioText );
+        void RdsAfSearchBegin();
+        void RdsAfSearchEnd( TUint32 aFrequency, TInt aError );
+        void RdsAfSearchStateChange( TBool aEnabled );
+        void RdsAvailable( TBool aAvailable );
+        /**
+        * Procedures for finishing a move of channel on the list
+        * @param none 
+        * @return none
+        */
+        void MoveActionDoneL();
+        
+        /**
+         * Cancel the moving
+         */
+        void CancelMoveL();
+        
+        /**
+        * Dim relevant buttons when the list is empty
+        */
+        void UpdateToolbar() const;
+        
+        /*
+         * Updates view when seek event is ended 
+         */
+        void StopSeekL();
+        
+        /**
+        * Interprets view's menu,softkey and other commands and acts 
+        * accordingly by calling the appropriate command handler 
+        * function for further action.
+        * @since 2.6
+        * @param aCommand the command to process
+        */
+        void HandleCommandL( TInt aCommand );
+        
+     private: // Functions from base classes
+        /**
+        * Activate the channel list view
+        * @since 2.6
+        */
+        void DoActivateL( const TVwsViewId& aPrevViewId,TUid aCustomMessageId, const TDesC8& aCustomMessage );
+        /**
+        * Deactivate the channel list view
+        * @since 2.6
+        */
+        void DoDeactivate();
+        /**
+        * From MCoeControlObserver, control event observing. In this case,
+        * the user selection from the list is reported by container class
+        * and observed here.
+        * @since 2.6
+        * @param aControl the control that caused the event
+        * @param aEventType the type of event that was triggered
+        */
+        void HandleControlEventL( CCoeControl* aControl,TCoeEvent aEventType );
+        /**
+        * Sets the state of menu items dynamically according to the 
+        * state of application data.
+        * @since 2.6
+        * @param aResourceId Resource ID identifying the menu pane to initialise.
+        * @param aMenuPane The in-memory representation of the menu pane.
+        */
+        void DynInitMenuPaneL( TInt aResourceId,CEikMenuPane* aMenuPane );
+        
+        /**
+        * SetMiddleSoftKeyLabelL, sets the MSK label
+        * 
+        */
+        void SetMiddleSoftKeyLabelL (TInt aResourceId, TInt aCommandId);
+       
+        /**
+        * UpdateMiddleSoftKeyL, updates the MSK
+        * 
+        */
+        void UpdateMiddleSoftKeyL();
+    private: // new functions
+        /**
+        * EPOC default constructor.
+        * @since 2.6
+        * @param aRadioEngine pointer to a radio engine object
+        */
+        void ConstructL( CRadioEngine* aRadioEngine );
+        
+        /**
+        * Prepare toolbar for FMRadio command buttons
+        */
+        void PrepareToolbar();
+        /*
+         * Set view title text
+         * @param aResourceId resource Id containing the title text
+         */
+        void SetTitleL( TInt aResourceId );
+        /**
+        * Procedures for beginning a move of channel on the list
+        * @param none 
+        * @return none
+        */
+        void MoveCurrentItemIndexL();
+        
+    private: // Data
+        CFMRadioChannelListContainer* iContainer;
+        CRadioEngine*   iRadioEngine;
+        TInt iChIndex; 
+        TInt iNowPlayingIndex;
+        TInt iCurrentMSKCommandId; //owned
+		TBool iFaded;
+	    MChannelListHandler& iObserver;
+	    
+	    CAknQueryDialog* iManualQueryDialog;
+	    
+	    TBool iMoveMode;
+	    
+	   /**
+	    * Boolean for knowing if any moves have been made
+	    */
+	    TBool iFirstMoveDone;
+	    
+       /**
+        * Toolbar for controlling the application.  
+        */
+        CAknToolbar* iToolbar;
+	};
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiocommandlineparams.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,58 @@
+/*
+* 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:  This file contains definitions for 
+*               FM Radio command line parameters
+*
+*/
+
+
+#ifndef FMRADIOCOMMANDLINEPARAMS_H
+#define FMRADIOCOMMANDLINEPARAMS_H
+
+#include <e32std.h>
+
+/**
+ * The needed ID's are defined in fmradiouids.h
+ * Only one of the following commands can be currently given at a time
+ */
+
+/**
+ * FM Radio application UID
+ */
+const TUid KFMRadioCommandUid = {0x10207A89};
+
+/**
+ * Starts FM Radio to specified view or activates it if some other view is already active
+ * Supports only Main view and Channel List View
+ * Example: "-v 1", use the ID's defined in fmradiouids.h
+ */
+_LIT8( KFMRadioCommandActivateView, "-v" );
+
+/**
+ * Starts FM Radio to specified frequency or just tunes if application is already running. 
+ * No effect if the frequency is outside current frequency range. Example: "-f 87500000"
+ * @param frequency The frequency to be activated in hertz
+ */
+_LIT8( KFMRadioCommandFrequency, "-f" );
+
+/**
+ * Starts FM Radio to specified station index or just tunes if application is already running. 
+ * No effect if the index is out of boundaries. Example: "-i 0"
+ * @param index The index to be activated
+ */
+_LIT8( KFMRadioCommandStationIndex, "-i" );
+
+#endif // FMRADIOCOMMANDLINEPARAMS_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiocontroleventobserverimpl.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,74 @@
+/*
+* 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:  Declaration of class CFMRadioControlEventObserverImpl. 
+*               Provides the implementation for the control event observer.
+* 
+*/
+
+#ifndef FMRADIOCONTROLEVENTOBSERVERIMPL_H_
+#define FMRADIOCONTROLEVENTOBSERVERIMPL_H_
+
+#include <fmradiointernalpskeys.h>
+
+#include "fmradiopropertyobserver.h"
+#include "fmradioaudioutils.hrh"
+#include "fmradiocontroleventobserver.h"
+
+class MFMRadioControlEventObserver;
+class CFMRadioAppUi;
+
+class CFMRadioControlEventObserverImpl : public CBase, public MFMRadioControlEventObserver
+    {
+    public:
+        /**
+         * Static constructor.
+         */
+        static CFMRadioControlEventObserverImpl* NewL( CFMRadioAppUi& aAppUi );
+        
+        /**
+        * Destructor.
+        */
+        ~CFMRadioControlEventObserverImpl();
+        
+        void StepToChannelL( TFMRadioTuneDirection aDirection );
+        void SetChannelL( TInt aChannelId );
+        void SeekL( TFMRadioTuneDirection aDirection );
+        void StepToFrequencyL( TFMRadioTuneDirection aDirection );
+        void SetFrequencyL( TUint32 aFreq );
+        void AdjustVolumeL( TFMRadioVolumeSetDirection aDirection );
+        void MuteL( TBool aMute );
+        void PlayL( TBool aDownPressed );
+        void PauseL(TBool aDownPressed );
+        void PausePlayL( TBool aDownPressed );
+        void StopL( TBool aDownPressed );
+        void ForwardL( TBool aDownPressed );
+        void FastForwardL( TBool aDownPressed );
+        void BackwardL( TBool aDownPressed );
+        void RewindL( TBool aDownPressed );
+        void ChannelUpL( TBool aDownPressed );
+        void ChannelDownL( TBool aDownPressed );
+        void VolumeUpL( TBool aDownPressed );
+        void VolumeDownL( TBool aDownPressed );
+        void ChangeViewL(TUid aViewId, TBool aForceChange);
+        void SetAudioOutputDestinationL(TFMRadioOutputDestination aDestination);
+        void AnswerEndCallL();
+
+    private: //Methods
+    	CFMRadioControlEventObserverImpl(CFMRadioAppUi& aAppUi);
+        void ConstructL();
+
+    private:
+    	CFMRadioAppUi& iAppUi;
+    };
+#endif /*FMRADIOCONTROLEVENTOBSERVERIMPL_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiodefines.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,190 @@
+/*
+* 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:  This file contains common constant defines used within the
+*                 scope of the application.
+*
+*/
+
+
+#ifndef FMRADIODEFINES_H
+#define FMRADIODEFINES_H
+
+#include <e32std.h>
+#include <e32base.h>
+#include <eikenv.h>
+#include <fmradio.rsg>
+
+#include "fmradioengine.h"
+
+const TInt KHzConversionFactor    = 1000000;
+
+// Tuning step, frequency range high and low limits
+const TReal KFrequencyTuningStep        = 0.05;
+
+const TInt KFrequencyMaxDecimalPlaces = 2;
+const TInt KFrequencyMaxLength = 6;
+
+// Minimum and maximum volume levels
+const TInt KMinimumVolume = 1;
+const TInt KMaximumVolume = 10;
+
+// Handy string buffer size declarations
+const TInt KBufLen16    = 0x10;
+
+const TInt KDefaultRegionArrayGranularity = 3;
+
+// Channel list item amount
+const TInt KMinNumberOfChannelListItems = 0;
+const TInt KMaxNumberOfChannelListItems = 99;
+
+// Channel list channel item string length
+const TInt KLengthOfChannelItemString = 100;
+
+// Channel list channel index string length
+const TInt KLengthOfChIndexStringChList = 5;
+
+// Channel list channel name string length
+const TInt KLengthOfChannelNameString = 80;
+
+// Channel list channel item icon index string length
+const TInt KLengthOfChannelItemIconIndexString = 3;
+
+// Time after pressing delayed key 1 or 2
+const TInt KKeyDelayTimeInMicroseconds = 2000000; // 2 seconds
+
+const TInt KFMRadioProgressUpdateDelayInMicroseconds = 5000; //every .05 seconds.
+const TInt KProgressBarMaxValue = 100;
+const TInt KProgressBarIntervalChange = 10;
+
+//Decimal notation
+const TInt KBaseTen = 10;
+
+// Asterisk key code
+const TInt EStdKeyNkpAsteriskInDevice = 0x2A;
+
+// Current mode of the channel list view
+enum TFMRadioChannelListViewMode
+    {
+    ENormalListMode,
+    ESaveChannelMode
+    };
+
+//const TInt KNumberOfButtonsToDisplay = 5;
+
+// Channel list channel index string formatter
+_LIT(KChIndexFormatChList, "%d");
+_LIT(KChIndexFormatChMenu, "%d ");
+// Channel list channel item icon index string formatter
+_LIT(KChIconIndexFormatChList, "%d");
+
+// bitmap file for the button panel
+_LIT( KFMRadioBmpFile, "fmradio.mif" );
+
+// Keyboard number key codes
+enum TKeyboardKeys
+{
+   EKeyboardKey0 = 0x30,
+   EKeyboardKey1 = 0x31,
+   EKeyboardKey2 = 0x32,
+   EKeyboardKey3 = 0x33,
+   EKeyboardKey4 = 0x34,
+   EKeyboardKey5 = 0x35,
+   EKeyboardKey6 = 0x36,
+   EKeyboardKey7 = 0x37,
+   EKeyboardKey8 = 0x38,
+   EKeyboardKey9 = 0x39
+};
+
+// CONSTANTS FOR ALFRED ENVIRONMENT
+
+// Main view visual controls group id
+const TInt KFMRadioVisualControlsGroupId = 1;
+const TInt KFMRadioVisualizerGestureControlGroupId = 2; //Do not use for any other purpose
+const TInt  KFMRadioMediaIdleId = 312;
+const TInt  KFMRadioVisualControlId = 211;
+const TInt  KFMRadioRdsIndicatorId = 313;
+const TInt  KFMRadioRdsAfIndicatorId = 314;
+const TInt  KFMRadioRdsViewer = 316;
+const TInt  KFMRadioRdsInteractionIndicatorId = 317;
+const TInt  KFMRadioLogoId = 318;
+const TReal KFMRadioIndicatorOpacityInHiddenState = 0.2f;
+const TReal KFMRadioRdsViewerOpacityHidden = 0.0f;
+const TReal KFMRadioRdsViewerOpacityShow = 0.4f;
+
+
+// Main view transparent layer bottom margin
+const TReal KInfoBgLayerBottomMarginAsNormalizedValue = -0.12f;
+// Main view transparent layer top margin
+const TReal KInfoBgLayerTopMarginAsNormalizedValue    = 0.5f;
+// Media Idle content item amount
+const TInt KFMRadioMaxNumberOfMediaIdleContentItem = 10;
+
+// Time delay in milliseconds when main view toolbar buttons report long key press event
+const TInt KLongPressDelayValueInMicroseconds = 500;
+// How many times user is asked to scan local frequencies at application startup
+const TInt KMaxStartupTimesToAskSaveWizard = 2;
+
+// Toolbar center (=mute) button state indexes
+const TInt KMuteStateIndex = 1;
+const TInt KUnMuteStateIndex = 0;
+
+/**
+* Local Variation Flags for FM Radio
+* For values, see FMRadioVariant.hrh.
+* Integer value.
+**/
+//_LIT( KFMRadioFeatures, "FMRadioFeatures" );
+
+/**
+* Upper frequency bound for FM Radio band
+* Possible Values are:
+* 0 ... 115000
+*  108000 default value
+* Integer value.
+**/
+_LIT( KFMRadioFrequencyRangeUpperLimit, "FMRadioFrequencyRangeUpperLimit" );
+
+/**
+* Lower frequency bound for FM Radio band
+* Possible Values are:
+* 0 ... 115000
+* 87500 default value
+* Integer value.
+**/
+_LIT( KFMRadioFrequencyRangeLowerLimit, "FMRadioFrequencyRangeLowerLimit" );
+
+/**
+ * Direction change mark for strings with numerals in mirrored layout
+ */
+_LIT( KRightToLeftMark, "\x200F" );
+_LIT( KLeftToRightMark, "\x200E" );
+
+/**
+ * Volume settings for radio
+ */
+const TInt KFMRadioMaxVolumeLevel = 20;
+const TInt KFMRadioMinVolumeLevel = 0;
+const TInt KFMRadioVolumeStepSize = 1;
+
+// Channel list icon index in the icon array
+const TInt KNowPlayingIconIndexChList = 0;
+const TInt KMoveIconIndexChList = 1;
+// RDS text max length
+const TInt KFMRadioWebLinkMaxLength = 64;
+
+#endif
+
+
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiodocument.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,69 @@
+/*
+* 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:  Definitaion of the CFMRadioDocument class, which
+*                      handles application data serialization. Owns the Ui 
+*                      (controller) and the engine (model)
+*
+*/
+
+
+#ifndef FMRADIODOCUMENT_H
+#define FMRADIODOCUMENT_H
+
+// INCLUDES
+#include <AknDoc.h>
+   
+// CONSTANTS
+
+// FORWARD DECLARATIONS
+class  CEikAppUi;
+
+// CLASS DECLARATION
+
+/**
+* Part of the standard application framework. Declares the document class 
+* for this application.
+* @since 2.6
+*/
+class CFMRadioDocument : public CAknDocument
+    {
+    public: // Constructors and destructor
+        /**
+        * Two-phased constructor.
+        * @since 2.6
+        */
+        static CFMRadioDocument* NewL( CEikApplication& aApp );
+        /**
+        * Destructor.
+        * @since 2.6
+        */
+        virtual ~CFMRadioDocument();
+    private: // New functions
+        /**
+        * EPOC default constructor.
+        * @since 2.6
+        */
+        CFMRadioDocument( CEikApplication& aApp );
+    private: // Functions from base classes
+        /**
+        * From CEikDocument, create CFMRadioAppUi "App UI" object.
+        * @since 2.6
+        */
+        CEikAppUi* CreateAppUiL();
+    };
+
+#endif
+
+// End of File
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiofrequencyeditor.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,285 @@
+/*
+* Copyright (c) 2004-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:  Header file for CFMRadioFrequencyEditor
+*
+*/
+
+
+#ifndef CFMRADIOFREQUENCYEDITOR_H
+#define CFMRADIOFREQUENCYEDITOR_H
+
+#include <eikmfne.h>
+
+struct SEikControlInfo;
+
+/**
+ * Custom editor for editing radio frequencies.
+ */
+class CFMRadioFrequencyEditor : public CEikMfne
+    {
+    
+public:  // Methods
+   
+    /**
+     * C++ default constructor.
+     */
+    CFMRadioFrequencyEditor();
+
+	/**
+     * Symbian 2nd phase constructor.
+     */
+    void ConstructL(const TUint32 aFlags = 0);
+    
+    /**
+     * Destructor.
+     */
+    ~CFMRadioFrequencyEditor();
+
+	/**
+     * This editor is constructed by the system using this static method.
+     */
+	static SEikControlInfo StaticCreateCustomEditor(TInt aIdentifier);
+
+    /**
+     * Sets the frequency of this editor.
+     *
+     * @param aFreq New frequency.
+     */
+    void SetFrequency(const TUint32 aFreq);
+
+	/**
+     * Returns the frequency of this editor.
+     *
+     * @return Frequency of this editor.
+     */
+    TUint32 Frequency() const;
+
+	/**
+     * Sets minimum and maximum frequencies of this editor.
+     *
+     * @param aMinimumFrequency Minimum frequency.
+	 * @param aMaximumFrequency Maximum frequency.
+     */
+    void SetMinimumAndMaximum(const TUint32 aMinimumFrequency, 
+        const TUint32 aMaximumFrequency);
+
+	/**
+     * Gets minimum and maximum frequencies of this editor.
+     *
+     * @param aMinimumFrequency Contains the minimum frequency when returned.
+	 * @param aMaximumFrequency Contains the maximum frequency when returned.
+     */
+    void GetMinimumAndMaximum(TUint32& aMinimumFrequency, 
+        TUint32& aMaximumFrequency) const;
+
+	/**
+	 * Returns validity of this editor.
+	 * @return ETrue, if the values of the fields of this editor are valid. 
+	 * EFalse otherwise.
+	 */
+	TBool IsValid() const;
+
+	/**
+	 * Returns the report state of this editor.
+	 * @return ETrue, if the editor is valid to report of a state change. 
+	 * EFalse otherwise.
+	 */
+	TBool IsValidToReport() const;
+
+	/**
+	 * Fills decimal field with zero decimal, if field is left in middle of 
+	 * typing.
+	 */
+	void FillDecimalField();
+
+	/**
+	 * Handle possible editor leave.
+	 *
+	 * @return ETrue, if editor can be left.
+	 */
+	TBool CanLeaveEditorL();
+
+    // from base class CCoeControl
+    /**
+     * From CCoeControl 
+     * @see CCoeControl::ConstructFromResourceL
+     */
+    void ConstructFromResourceL( TResourceReader& aResourceReader );
+
+    // from base class CEikMfne
+	/**
+	 * From CEikMfne OfferKeyEventL.	
+	 * @see CEikMfne::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType )
+	 */
+	TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
+	/**
+	 * From CEikMfne HandlePointerEventL.	
+	 * @see CEikMfne::HandlePointerEventL(const TPointerEvent& aPointerEvent)
+	 */
+	void HandlePointerEventL(const TPointerEvent& aPointerEvent);
+	
+	/**
+     * Updates minimum and maximum values of the fields.
+     */
+	void UpdateMinimumAndMaximum();
+	
+	/**
+     * Increments the current field.
+     */
+	void IncrementCurrentField();
+
+	/**
+     * Decrements the current field.
+     */
+	void DecrementCurrentField();
+	
+	void SetEditorReportState( TBool aReport );
+	
+	/**
+	 * Redraws editor and reports of state change.
+	 *
+	 * @param aForceDrawNow forces immediate draw
+	 */
+	void DrawAndReportL( TBool aForceDrawNow );
+
+    /*
+     * Set editor frame rect
+     * @param aRect editor frame rect 
+     */
+    void SetEditorFrameRect( const TRect& aRect );
+
+protected:  // Methods
+
+    // from base class CCoeControl
+	/**
+     * From CCoeControl 
+     *
+     * @see CCoeControl::FocusChanged( TDrawNow aDrawNow )
+     */
+	void FocusChanged( TDrawNow aDrawNow );
+
+private: //Methods
+
+	/**
+	 * Increments the integer field.
+	 */
+	void IncrementIntField();
+	
+	/**
+	 * Decrements the integer field.
+	 */
+	void DecrementIntField();
+	
+	/**
+	 * Increments the decimal field.
+	 */
+	void IncrementDecField();
+	
+	/**
+	 * Decrements the decimal field.
+	 */
+	void DecrementDecField();
+
+	/**
+     * Validates the values of the both fields.
+	 * Calls ValidateIntField and ValidateDecField,
+	 * but doesn't return anything.
+     */
+	void ValidateFields();
+
+	/**
+     * Validates the integer field. If field was changed, returns ETrue.
+     */
+	TBool ValidateIntField();
+
+	/**
+     * Validates the decimal field. If field was changed, returns ETrue.
+     */
+	TBool ValidateDecField();
+
+
+	
+
+
+private:    // Data
+	/** 
+	 * Minimum frequency got from RadioSettings. 
+	 */
+    TUint32	iMinFreq;
+    
+	/** 
+	 * Maximum frequency got from RadioSettings. 
+	 */
+    TUint32 iMaxFreq;
+    
+	/** 
+	 * Step frequency got from RadioSettings. 
+	 */
+    TUint32 iStepFreq;
+    
+	/** 
+	 * Current minimum value of integer field. 
+	 */
+	TInt iMinIntValue;
+	
+	/** 
+	 * Current maximum value of integer field. 
+	 */
+	TInt iMaxIntValue;
+	
+	/** 
+	 * Current minimum value of decimal field. 
+	 */ 
+	TInt iMinDecValue;
+	
+	/** 
+	 * Current maximum value of decimal field. 
+	 */ 
+	TInt iMaxDecValue;
+	
+	/** 
+	 * The field at the beginning of keypress. 
+	 */
+	TInt iPreviousField;
+	
+	/** 
+	 * ETrue, when user is in the middle of typing numbers in decimal 
+	 * field. 
+	 */
+	TBool iTypedInDecField;
+	
+	/** 
+	 * Editor is valid to report it's state (after internal validations). 
+	 */
+	TBool iValidToReport;
+	
+	/** 
+	 * Decimal field divider that is based on decimal count. 
+	 */
+	TUint32 iDecDiv;
+	/**
+	 * flag to set editor report state
+	 */
+	TBool iReportEditorState;
+	
+	TInt iIncrements;
+	
+	/*
+	 * Editor frame rect
+	 */
+	TRect iEditorFrameRect;
+
+    };
+
+#endif      // CFMRADIOFREQUENCYEDITOR_H   
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiofrequencynumber.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,214 @@
+/*
+* 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:  Header file for CFMRadioFrequencyNumber
+*
+*/
+
+
+#ifndef CFMRADIOFREQUENCYNUMBER_H
+#define CFMRADIOFREQUENCYNUMBER_H
+
+#include <eikmfne.h>
+
+/** Flags */
+enum
+	{
+	EFillWithLeadingZeros			=0x1,
+	EPreserveOldWidthBeforeEditing	=0x2,
+	ERepresentsYear					=0x4,
+	EPublicallySettableFlags		=EFillWithLeadingZeros|EPreserveOldWidthBeforeEditing|ERepresentsYear,
+	EIsBeingEditedWithCursor		=0x8,
+	EIsUninitialised				=0x10
+	};
+
+/**
+ * Custom field for frequency number.
+ */
+class CFMRadioFrequencyNumber : public CEikMfneField
+    {
+
+public:  // Methods
+
+    /**
+     * Static constructor.
+     */
+    static CFMRadioFrequencyNumber* NewL( 
+        const CFont& aFont, 
+        TInt aMinimumValue, 
+        TInt aMaximumValue, 
+        TInt aInitialValue, 
+        TUint32 aFlags );
+    
+    /**
+     * Destructor.
+     */
+    ~CFMRadioFrequencyNumber();
+
+	/**
+     * Sets new value in this number field.
+     *
+     * @param aValue New value
+     * @param aFont Current font
+     */
+	void SetValue( TInt aValue, const CFont& aFont );
+
+	/**
+     * Gets the value in this number field.
+     *
+     * @return Value
+     */
+	TInt Value() const;
+
+	/**
+     * Sets digit type of this number field.
+     *
+     * @param aDigitType New digit type
+     * @param aFont Current font
+     */
+	void SetDigitType( TDigitType aDigitType, const CFont& aFont );
+	
+	/**
+     * Gets digit type of this number field.
+     *
+     * @return aDigitType Digit type
+     */
+	TDigitType DigitType() const;
+    
+    // from base class CEikMfneField
+    /**
+     * From CEikMfneField 
+     *
+     * @see CEikMfneField::IsValid()
+     */
+    TBool IsValid() const;
+
+	/**
+     * From CEikMfneField 
+     * 
+     * @see CEikMfneField::IsEditable.
+     */
+	TBool IsEditable() const;
+
+	/**
+     * From CEikMfneField 
+     * 
+     * @see CEikMfneField::HighlightType.
+     */
+	THighlightType HighlightType() const;
+
+	/**
+     * From CEikMfneField 
+     * CEikMfneField::HandleKey( 
+     *    const CFont& aFont, 
+	 *    const TKeyEvent& aKeyEvent, 
+	 *    TBool aInterpretLeftAndRightAsEarEvents, 
+	 *    TBool& aDataAltered, 
+	 *    TInt& aHighlightIncrement 
+     */
+	void HandleKey(
+	    const CFont& aFont, 
+	    const TKeyEvent& aKeyEvent, 
+	    TBool aInterpretLeftAndRightAsEarEvents, 
+	    TBool& aDataAltered, 
+	    TInt& aHighlightIncrement );
+
+	/**
+     * From CEikMfneField 
+     *
+     * @see CEikMfneField::HandleDeHighlight( 
+     *     const CFont& aFont, 
+     *     CEikonEnv& aEikonEnv, 
+     *     TBool& aDataAltered, 
+     *     TBool& aError )  
+     */
+	void HandleDeHighlight(
+	    const CFont& aFont, 
+	    CEikonEnv& aEikonEnv, 
+	    TBool& aDataAltered, 
+	    TBool& aError);
+    
+protected:  // Methods
+
+private: //Methods
+
+	/**
+     * C++ default constructor.
+     */
+    CFMRadioFrequencyNumber( 
+        TInt aMinimumValue, 
+        TInt aMaximumValue, 
+        TUint32 aFlags );
+
+    /**
+     * By default Symbian 2nd phase constructor is private.
+     */
+    void ConstructL( const CFont& aFont, TInt aInitialValue );
+
+	/**
+     * Gets maximum width of this field in pixels.
+     */
+    TInt MaximumWidthInPixels( 
+        const CFont& aFont, 
+        TBool aShrinkToMinimumSize );
+
+	/**
+     * Gets input capabilities of this field.
+     */
+	TCoeInputCapabilities InputCapabilities() const;
+
+	/**
+     * Get textual representation of the value in this field.
+     */
+	const TDesC& Text() const;
+
+	/**
+     * Gets numerical representation of the value in this field.
+     */
+	TInt ValueFromText() const;
+
+private:    // Data
+	/** 
+	 * Minimum value of this field. 
+	 */
+    TInt iMinimumValue;
+    
+	/** 
+	 * Maximum value of this field. 
+	 */
+	TInt iMaximumValue;
+	
+	/** 
+	 * Maximum number of digits value in this field. 
+	 */
+	TInt iMaxDigits;
+	
+	/** 
+	 * Flags of this field. 
+	 */
+	TUint32 iFlags;
+	
+	/** 
+	 * Holds the value of this field. 
+	 */
+	HBufC* iText;
+	
+	/** 
+	 * Digit type of this field. 
+	 */
+	TDigitType iDigitType;
+
+    };
+
+#endif      // CFMRADIOFREQUENCYNUMBER_H   
+            
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiofrequencyquerycontrol.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,400 @@
+/*
+* 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:  Header file for CFMRadioFrequencyQueryControl
+*
+*/
+
+
+#ifndef FMRADIOFREQUENCYQUERYCONTROL_H
+#define FMRADIOFREQUENCYQUERYCONTROL_H
+
+#include	<aknEditStateIndicator.h>
+#include	<AknIndicatorContainer.h>
+#include	<aknQueryControl.h>
+
+// CONSTANTS
+
+const TInt KFMRadioFrequencyQueryDialogCustomAdditionHeight = 110;
+
+class CFMRadioFrequencyEditor;
+class CAknsFrameBackgroundControlContext;
+
+/**
+ * Custom query control for frequency query dialog.
+ */
+class CFMRadioFrequencyQueryControl : public CAknQueryControl
+    {
+
+public:  // Methods
+
+    /**
+     * C++ default constructor.
+     */
+    CFMRadioFrequencyQueryControl();
+    
+    /**
+     * Destructor.
+     */
+    ~CFMRadioFrequencyQueryControl();
+
+	/**
+     * This control is constructed by the system using this static method.
+     */
+	static SEikControlInfo StaticCreateCustomControl( TInt aIdentifier );
+
+    /**
+	 * Gets the frequency from the control
+	 *
+	 * @return Frequency
+     */
+    TUint32 Frequency() const;
+
+	/**
+	 * Sets the frequency to the control
+	 *
+	 * @param aFreq Frequency
+     */
+    void SetFrequency(const TUint32 aFreq);
+
+	/**
+	 * Handle possible editor leave.
+	 *
+	 * @return ETrue, if editor can be left.
+	 */
+	TBool CanLeaveEditorL();
+
+    // from base class CAknQueryControl
+	/**
+     * From CAknQueryControl
+     *
+     * @see CAknQueryControl::ControlByLayoutOrNull( TInt aLayout )
+     */
+    CCoeControl* ControlByLayoutOrNull( TInt aLayout );
+
+	/**
+     * From CAknQueryControl
+     * 
+     * @see CAknQueryControl::EditorContentIsValidL() const
+     */
+    TBool EditorContentIsValidL() const;
+
+	/**
+     * From CAknQueryControl
+     *
+     * @see CAknQueryControl::SetAndUseFlags( TBitFlags16 aFlags )
+     */
+    void SetAndUseFlags( TBitFlags16 aFlags );
+
+	/**
+	 * From CAknQueryControl
+	 *
+	 * @see CAknQueryControl::WindowLayout( TAknWindowLineLayout& aLayout ) 
+	 *  const
+	 */
+	void WindowLayout( TAknWindowLineLayout& aLayout ) const;
+
+
+    // from base class CCoeControl
+	/**
+     * From CCoeControl
+     *
+     * @see CCoeControl::PrepareForFocusLossL()
+     */
+    void PrepareForFocusLossL();
+
+	/**
+     * From CCoeControl
+     *
+     * @see CCoeControl::FocusChanged( TDrawNow aDrawNow )
+     */
+    void FocusChanged( TDrawNow aDrawNow );
+
+	/**
+     * From CCoeControl
+     *
+     * @see CCoeControl::CountComponentControls() const
+     */
+    TInt CountComponentControls() const;
+
+	/**
+     * From CCoeControl
+     *
+     * @see CCoeControl::ComponentControl( TInt aIndex ) const
+     */
+    CCoeControl* ComponentControl( TInt aIndex ) const;
+    
+    /**
+     * Is public so that callbacks may utilize this.
+     * Sets repeat intervals.
+     * 
+     * @param aAccelerated ETrue=accelerated speed, EFalse=default values
+     */
+    void SetAcceleratedLongPress(TBool aAccelerated);
+    
+    /**
+     * From CCoeControl
+     * 
+     * @see CCoeControl::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType )
+     * */
+    TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
+    
+    // from base class MCoeControlObserver
+	/**
+     * From MCoeControlObserver
+     *
+     * @see MCoeControlObserver::HandleControlEventL( 
+     *    CCoeControl* aControl, 
+     *    TCoeEvent aEventType )
+     */
+    void HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType );
+
+	class CFMRadioManualTuningEditorIndicator : public CAknIndicatorContainer, public MAknEditingStateIndicator
+		{
+		public:
+			
+			static CFMRadioManualTuningEditorIndicator* NewL(CCoeControl* aControl);
+			
+			~CFMRadioManualTuningEditorIndicator();
+
+			/**
+			 * From MAknEditingStateIndicator
+			 */
+			void SetState(TAknEditingState aState); 
+
+			/**
+			 * From MAknEditingStateIndicator
+			 */
+			CAknIndicatorContainer* IndicatorContainer();
+
+			/**
+			 * Sets the information about the query flags.
+			 */
+			void SetFlags(TBitFlags16 aFlags);
+
+		private:
+		
+			CFMRadioManualTuningEditorIndicator();
+
+			void ConstructL(CCoeControl* aControl);
+            
+            // from base class CAknIndicatorContainer
+			/**
+			* From CAknIndicatorContainer
+			* 
+			* @see CAknIndicatorContainer::Reserved_1()
+			*/
+			void Reserved_1();
+
+		private:
+			/** 
+			 * Flags 
+			 */
+			TBitFlags16 iBitFlags;
+
+		};
+	
+		public:
+	    /**
+	     * Manage indexes into LAF tables
+	     */
+	    class TIndex 
+	    {   
+	    public:     
+	        TIndex(TInt aNumberOfPromptLines);  
+	    
+	    public: 
+	        TInt PromptLine() const;    
+	        
+	    public: 
+	        TInt DQPWindowTextsLine2(TInt aLineNum) const;  
+	        TInt PNWindow() const;  
+	        TInt PQDWindow(TInt aLineNum) const;    
+	        TInt PQCWindow() const;
+	        
+	    private:    
+
+	
+	    private:    
+	        TInt  iNumberOfPromptLines; 
+	    };  
+    
+protected:  // Methods
+
+    // from base class
+    /**
+     * From CAknQueryControl
+     * 
+     * @see CAknQueryControl::ConstructQueryL( TResourceReader& aRes )
+     */
+    void ConstructQueryL( TResourceReader& aRes );
+
+	/**
+     * From CAknQueryControl
+     *
+     * @see CAknQueryControl::LayoutEditor( const TLayoutMethod& aLayoutM )
+     */
+	void LayoutEditor( const TLayoutMethod& aLayoutM );
+
+    /**
+     * From CAknQueryControl
+     *
+     * @see CAknQueryControl::LayoutPrompt( const TLayoutMethod& aLayoutM )
+     */
+	void LayoutPrompt( const TLayoutMethod& aLayoutM );
+
+    /**
+     * From CAknQueryControl
+     *
+     * @see CAknQueryControl::LayoutImageOrAnim( 
+     *    const TLayoutMethod& aLayoutM )
+     */
+    void LayoutImageOrAnim( const TLayoutMethod& aLayoutM );
+
+    /**
+     * From CAknQueryControl
+     *
+     * @see CAknQueryControl::LayoutEditorFrame( 
+     *    const TLayoutMethod& aLayoutM )
+     */
+    void LayoutEditorFrame( const TLayoutMethod& aLayoutM );
+
+    /**
+     * From CAknQueryControl
+     *
+     * @see CAknQueryControl::LayoutEditorIndicator( 
+     *    const TLayoutMethod& aLayoutM )
+     */
+    void LayoutEditorIndicator( const TLayoutMethod& aLayoutM );
+
+    /**
+     * From CAknQueryControl
+     *
+     * @see CAknQueryControl::LayoutRect()
+     */
+	TRect LayoutRect();
+
+    /**
+     * From CAknQueryControl
+     *
+     * @see CAknQueryControl::SetLineWidthsL();
+     */
+	void SetLineWidthsL();
+
+	/**
+     * From CCoeControl
+     *
+     * @see CCoeControl::Draw( const TRect& aRect ) const
+     */
+    void Draw( const TRect& aRect ) const;
+
+    /**
+     * Draw editor frame and shadows
+     */
+     void DrawFrequencyEditorFrame(CWindowGc& aGc,TRect& aRect) const;
+     
+	/**
+     * From CCoeControl
+     *
+     * @see CCoeControl::SizeChanged()
+     */
+    void SizeChanged();
+
+	/**
+    * From MObjectProvider
+    *
+    * @see MObjectProvider::MopSupplyObject( TTypeUid aId )
+    */
+    TTypeUid::Ptr MopSupplyObject( TTypeUid aId );
+    
+    /**
+    * From CCoeControl.
+    * @see CCoeControl::HandlePointerEventL()
+    */
+    void HandlePointerEventL( const TPointerEvent& aPointerEvent );
+    
+private:    // Methods
+    
+    /**
+     * Starts timer to accelerate long press repeat interval
+     */
+    void StartKeypress();
+    
+    /**
+     * Instructs frequency editor component to update the appropriate field
+     * if it is possible (user is not typing numbers). Update is either
+     * incrementing or decrementing depending on state of iChangeDirectionIncrease.
+     * If it is ETrue, the desired action is to increment the value.
+     */
+    void DoIncrementOrDecrement();
+
+    /**
+     * Callback for iLongPressAccelerationTimer
+     * Speeds up repeated key event interval.
+     * See CPeriodic::Start()
+     * 
+     * @param aAny pointer to self
+     * 
+     * @return ignored
+     */
+    static TInt LongPressAccelerateCallBack( TAny* aAny );
+    
+    /**
+     * Callback for iLongPressTimer
+     * Called repeatedly to act as long keypress repeat event.
+     * See CPeriodic::Start()
+     * 
+     * @return ignored
+     */
+    static TInt LongPressTimerCallBack( TAny* aAny );
+    
+private:    // Data
+
+	/** 
+	 * Prompt 
+	 */
+    CEikLabel* iMyPrompt;
+    
+	/**  
+	 * Editor indicator 
+	 */
+    CFMRadioManualTuningEditorIndicator* iMyEditorIndicator;
+	
+	/** 
+	 * Editor 
+	 */
+    CFMRadioFrequencyEditor*	iFreqEditor;
+    
+	/** 
+	 * A control context that provides a layout background generated from a frame item 
+	 */
+    CAknsFrameBackgroundControlContext* iEditorContext;
+     /**
+     * Accelerates manual tuning speed after two seconds
+     */
+    CPeriodic* iLongPressAccelerationTimer;
+    
+    CPeriodic* iLongPressTimer;
+    
+    /**
+     * State of current keypress. Value is valid only between EEventKeyDown
+     * and EEventKeyUp.
+     * ETrue == increment, EFalse == decrement
+     */
+    TBool iChangeDirectionIncrease;
+    
+    TBool iKeyPressReported;
+    
+    };
+
+#endif      // FMRADIOFREQUENCYQUERYCONTROL_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiofrequencyquerydialog.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,109 @@
+/*
+* 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:  Header file for CFMRadioFrequencyQueryDialog
+*
+*/
+
+
+#ifndef FMRADIOFREQUENCYQUERYDIALOG_H
+#define FMRADIOFREQUENCYQUERYDIALOG_H
+
+#include <AknQueryDialog.h>
+
+/**
+ * Custom query dialog for frequency.
+ */
+class CFMRadioFrequencyQueryDialog : public CAknQueryDialog
+    {
+
+public:  // Methods
+
+    /**
+     * Static constructor.
+     */
+    static CFMRadioFrequencyQueryDialog* NewL( TUint32& aFreq, 
+        const TTone& aTone = ENoTone );
+    
+    /**
+     * Destructor.
+     */
+    ~CFMRadioFrequencyQueryDialog();
+
+	/**
+     * Returns the frequency currently set in this dialog.
+     *
+     * @return ?description
+     */
+	TUint32 Frequency() const;
+
+    // from base class MAknQueryControlObserver
+	/**
+     * From MAknQueryControlObserver 
+     *
+     * @see MAknQueryControlObserver::HandleQueryEditorStateEventL
+	 */
+	TBool HandleQueryEditorStateEventL( 
+	    CAknQueryControl* aQueryControl, 
+	    TQueryControlEvent aEventType, 
+	    TQueryValidationStatus aStatus );
+    
+protected:  // Methods
+   
+    // from base class CAknQueryDialog
+    /**
+     * From CAknQueryDialog 
+     * 
+     * @see CAknQueryDialog::QueryControl() const
+     */
+    CAknQueryControl* QueryControl() const;
+
+	/**
+	 * From CAknQueryDialog 
+	 * 
+	 * @see CAknQueryDialog::UpdateLeftSoftKeyL()
+	 */
+	void UpdateLeftSoftKeyL();
+
+	/**
+     * From CAknQueryDialog OkToExitL
+     */
+	TBool OkToExitL(TInt aButtonId);
+
+    // from base class CEikDialog
+	/**
+     * From CEikDialog
+     *
+     * @see CEikDialog::PreLayoutDynInitL()
+     */
+	void PreLayoutDynInitL();
+
+private: //Methods
+
+	/**
+     * C++ default constructor.
+     */
+    CFMRadioFrequencyQueryDialog( TUint32& aFreq, const TTone& aTone = ENoTone );
+
+
+private:
+
+	/** 
+	 * Current frequency 
+	 */
+    TUint32& iFreq;
+
+    };
+
+#endif      // FMRADIOFREQUENCYQUERYDIALOG_H   
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradioglobalconfirmationquery.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,112 @@
+/*
+* Copyright (c) 2006-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:  Header file of CFMRadioGlobalConfirmationQuery
+*
+*/
+
+
+#ifndef C_CFMRADIOGLOBALCONFIRMATIONQUERY_H
+#define C_CFMRADIOGLOBALCONFIRMATIONQUERY_H
+
+#include <e32base.h>
+
+class CAknGlobalConfirmationQuery;
+
+/**
+* Observer for global confirmation query event.
+*/
+class MFMRadioGlobalConfirmationQueryObserver
+	{
+	public:
+
+    /**
+	 * Callback function that is called when global confirmation
+	 * query is dismissed.
+	 *
+	 * @param aSoftKey The softkey used to dismiss the query.
+	 */
+	virtual void GlobalConfirmationQueryDismissedL(TInt aSoftKey) = 0;
+	};
+
+
+/**
+ *  FM Radio global confirmation query.
+ *
+ *  Must be deleted after used once.
+ */
+class CFMRadioGlobalConfirmationQuery : public CActive
+    {
+
+public:
+    
+	/**
+	 * Static constructor.
+	 */
+    static CFMRadioGlobalConfirmationQuery* NewL(MFMRadioGlobalConfirmationQueryObserver* aObserver = NULL);
+    
+    /**
+	 * Static constructor.
+	 */
+    static CFMRadioGlobalConfirmationQuery* NewLC(MFMRadioGlobalConfirmationQueryObserver* aObserver = NULL);
+
+    /**
+     * Destructor.
+     */
+    virtual ~CFMRadioGlobalConfirmationQuery();
+    
+    /**
+     * Shows the query.
+     *
+     * @param   aText       Query text.
+     * @param   aSoftkeys   Query softkeys.
+     * @param   aAnimation  Query animation.
+     */
+    void ShowQueryL(const TDesC& aText, TInt aSoftkeys, TInt aAnimation);
+
+// From base class CActive
+protected: 
+    void RunL();
+    void DoCancel();
+    TInt RunError(TInt aError);
+
+private:
+    /**
+     * C++ default constructor.
+     */
+    CFMRadioGlobalConfirmationQuery(MFMRadioGlobalConfirmationQueryObserver* aObserver = NULL);
+
+    /**
+     * 2nd phase constructor.
+     */
+    void ConstructL();
+
+private: // data
+
+    /**
+     * Pointer to avkon global confirmation query. Owned!
+     */
+    CAknGlobalConfirmationQuery*        iAknGlobalConfirmationQuery;
+    
+    /**
+     * Text of global confirmation query. Owned!
+     */
+    HBufC*                              iText;
+                               
+    /**
+     * Observer for global confirmation query. Not owned!
+     */
+    MFMRadioGlobalConfirmationQueryObserver* iObserver; 
+    };
+
+#endif // C_CFMRADIOGLOBALCONFIRMATIONQUERY_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradioidlecontrolinterface.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,46 @@
+/*
+* 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 an interface for handling the media idle components
+*
+*/
+
+#ifndef FMRADIOIDLECONTROLINTERFACE_H_
+#define FMRADIOIDLECONTROLINTERFACE_H_
+
+/*
+ * Interface for handling the media idle components.
+ * Media idle visuals are controlled solely through this interface.
+ */
+class MFMRadioIdleControlInterface
+    {
+    public:
+        /*
+         * Show the component with fade in 
+         */
+        virtual void Show() = 0;
+        
+        /*
+         * Hide the component with fade out
+         */
+        virtual void Hide() = 0;
+        
+        /*
+         * Deactivates control. Used for example
+         * foreground and background events. 
+         */
+        virtual void Deactivate() = 0;
+    };
+
+
+#endif /* FMRADIOIDLECONTROLINTERFACE_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradioidlecontroller.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,88 @@
+/*
+* 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:  fmradio idle area controller
+*
+*/
+
+#ifndef CMRADIOIDLECONTROLLER_H
+#define CMRADIOIDLECONTROLLER_H
+
+// INCLUDES
+#include <e32base.h> 
+
+// FORWARD DECLARATIONS
+class MFMRadioIdleControlInterface;
+// CONSTANTS
+
+/**
+ * fmradio idle area controller
+ */
+class CFMRadioIdleController : public CBase
+    {
+
+    public:         
+        /**
+         * Two-phased constructor.
+        */
+        static CFMRadioIdleController* NewL();
+		
+        /**
+         * Destructor.
+         */
+        virtual ~CFMRadioIdleController();
+            
+    public: // New functions
+        /**
+         * Adds new item to control.
+         * @aControl control to add
+         */
+        void AddControlItem( const MFMRadioIdleControlInterface& aControl );
+        
+        /**
+         * Shows a control and hides all other controls
+         * @param aControl control to show
+         */
+        void ShowControl( const MFMRadioIdleControlInterface& aControl );
+        
+        /**
+         * Deactivates all controlled items
+         */
+        void DeactivateControls();
+        
+        /**
+         * Hide all controlled items
+         */
+        void HideAllControls();
+        
+    private:
+        /**
+         * C++ default constructor.
+         */        
+        CFMRadioIdleController();
+
+        /**
+        * EPOC default constructor.
+        */        
+        void ConstructL();
+        
+        
+    private: // data
+        // array of controlled items
+        RPointerArray<MFMRadioIdleControlInterface> iControlArray;
+
+
+    };
+
+
+#endif // CMRADIOIDLECONTROLLER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiologo.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,185 @@
+/*
+* 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:  Definition of the class CFMRadioLogo.
+*
+*/
+
+
+#ifndef FMRADIOALFLOGO_H
+#define FMRADIOALFLOGO_H
+
+// INCLUDES
+
+#include <alf/alfcontrol.h>
+
+#include "fmradioidlecontrolinterface.h"
+// FORWARD DECLARATIONS
+
+class CAlfImageVisual;
+class MFMRadioLogoObserver;
+class CAlfAnchorLayout;
+
+// CLASS DEFINITION
+
+/**
+* Class for handling the radio icon
+* 
+*/ 
+class CFMRadioLogo : public CAlfControl,
+                        public MFMRadioIdleControlInterface
+    {
+    public:    // Constructors and destructor
+        /**
+        * Epoc two-phased constructor.
+        * @param aEnv Reference to the Alf environment instance.
+        * @return Pointer to this Indicator component.
+        */
+        static CFMRadioLogo* NewL( CAlfEnv& aEnv );
+        
+        /**
+        * Destructor
+        */
+        virtual ~CFMRadioLogo();
+
+    public:    // New functions
+        /**
+        * Sets the indicator opacity in visible state.
+        * @param aOpacity The indicator opacity
+        */
+        void SetOpacityInVisibleState( const TReal aOpacity );
+        
+        /**
+        * Sets the indicator opacity in hidden state.
+        * @param aOpacity The indicator opacity
+        */
+        void SetOpacityInHiddenState( const TReal aOpacity );
+        
+        /** 
+        * Sets the indicator rectangle
+        * @param aRect Rectangle to the indicator
+        */
+        void SetRect( const TRect& aRect );
+        
+        /** 
+        * Sets the Observer
+        * @param aObserver The object to observe the control
+        */
+        void SetObserver( MFMRadioLogoObserver* aObserver );
+        
+        /** 
+        * Removes the observer
+        */
+        void RemoveObserver( MFMRadioLogoObserver* aObserver );
+        
+        /** 
+        * Switch to landscape image.
+        * @param aShow. ETrue for landscape, EFalse for portrait 
+        */        
+        void SwitchToLandscapeImage( TBool aShow );
+        
+    private:
+        /**
+        * C++ default constructor
+        */
+        CFMRadioLogo ();
+        
+        /**
+        * EPOC second phase constructor.
+        * @param aEnv Reference to the Hitchcock environment instance.
+        */
+        void ConstructL( CAlfEnv& aEnv );
+        
+    private: // Functions from base classes
+        /**
+        * from MFMRadioIdleControlInterface
+        */
+        void Show();
+        
+        /**
+        * from MFMRadioIdleControlInterface
+        */
+        void Hide();
+        
+        /**
+        * from MFMRadioIdleControlInterface
+        */        
+        void Deactivate();
+
+        /**
+        * from CAlfControl
+        */
+        TBool OfferEventL( const TAlfEvent& aEvent );
+        
+    private:    // New functions
+        /**
+        * Sets the fading animation to the CAlfVisual object.
+        * @param aVisual a pointer to the visual object
+        * @param aFadingTime Time duration after the visual object has been faded. Fading duration in milliseconds. 
+        * @param aOpacity Target opacity value
+        */
+        void Fade( CAlfVisual* aVisual, TInt aFadingTime, TReal aOpacity );
+        
+        /**
+        * Sets absolute rect of the anchor by top left and bottom right points.
+        * @param aAnchor Anchor layout for setting placement
+        * @param aOrdinal Index of visual element
+        * @param aTopLeftPosition Top left point of the rect
+        * @param aBottomRightPosition Bottom right point of the rect
+        */
+        void SetAbsoluteCornerAnchors( CAlfAnchorLayout* aAnchor,
+                                       TInt aOrdinal,
+                                       const TPoint& aTopLeftPosition,
+                                       const TPoint& aBottomRightPosition );
+        /**
+        * Creates the needed drawing layers and visual objects
+        * for the logo.
+        */
+        void CreateImageVisualsL();
+        
+    private:
+        /**
+         * Alf custom events for the logo fade effects.
+         * Logo stays visible couple of seconds after the
+         * fade in event. 
+         */
+        enum TFadeCustomEvent
+            {
+            EFadeInCompleted,               // Fade in completed.
+            ELogoDisplayTimerCompleted      // Visibility time ended.
+            };
+
+    private:// Data
+        /** Anchor layout for the logo. Not owned */
+        CAlfAnchorLayout* iLogoAnchor;
+        /** logo opacity in visible state */
+        TReal iOpacityInVisibleState;
+        /** logo opacity in hidden state */
+        TReal iOpacityInHiddenState;
+        /** logo rectangle */
+        TRect iRect;
+        /** Array of observers. */
+        RPointerArray<MFMRadioLogoObserver> iObservers;
+        // visual containing the default radio icon. Not owned
+        CAlfImageVisual* iImageVisual;
+        // default radio icon in portrait mode
+        TAlfImage iPortraitImage;
+        // default radio icon in landscape mode
+        TAlfImage iLandscapeImage;
+        /** File name for the background bitmap. Owned. */
+        HBufC* iBackgroundBitmapFileName;
+        // flag for visibility status
+        TBool iIsVisible;
+    };
+
+#endif //FMRADIOALFLOGO_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiologoobserver.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,32 @@
+/*
+* 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 an interface for observing radio logo event
+*
+*/
+
+#ifndef FMRADIOALFLOGOOBSERVER_H_
+#define FMRADIOALFLOGOOBSERVER_H_
+
+/*
+ * Interface for observing radio logo event
+ */
+class MFMRadioLogoObserver
+    {
+    public:
+        /*
+         * Logo visibility time has ended
+         */
+        virtual void LogoDisplayTimeCompleted() = 0;
+    };
+#endif /* FMRADIOALFLOGOOBSERVER_H_ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiomaincontainer.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,290 @@
+/*
+* Copyright (c) 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:  Definition of the class CFMRadioMainContainer.
+*
+*/
+
+
+#ifndef FMRADIOMAINCONTAINER_H
+#define FMRADIOMAINCONTAINER_H
+
+// INCLUDES
+
+#include <AknUtils.h>
+#include <alf/alfenv.h> 
+#include <hwrmlight.h>
+#include <hwrmlightdomaincrkeys.h>
+
+#include "fmradio.hrh"
+#include "fmradioappui.h"
+
+// FORWARD DECLARATIONS
+
+class CRadioEngine;
+class CFMRadioAlfVisualizer;
+class CFMRadioAlfMediaIdle;
+class CFMRadioAlfIndicator;
+class CFMRadioAlfRDSViewer;
+class CFMRadioIdleController;
+class CFMRadioLogo;
+// CLASS DECLARATION
+/**
+* Interface to tell when timeout event occured
+*
+*    @since 2.6
+*/
+class MFMRadioTimer
+	{
+	public: 
+	
+		virtual void TimerTimeOut( TInt aErrorStatus ) = 0;
+	
+	};
+
+/**
+* Active object to handle timer timeout events
+*
+*    @since 2.6
+*/	
+class CFMRadioTimer : public CActive	
+	{
+	public: 
+		/**
+        * Constructor
+        * @param aTimerObserver observer for active object
+        */
+		CFMRadioTimer( MFMRadioTimer* aTimerObserver );
+		/**
+        * Destructor
+        */
+        ~CFMRadioTimer();
+        /**
+        * ActiveObject RunL, which calls observer interface when completes
+        */
+		void RunL();
+		/**
+        * ActiveObject DoCancel, which calls observer interface when completes 
+        */
+		void DoCancel();
+		/**
+        * Activated active object
+        */
+        void Activate();
+		
+	private:
+		// Active object observer
+		MFMRadioTimer* iTimerObserver;
+	
+	};
+	
+	
+/**
+*  Creates and owns the UI controls related to the main view.
+*  
+*/
+class CFMRadioMainContainer : public CBase,
+                      		public MHWRMLightObserver,
+							public MFMRadioTimer
+
+    {
+    public: // Constructors and destructor
+        /**
+        * Two-phase constructor of CFMRadioMainContainer
+        * @since 2.6
+        * @param aRect Frame rectangle for container.
+        * @param aAlfEnv A reference to the alfred environment
+        * @param aRadioEngine A pointer to the radio engine
+        */
+        static CFMRadioMainContainer* NewL( const TRect& aRect, 
+        									CAlfEnv& aAlfEnv,
+        									CRadioEngine& aRadioEngine );        
+		/**
+        * Destructor.
+        * @since 2.6
+        */
+        virtual ~CFMRadioMainContainer();
+
+    public: // New functions
+        /**
+        * Display the channel information
+        * @since 2.6
+        * @param aChannelNumber the channel number to display
+        * @param aStationName the station name to display
+        * @param aChangeType Station change type for the animation
+        * @param aFrequency of the channel
+        */
+        void DisplayChannelInfoL( TInt aChannelNumber, 
+                                  const TDesC& aStationName,
+                                  TFMRadioStationChangeType aChangeType, 
+        						  TInt aFrequency );
+        
+        /**
+         * Formats the frequency number and returns it as a descriptor. 
+         * Ownership of the returned string is transfered.
+         * @param aFrequency The frequency to be formatted
+         * @param aResourceId The resource to be used for formatting the string
+         * @return The formatted frequency
+         */
+        HBufC* FormattedFrequencyStringL( TInt aFrequency, TInt aResourceId );
+        
+        /**
+    	* Dims or undims RDS information
+    	* @param   aShow           <code>ETrue</code> if RDS marquee is to be shown, <code>EFalse</code> otherwise.
+    	* @param   aFade           <code>ETrue</code> if fade effect it to be used, <code>EFalse</code> otherwise.
+    	* @param   aShowAfMarquee  <code>ETrue</code> if AF marquee is also to be shown, <code>EFalse</code> otherwise.
+    	*                          This only has effect if aShow is <code>ETrue</code>.
+    	*/
+    	void ShowRdsInfo( TBool aShow, TBool aFade, TBool aShowAfMarquee = EFalse);
+
+    	/**
+    	 * Sets RT+ interaction indicator visible or invisible.
+    	 * 
+    	 * The indicator is "MusicStore" or "+" depending on KRadioRTPlusSupportLevel cenrep value.
+    	 * When it is off, only music store interaction is supported and the indicator is set likewise.
+    	 * 
+    	 * @param aVisible sets the visibility
+    	 * @param aFadeEffect to use transition fade effect or not
+    	 */
+        void ShowRTPlusInteractionIndicator( TBool aVisible, TBool aFadeEffect);
+        
+        /**
+        * Fades the entire window and controls in the window owned by this container control.
+        * @since 2.6
+        * @param aFaded true/false to indicate whether the view should fade/unfade
+        */
+        void SetFaded( TBool aFaded );
+        /**
+        * Handles resource changes
+        * @param aType Resource change type
+        */
+        void HandleResourceChange(TInt aType);	
+        /**
+  	    * Sets rectangle of the alfred display
+  	    * @param aRect Display rectangle
+  	    * @return none
+  	    */ 
+        void SetRect( const TRect& aRect );           
+        /**
+        * Returns a pointer to the station information visualizer
+        * @return VisualControl
+        */
+    	CFMRadioAlfVisualizer* VisualControl();
+    	/**
+    	* Returns a reference to the Media Idle 
+    	* @return Media Idle
+    	*/
+    	CFMRadioAlfMediaIdle&  MediaIdle();
+    	
+    	/**
+    	* Updates RDS text to display  
+    	* @return Media Idle
+    	*/
+    	void SetRdsRadioTextL( const TDesC& aRadioText );
+    	 /**
+		* From MHWRMLightObserver
+		* Lights status has been changed
+		*/
+		void LightStatusChanged(TInt aTarget, 
+                                        CHWRMLight::TLightStatus aStatus);
+		/**
+        * From MFMTimer To handle timer timeout events.
+        */
+        void TimerTimeOut( TInt aErrorStatus );
+
+        /**
+         * Returns a reference to the RDS Viewer
+         * @return RDS Viewer
+         */
+        CFMRadioAlfRDSViewer& RdsViewer() const;
+        /**
+         * Returns a reference to the idle controller
+         * @return idle controller
+         */		
+        CFMRadioIdleController& IdleController() const;
+        /**
+         * Returns a reference to the logo visual
+         * @return logo visual 
+         */
+        CFMRadioLogo& Logo() const;
+
+    private: // New functions
+        /**
+        * Called when the view size is changed
+        */
+        void SizeChanged();
+		/**
+        * Required for help.
+		* @since 2.7
+		* @param aContext the help context to be used.
+        */
+        void GetHelpContext(TCoeHelpContext& aContext) const;        	    
+    	/**
+		* C++ default constructor
+        * @param aAlfEnv A reference to the alfred environment
+        * @param aRadioEngine A pointer to the radio engine
+		*/
+		CFMRadioMainContainer( CAlfEnv& aAlfEnv, CRadioEngine& aRadioEngine );
+        /**
+        * EPOC default constructor
+        * @since 2.7
+        * @param aRect Frame rectangle for container.
+        */
+        void ConstructL( const TRect& aRect );
+        /**
+        * Handles updating main area text colors using current skin
+        * @since 3.0
+        */
+        void UpdateTextColorFromSkin();
+
+    private: //data
+        
+		TBool iFadeStatus;
+		TRect  iMainPaneRect;
+		
+		 /** Visualizer for the radio information. Not owned. */
+		CFMRadioAlfVisualizer* iVisualControl;
+		/** Media Idle. Not owned. */
+		CFMRadioAlfMediaIdle*  iMediaIdle;
+		/** RDS indicator. Not owned. */
+	    CFMRadioAlfIndicator*  iRdsIndicator;
+		/** RDS AF indicator. Not owned. */
+	    CFMRadioAlfIndicator*  iRdsAfIndicator;
+		/** RDS viewer. Not owned. */
+	    CFMRadioAlfRDSViewer* iRdsViewer;
+        /** RDS interaction (music store, web link etc.) indicator. Not owned. */
+        CFMRadioAlfIndicator*  iRdsInteractionIndicator;
+	    /** A reference to the alfred environment. */
+	    CAlfEnv& iAlfEnv;		
+		/** A reference to the radio engine */
+		CRadioEngine& iRadioEngine;			    
+	    /** A pointer to the control environment */
+	    CCoeEnv* iCoeEnv;	    
+	    /**Light event informer*/
+	    CHWRMLight* iLight;
+       	/**timer for light dimmed handler*/
+       	RTimer timer;
+       	/**Active object to handle lights dimmed timer */
+       	CFMRadioTimer* iTimer;
+       	/**Frame counter */
+       	TInt iLightsOffCounter;
+        // Media idle controller. Owned
+        CFMRadioIdleController* iIdleController;
+        // Alf image visual for the default radio icon. Not Owned
+        CFMRadioLogo* iRadioLogo;
+
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiomainview.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,320 @@
+/*
+* 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:  Definition of the class CFMRadioMainView.
+*
+*/
+
+
+#ifndef FMRADIOMAINVIEW_H
+#define FMRADIOMAINVIEW_H
+
+// INCLUDES
+#include <aknview.h>
+#include <alf/alfenv.h>
+#include <akntoolbarobserver.h> 
+
+#include "mfmradiolayoutchangeobserver.h"
+#include "fmradiordsobserver.h"
+#include "fmradio.hrh"
+#include "mchannellisthandler.h"
+#include "fmradioalfrdsviewobserver.h"
+#include "fmradiologoobserver.h"
+
+// FORWARD DECLARATIONS
+class CFMRadioMainContainer;
+class CRadioEngine;
+class CFMRadioMusicStoreHandler;
+
+// CLASS DECLARATION
+
+/**
+*  CFMRadioMainView view class.
+* 
+*    @since 2.6
+*/
+class CFMRadioMainView : public CAknView, 
+                         public MFMRadioLayoutChangeObserver,
+                         public MFMRadioRdsObserver,
+                         public MAknToolbarObserver,
+                         public MFMRadioAlfRdsViewObserver,
+                         public MFMRadioLogoObserver
+    {
+    public: // Constructors and destructor
+        /**
+        * Two-phase constructor of CFMRadioMainView
+        * @since 2.6
+        * @param aRadioEngine pointer to the radio engine object
+        * @param aAlfEnv alfred environment reference
+        * @param aObserver channel list handler 
+        */
+        static CFMRadioMainView* NewL( 
+        			CRadioEngine* aRadioEngine, 
+        			CAlfEnv& aAlfEnv,
+        			MChannelListHandler& aObserver );
+        /**
+        * Destructor.
+        * @since 2.6
+        */
+        virtual ~CFMRadioMainView();
+    public: // New functions
+        /**
+        * Return the unique identifier corresponding to this view
+        * @since 2.6
+        * @return unique view identifier
+        */
+        TUid Id() const;
+        /**
+        * Fade the view and all controls associated with it. Change
+        * the soft keys so that "Exit" is displayed
+        * @since 2.6
+        * @param aFaded flag whether to fade or unfade
+        */
+        void FadeAndShowExit( TBool aFaded );
+        /**
+        * Update display when focus is regained
+        * @since 3.0
+        */
+        void UpdateDisplayForFocusGained();
+        /**
+        * Tells the window owning container to display seek note
+        * and updates softkeys
+        * @since 2.6
+        */
+        void SeekL();
+        /**
+        * Seek operation has completed. Update the view to reflect
+        * this fact.
+        * @since 2.6
+        */
+        void StopSeekL();
+        /**
+        * Inform the window owning container that it should display
+        * the frequency and name of the channel specified
+        * @since 2.6
+        * @param aChannelIndex The index of the channel to display
+        */
+        void DisplayChannelL( TInt aChannelIndex );
+        /**
+        * from MFMRadioLayoutChangeObserver
+		* This method gets called by the AppUI when a dynamic layout change
+		* event occurs.
+		*/
+		void LayoutChangedL( TInt aType );
+	
+		/**
+		 * Sets the type for forthcoming station change
+		 * @param aChangeType The change type
+		 */
+		void SetStationChangeType( TFMRadioStationChangeType aChangeType );
+		
+		/*
+		 * called before channel is about to change
+		 * */
+		void PrepareViewForChannelChange();
+
+		/**
+		* Sets toolbar visibility
+		* @param aVisible 
+		* @return none
+		*/
+		void ShowToolbar( TBool aVisible );
+		 
+	    /**
+	    *  From base class MFMRadioRdsObserver
+	    */
+	    void RdsDataProgrammeService( const TDesC& aProgramService );
+	    void RdsDataPsNameIsStatic( TBool aStatic );
+	    void RdsDataRadioText( const TDesC& aRadioText );
+        void RdsDataRadioTextPlus( const TInt aRadioTextPlusClass, const TDesC& aRadioText );
+	    void RdsAfSearchBegin();
+	    void RdsAfSearchEnd( TUint32 aFrequency, TInt aError );
+	    void RdsAfSearchStateChange( TBool aEnabled );
+	    void RdsAvailable( TBool aAvailable );
+
+	    /*
+	     * Requests the right idle component to be started  
+	     */
+        void DetermineActiveMediaIdleComponent();
+        
+        /*
+         * Shows default radio logo
+         */
+        void ShowDefaultLogo();
+
+    private:  // New functions
+        /**
+        * EPOC default constructor.
+        * @since 2.6
+        */
+        void ConstructL();
+        /**
+        * constructor.
+        * @since 2.6
+        * @param aRadioEngine pointer to the radio engine object
+        * @param aAlfEnv alf environment 
+        * @param aObserver
+        */
+        CFMRadioMainView( CRadioEngine* aRadioEngine, CAlfEnv& aAlfEnv, MChannelListHandler& aObserver  );
+        /**
+         * Shows a tutorial dialog when user sees RT+ interaction indicator
+         * for the very first time.
+         */
+        void ShowRTPlusFirstTimeDialogL();
+        /**
+         * Determines if RT+ interaction indicator should be shown, based on if
+         * data is available in iSongName, iArtistName and iWebUrl.
+         * 
+         * @return ETrue if there is valid data for RT+ interactions 
+         */
+        TBool IsRTPlusInterActionIndicatorNeeded();
+        /**
+         * StaticRdsSignalTimerCallback Callback for iRdsSignalTimer
+         */
+        static TInt StaticRdsSignalTimerCallback( TAny* aSelfPtr );
+       	/**
+        * Prepare toolbar for FMRadio command buttons
+        */
+		void PrepareToolbar();
+		/**
+        * Set the current dimmed state of the toolbar 
+        * @param aState the new toolbar dimmed state
+        */
+        void SetToolbarDimmedState( TBool aState );
+
+        /**
+         * Checks if the rds feed has a web link 
+         */
+        TBool IsWebLinkAvailable();
+        
+        /**
+         * Updates speaker button state in the toolbar
+         * extension list
+         */
+        void UpdateToolbarSpeakerButtonStatus();
+        
+    private: // Functions from base classes
+        /**
+        * All commands are handled by the AppUi
+        * @since 2.6
+        * @param aCommand key code of the command to handle
+        */
+        void HandleCommandL( TInt aCommand );
+        /**
+        * From base class CAknView 
+        */
+        void HandleForegroundEventL( TBool aForeground );
+        /**
+        * Activate the main view
+        * @since 2.6
+        */
+        void DoActivateL( const TVwsViewId& aPrevViewId,TUid aCustomMessageId, const TDesC8& aCustomMessage );
+        /**
+        * Deactivate the main view
+        * @since 2.6
+        */
+        void DoDeactivate();
+        /**
+        * From MEikMenuObserver, for changing menu items dynamically.
+        *
+        * @param aResourceId Resource ID identifying the menu pane to initialise.
+        * @param aMenuPane The in-memory representation of the menu pane.
+        */
+        void DynInitMenuPaneL( TInt aResourceId,CEikMenuPane* aMenuPane );
+        /**
+        * from MAknToolbarObserver
+        */
+        void OfferToolbarEventL( TInt aCommandId );
+        
+        /**
+         * from MAknToolbarObserver
+         */         
+        void DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolbar );
+
+        /**
+        * Launch WebBrowser or Music shop based on given command Id.
+        * @param aCommandId The command id
+        */
+        void LaunchBrowserL(TInt aCommandId);
+        /**
+        * Handle RDS programme service change.
+        * @param aProgramService New programme service
+        */
+        void RdsDataProgrammeServiceL( const TDesC& aProgramService );
+        /**
+         * Handles the notification about type of PS name
+         * @param aStatic
+         */
+        void HandleStaticProgrammeServiceL( TBool aStatic );
+        /**
+        * PrepareViewForChannelChangeL.
+        */
+        void PrepareViewForChannelChangeL();
+        /**
+        * Show save query if the current channel is not saved
+        */
+        void HandleSaveChannelQueryL();
+        /**
+        * from MEikMenuObserver
+        */
+        void SetEmphasis( CCoeControl* aMenuControl, TBool aEmphasis );
+        
+        // from MFMRadioLogoObserver
+        void LogoDisplayTimeCompleted();
+        
+        // from MFMRadioAlfRdsViewObserver
+        void NotifyRdsTextTimerCompletion();
+        
+    private: // Data
+        // pointer to the container of the main view
+        CFMRadioMainContainer* iContainer;
+        // A pointer to the radio engine object
+        CRadioEngine*   iRadioEngine;
+        // flag to keep track of whether the radio is currently seeking
+        TBool iSeeking;
+        
+        /**
+         * Station change direction used for station information animation
+         */
+        TFMRadioStationChangeType iChangeDirection;
+        
+        /** 
+	    * Is the start up of application ongoing. 
+	    */    
+	    TBool iStartUp;
+		TBool iFaded;
+		/** 
+	    * Timer for hiding the RDS signal icon after a delay
+	    */    
+	    CPeriodic* iRdsSignalTimer;	    
+	
+        /**
+        * Toolbar for controlling the application.	
+        */
+        CAknToolbar* iToolbar;
+        
+        /**
+        * observer for list event from main list	
+        */
+        MChannelListHandler& iObserver;
+        /**
+         * Takes care of Music store integration.
+         */
+        CFMRadioMusicStoreHandler* iMusicStoreHandler;
+        // flag for options menu status
+        TBool iOptionsMenuOpen;
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiomusicstorehandler.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,282 @@
+/*
+* 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:  Handles music store integration.
+*
+*/
+
+
+#ifndef FMRADIOMUSICSTOREHANDLER_H
+#define FMRADIOMUSICSTOREHANDLER_H
+
+#include <e32base.h>
+
+class CEikMenuPane;
+class CRepository;
+
+/**
+ * Handler for Music Store.
+ *
+ * Takes care of Nokia music store and operator specific music store.
+ *
+ * Provides also a interface to open a web page.
+ */
+class CFMRadioMusicStoreHandler : public CBase
+    {
+private:
+    /**
+     * Used for tracking the visibility state.
+     */
+    enum TFMRadioMusicStoreState
+        {
+        EFMRadioMusicStoreUninitialized,
+        EFMRadioMusicStoreEnabled,
+        EFMRadioMusicStoreDisabled,
+        EFMRadioMusicStoreForceEnabled
+        };
+
+    /**
+     * Distinguishes between different implementation types of music store.
+     */
+    enum TFMRadioOperatorAppType
+        {
+        EFMRadioAppNotAvailable,
+        EFMRadioNativeApp,
+        EFMRadioJavaApp,
+        EFMRadioWebsite
+        };
+
+public:
+    /**
+     * Two-phase constructor of CMusicStoreHandler.
+     * 
+     * @param aResourceId   Menu pane where the music store item/items
+     *                      will be added.
+     */
+    static CFMRadioMusicStoreHandler* NewL( TInt aResourceId );
+
+    /**
+     * Destructor
+     */
+    ~CFMRadioMusicStoreHandler();
+
+    /**
+     * Checks wether given command id is for music store functionality.
+     * 
+     * @param aCommandId command id to check
+     * @returns ETrue for music store command ids
+     */
+    TBool IsMusicStoreCommandId( TInt aCommandId );
+
+    /**
+     * This is called when dynamically initializing menu (ie, from DynInitMenuPaneL).
+     * 
+     * @param aResourceId   Resource id for currently processed menu part
+     * @param aMenuPane     Menu pane which is being handled
+     * @returns ETrue, if menu pane was handled by this method
+     */
+    TBool InitializeMenuL( TInt aResourceId, CEikMenuPane* aMenuPane );
+
+    /**
+     * The value given will be used as a guideline to wether to show or hide the item.
+     * If music shop feature is not supported and this is called with ETrue it will
+     * not show the item unless forced state is used.
+     * 
+     * @param aEnable       Whether enable or disable the item
+     * @param aForce        Whether the state is forced, by default it is not
+     */
+    void EnableMusicStore( TBool aEnable, TBool aForce = EFalse );
+
+    /**
+     * Launches Music store based on command id.
+     * 
+     * @param aCommandId    Command id for menu item
+     * @param aArtist       Artist of the single
+     * @param aAlbum        Album of the single
+     * @param aTitle        Name of the single
+     */
+    void LaunchMusicStoreL( TInt aCommandId,
+            const TDesC& aTitle,
+            const TDesC& aArtist,
+            const TDesC& aAlbum );
+
+    /**
+     * Launches web page based on given string.
+     * 
+     * @param aWebpage      Web site to be launched
+     */
+    void LaunchWebPageL( const TDesC& aWebpage );
+    
+    /**
+     * Is Nokia Music shop available
+     * @returns ETrue if available
+     */
+    TBool NokiaMusicStoreAvailable();
+
+    /**
+     * Is Operator music store available
+     * @returns ETrue if available
+     */
+    TBool OperatorMusicStoreAvailable();
+    
+    /**
+     * Check if the music store functionality has been enabled
+	 * @return state
+     */
+    TBool IsMusicStoreEnabled();
+    
+    /** 
+     * returns name of the operator music store
+     * @return name
+     */
+    const TDesC& OperatorMusicStoreName() const;
+
+private:
+    /**
+     * Default C++ constuctor
+     * 
+     * @param aResourceId   Menu pane where the music store item/items
+     *                      will be added.
+     */
+    CFMRadioMusicStoreHandler( TInt aResourceId );
+
+    /**
+     * Second-phase constructor
+     */
+    void ConstructL();
+
+    /**
+     * Finds out the type of operator specific music store.
+     * 
+     * @param aRepository   Cenrep from which information is sought.
+     * @returns Application type if available, otherwise EFMRadioAppNotAvailable
+     */
+    TFMRadioOperatorAppType CheckOperatorMusicStoreTypeL( CRepository& aRepository );
+
+    /**
+     * Called for application type specific initialization.
+     * 
+     * @param aRepository   Cenrep from which information is sought.
+     * @param aAppType      Type of implementation to be initialized.
+     */
+    void InitializeParametersL( CRepository& aRepository, TFMRadioOperatorAppType aAppType );
+
+    /**
+     * Called when native music store needs initializing.
+     * 
+     * @param aMusicstoreUid    P&S UID for initializing music shop
+     */
+    void InitializeMusicStore( TUid aMusicstoreUid );
+
+    /**
+     * Returns the count of active music stores.
+     * 
+     * @returns Active music store count
+     */
+    TInt MusicStoreCount();
+
+    /**
+     * Creates the search string for Nokia Music Shop application
+     * 
+     * @param aArtistName   Artist of the single
+     * @param aAlbumName    Album of the single
+     * @param aSongName     Name of the single
+     * @returns search string and pushes it to cleanup stack.
+     */
+    HBufC* NokiaMusicShopSearchL( const TDesC& aSongName,
+            const TDesC& aArtistName,
+            const TDesC& aAlbumName );
+
+    /**
+     * Handles calling appropriate operator music store implementation
+     * 
+     * @param aSearchString     string used for searching
+     */
+    void LaunchOperatorMusicStoreL( const TDesC& aSearchString );
+
+    /**
+     * Launches Nokia Music shop application
+     * 
+     * @param aMusicshopUid     UID of the music shop
+     * @param aSearchString     string used for searching
+     */
+    void LaunchMusicShopL( TUid aMusicshopUid, const TDesC& aSearchString );
+    
+    /**
+     * Converts binary data from cenrep to Uint32 presentation
+     * @param aBuf binary data from cenrep
+     * @return resolved Uint32 number
+     */
+    TUint32 Uint32Presentation( const TDesC8& aBuf );
+    
+    /**
+     * Checks if the application with the given uid is installed to the system
+     * @param aAppUid Application uid
+     * @return true if app is found
+     */
+    TBool IsAppInstalledL( const TUid& aAppUid );
+
+private: // members
+    /**
+     * Resource id to which music store option will be bound.
+     */
+    TInt iResourceId;
+
+    /**
+     * This is used for with isMenuInitialized so that it is not needed
+     * to go through all items in case we don't find the music store item.
+     */
+    TInt iFirstKnownResourceId;
+
+    /**
+     * Saves the state of Music store item
+     */
+    TFMRadioMusicStoreState iState;
+
+    /**
+     * Nokia Music store UID
+     */
+    TUint32 iMusicStoreUID;
+
+    /**
+     * Display name for operator music store
+     */
+    RBuf iOperatorMusicStoreName;
+
+    /**
+     * UID for Operator music store (native app.)
+     */
+    TUint32 iOperatorStoreNativeUID;
+    
+    /*
+     * UID for operator java client app 
+     */
+    TUid iOperatorJavaMusicStoreUID;
+
+    /**
+     * Website where Operator music store can be found
+     */
+    RBuf iOperatorStoreWebsite;
+
+    /**
+     * Control environment.
+     */
+    CCoeEnv* iCoeEnv;
+    
+    /**
+     * flag for music store application availability 
+     */
+    TBool iMusicStoreAppInstalled;
+    };
+
+#endif /*FMRADIOMUSICSTOREHANDLER_H*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiopreset.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,111 @@
+/*
+* 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:  fmradio preset station information
+*
+*/
+
+#ifndef CMFRADIOPRESET_H
+#define CMFRADIOPRESET_H
+
+// INCLUDES
+#include <e32base.h> 
+
+// FORWARD DECLARATIONS
+
+// CONSTANTS
+
+/**
+ * fmradio preset station information
+ */
+class CFMRadioPreset : public CBase
+    {
+
+    public:         
+        /**
+         * Two-phased constructor.
+        */
+        static CFMRadioPreset* NewL();       
+        /**
+         * Destructor.
+         */
+        virtual ~CFMRadioPreset();
+            
+    public: // New functions
+        /*
+         * Set name for the preset
+         * @param aName new name for the preset
+         */
+        void SetPresetNameL( const TDesC& aName );
+        /*
+         * Returns preset name 
+         * @return name
+         */
+        const TDesC& PresetName();
+        /*
+         * Set of the preset valid
+         * @param aValid ETrue is the name is set valid
+         */
+        void SetPresetNameValid( TBool aValid );
+        /*
+         * Returns the validity of the preset name
+         * @return ETrue if the name is valid, otherwise EFalse
+         */
+         TBool PresetNameValid();
+        /*
+         * Set frequency for the preset
+         * @param aFrequency frequency to set
+         */
+        void SetPresetFrequency( TInt aFrequency );
+        /*
+         * Returns preset frequency
+         * @return frequency
+         */
+        TInt PresetFrequency();
+        
+        /*
+         * set station web url
+         * @param aUrl url to set
+         */
+        void SetPresetUrlL( const TDesC& aUrl );
+        
+        /*
+         * Gets station web url
+         * @return url
+         */
+        const TDesC& PresetUrl();
+        
+    private:
+        /**
+         * C++ default constructor.
+         */        
+        CFMRadioPreset();
+        /**
+        * EPOC default constructor.
+        */        
+        void ConstructL();
+        
+    private: // data
+         // station name
+         RBuf iStationName;
+		 // station frequency
+         TInt iStationFrequency;
+         // Validity of the station name
+         TBool iNameIsValid;
+         // station web url
+         RBuf iStationUrl;
+         
+    };
+
+
+#endif // CMFRADIOPRESET_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradioscanlocalstationscontainer.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,199 @@
+/*
+* 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:  definition of the class CFMRadioScanLocalStationsContainer
+*
+*/
+
+
+#ifndef FMRADIOSCANLOCALSTATIONSCONTAINER_H
+#define FMRADIOSCANLOCALSTATIONSCONTAINER_H
+
+// INCLUDES
+#include <coecntrl.h>
+#include <aknlists.h>
+
+#include "fmradiodefines.h"
+#include "fmradio.hrh"
+#include "fmradioengine.h"
+// FORWARD DECLARATIONS
+class CAknWaitDialog;
+
+// CLASS DECLARATION
+
+/**
+* Creates and owns the UI components related to the Scan Local Stations View.
+* @since 2.6
+*/
+class CFMRadioScanLocalStationsContainer : public CCoeControl,
+                                     	   public MEikListBoxObserver
+    {
+    public: // Constructors and destructor
+        /**
+        * Two-phase constructor of CFMRadioScanLocalStationsContainer
+        * @since 2.6
+        * @param aRect Frame rectangle for container.
+        * @param aRadioEngine Radio engine reference
+        */
+        static CFMRadioScanLocalStationsContainer* NewL( const TRect& aRect, CRadioEngine& aRadioEngine );
+        /**
+        * Destructor.
+        */
+        virtual ~CFMRadioScanLocalStationsContainer();
+    public: // New functions
+        /**
+        * Returns the index of the selected channel item from the channel list.
+        * @since 2.6
+        * @return the index of the currently selected channel
+        */
+        TInt CurrentlySelectedChannel() const; 
+        /**
+        * Update the content of the channel at aIndex with the values specified
+        * @since 2.6
+        * @param aIndex index of the channel to update
+        * @param aInfoText Info text to be shown instead of the frequency value
+        * @param aChannelFrequency the new frequency of the channel
+        * @param aNowPlaying indicates if 'Now playing' icon needs to be shown
+        * @param aInfoTextPlacement ETrue if info text is displayed after frequency string; EFalse otherwise.
+        */
+        void UpdateChannelListContentL( TInt aIndex, const TDesC& aInfoText, TInt aChannelFrequency, TBool aNowPlaying, TBool aInfoTextPlacement = EFalse );
+        void RemoveChannelListContentL( TInt aIndex );
+        /**
+        * Update the content of the channel at aIndex with the values specified
+        * @since 2.6
+        * @param aIndex index of the last selected channel
+        */
+        void UpdateLastListenedChannel( TInt aIndex );
+        /**
+        * Displays 'Now Playing' icon for given index.
+        * @param aNewIndex Index of channel to get the icon
+        * @param aOldIndex Index of channel to loose the icon
+        */
+        void UpdateNowPlayingIconL( TInt aNewIndex, TInt aOldIndex = KErrNotFound );
+        /**
+        * Hide 'Now Playing' icon from given index
+        * @param aIndex Index of channel to hide the icon
+        * @param aDraw flag for updating list after icon removal
+        */
+        void HideNowPlayingIconL( TInt aIndex, TBool aDraw );
+        /**
+        * Fades the entire window and controls in the window owned by this container control.
+        * @since 2.6
+        * @param aFaded flag to indicate whether we should fade or unfade
+        */
+        void SetFaded( TBool aFaded );
+        /**
+        * From CCoeControl
+        */
+        void HandleResourceChange(TInt aType);
+        /**
+        * Resets channel list
+        */
+        void ResetChannelListL();
+        /**
+        * Create the channel list (initially all spots are set as empty)
+        * @since 2.6
+        */
+        void InitializeChannelListL();
+        
+        void SetStationListEmptyTextL( const TDesC& aText );
+        
+        /*
+         * Adds frequency to the scanned channels list. Used while
+         * scanning is ongoing
+         * @param aIndex channel index
+         * @param aChannelFrequency frequency to add
+         */
+        void InsertScannedChannelToListL( TInt aIndex, TInt aChannelFrequency );
+
+    private: // Functions from base classes
+        /**
+        * Called by framework when the view size is changed
+        * @since 2.6
+        */
+        void SizeChanged();
+        /**
+        * Return the number of controls in the window owned by this container
+        * @since 2.6
+        * @return number of controls
+        */
+        TInt CountComponentControls() const;
+        /**
+        * Return the control corresponding to the specified index
+        * @since 2.6
+        * @param aIndex the index of the control to retrieve
+        * @return the control corresponding to the specified index
+        */
+        CCoeControl* ComponentControl( TInt aIndex ) const;
+        /**
+        * From MEikListBoxObserver, for listbox event handling.
+        * @since 2.6
+        * @param aListBox The originating list box.
+        * @param aEventType A code for the event.
+        */
+        void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aEventType );
+        /**
+        * Allow the channel list to process key events
+        * @since 2.6
+        * @param aKeyEvent The key event.
+        * @param aType The type of key event.
+        */
+        TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType );
+		/**
+        * Required for help.
+		* @since 2.7
+		* @param aContext the help context to be used.
+        */
+        void GetHelpContext(TCoeHelpContext& aContext) const;
+        
+        void FocusChanged(TDrawNow aDrawNow);
+        /*
+        * from CCoeControl
+        */
+        void HandlePointerEventL( const TPointerEvent& aPointerEvent );
+        
+    private: // new functions
+    	// Default constructor
+    	CFMRadioScanLocalStationsContainer( CRadioEngine& aRadioEngine );    
+        /**
+        * EPOC two phased constructor
+        * @since 2.6
+        * @param aRect Frame rectangle for container.
+        */
+        void ConstructL( const TRect& aRect);
+        
+        /*
+         * Adds icons to the icon array.
+         * @param aArray array to add icons 
+         */
+        void CreateListIconsL( CArrayPtr<CGulIcon>& aArray );
+
+    private: //data
+    
+        // The channel list listbox
+        CAknSingleNumberStyleListBox* iChannelList;
+        // Array of channel list items
+        CDesCArray* iChannelItemArray;
+        // Index of the most recently listened channel to keep the listbox up-to-date.
+        TInt iLastChIndex;
+        TBool iFadeStatus;
+        MAknsSkinInstance* iSkin;
+        CRadioEngine& iRadioEngine; //not own
+        // array for list icon bitmaps
+        RPointerArray<CFbsBitmap> iBitMaps;
+
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradioscanlocalstationsview.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,371 @@
+/*
+* 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:  definition of the class CFMRadioScanLocalStationsView
+*
+*/
+
+
+#ifndef FMRADIOSCANLOCALSTATIONSVIEW_H
+#define FMRADIOSCANLOCALSTATIONSVIEW_H
+
+// INCLUDES
+#include <aknview.h>
+#include <AknProgressDialog.h>
+#include <akntoolbarobserver.h>
+ 
+#include "fmradioscanlocalstationscontainer.h"
+#include "mfmradiolayoutchangeobserver.h"
+#include "fmradiordsobserver.h"
+#include "mchannellisthandler.h"
+#include "fmradiosvkevents.h"
+
+// FORWARD DECLARATIONS
+class CFMRadioScanLocalStationsContainer;
+class CRadioEngine;
+class CAknWaitDialog;
+class CFMRadioPreset;
+
+
+// CLASS DECLARATION  
+
+/**
+* CFMRadioScanLocalStationsView view class.
+* @since 2.6
+*/
+class CFMRadioScanLocalStationsView : public CAknView,
+                                	  public MCoeControlObserver,
+                                	  public MFMRadioLayoutChangeObserver,
+                                	  public MProgressDialogCallback,
+                                      public MFMRadioRdsObserver,
+                                      public MAknToolbarObserver
+    {
+    public: // Constructors and destructor
+        /**
+        * Two-phase constructor of CFMRadioScanLocalStationsView
+        * @since 2.6
+        * @param aRadioEngine pointer to a radio engine object
+        * @param aObserver channel list observer
+        */
+        static CFMRadioScanLocalStationsView* NewL( CRadioEngine& aRadioEngine,
+        		MChannelListHandler& aObserver );
+        /**
+        * Destructor.
+        * @since 2.6
+        */
+        virtual ~CFMRadioScanLocalStationsView();
+    public:  // New functions
+        /**
+        * Return the unique identifier corresponding to this view
+        * @since 2.6
+        * @return the unique identifier corresponding to this view
+        */
+        TUid Id() const;
+        /**
+        * Keep track of the last selected channel
+        * @since 2.6
+        * @param aIndex the index of the last listened to channel
+        */
+        void SetLastListenedChannel( TInt aIndex );
+        /**
+        * Keep track of the current selected channel
+        * @param aChannelIndex the index of the current channel
+        */
+        void SetNowPlayingChannelL ( TInt aChannelIndex );
+         /**
+        * Returns the index of the playing channel item from the 
+        * channel list. 
+        * @return the currently playing channel
+        */
+        TInt CurrentlyPlayingChannel();
+        /**
+        * Returns the index of the selected channel item from the 
+        * channel list. If the container is active get the info from 
+        * it, because it may have more up-to-date info.
+        * @since 2.6
+        * @return the currently selected channel
+        */
+        TInt CurrentlySelectedChannel();
+        /**
+        * Make a request to the channel container to update the 
+        * content of the channel at aIndex with the values specified
+        * @since 2.6
+        * @param aIndex the index of the channel to update
+        * @param aChannelFrequency the new frequency
+        */
+        void UpdateChannelListContentL( TInt aIndex, TInt aChannelFrequency );
+        /**
+        * Return true/false to indicate whether the channel specified is in use
+        * @since 2.6
+        * @param aIndex the index of the channel to check
+        * @return true/false to indicate whether the channel is currently being used
+        */
+        TBool ChannelInUse( const TInt aIndex ) const;
+        /**
+        * Return true/false to indicate whether the channel specified is in play
+        * @param aChannelIndex the index of the channel to check
+        * @return true/false to indicate whether the channel is currently being played
+        */
+        TBool ChannelInPlay( TInt aChannelIndex ) const; 
+        /**
+        * Retrieve the index of the next channel that has been set.
+        * @since 2.6
+        * @return the index of the next "in use" channel
+        */
+        TInt NextChannel();
+        /**
+        * Retrieve the index of the previous channel that has been set.
+        * @since 2.6
+        * @return the index of the previous "in use" channel
+        */
+        TInt PreviousChannel();
+        /**
+        * Fade the view and all controls associated with it. Change
+        * the soft keys so that "Exit" is displayed
+        * @since 2.6
+        * @param aFaded true/false to indicate whether the view should fade/unfade.
+        */
+        void FadeAndShowExit( TBool aFaded );
+        /**
+        * Update display when focus regained
+        * @since 3.0
+        */
+        void UpdateDisplayForFocusGained();
+        /**
+        * Display a wait note while the channel fill is occuring.
+        * @since 2.6        *  
+        */
+        void DisplayScanningInProgressNoteL();
+        /**
+        * Remove and destroy the scanning note.
+        * @since 2.6
+        */
+        void RemoveScanningInProgressNoteL();
+        /**
+        * from MFMRadioLayoutChangeObserver
+		* This method gets called by the AppUI when a dynamic layout change
+		* event occurs.
+		*/
+		void LayoutChangedL( TInt aType );
+
+		/**
+		 * Invoked by AppUi when a new radio station is found.
+		 */
+		void StopSeekL();
+		/**
+         * Restores the radio after scanning
+         */
+        void RestoreRadio( TBool aTuneInitialFrequency = ETrue );
+		/**
+		 * Called when a new scan is activated.
+		 */
+		void ResetListAndStartScanL();
+		/**
+		 * Saves all the scanned channels into Radio Engine's presets.
+		 */
+		void SaveAllChannelsL();
+		/**
+		* Sets toolbar visibility
+		* @param aVisible 
+		* @return none
+		*/
+		void ShowToolbar( TBool aVisible );
+		
+		 // from base class MFMRadioRdsObserver
+	    void RdsDataProgrammeService( const TDesC& aProgramService );
+	    void RdsDataPsNameIsStatic( TBool aStatic );
+	    void RdsDataRadioText( const TDesC& aRadioText );
+        void RdsDataRadioTextPlus( const TInt /*aRTPlusClass*/, const TDesC& /*aRadioText*/ ){}; 	    
+	    void RdsAfSearchBegin();
+	    void RdsAfSearchEnd( TUint32 aFrequency, TInt aError );
+	    void RdsAfSearchStateChange( TBool aEnabled );
+	    void RdsAvailable( TBool aAvailable );
+	    
+	    //for canceling the wizard
+	    void SetScanCanceled( TFMRadioCancelScanType aType );
+	    TFMRadioCancelScanType CancelType();
+        /**
+         * Dim or undim save and saveall buttons.
+         */ 
+        void UpdateToolbar();
+        
+        /*
+         * Handle view specific remote control events
+         * @param aEvent accessory event
+         */
+        void HandleScanListRemConEventL( TAccessoryEvent aEvent );
+
+    private: // Functions from base classes
+        /**
+        * Activate the channel list view
+        * @since 2.6
+        */
+        void DoActivateL( const TVwsViewId& aPrevViewId,TUid aCustomMessageId, const TDesC8& aCustomMessage );
+        /**
+        * Deactivate the channel list view
+        * @since 2.6
+        */
+        void DoDeactivate();
+        /**
+        * Interprets view's menu,softkey and other commands and acts 
+        * accordingly by calling the appropriate command handler 
+        * function for further action.
+        * @since 2.6
+        * @param aCommand the command to process
+        */
+        void HandleCommandL( TInt aCommand );
+        /**
+        * From MCoeControlObserver, control event observing. In this case,
+        * the user selection from the list is reported by container class
+        * and observed here.
+        * @since 2.6
+        * @param aControl the control that caused the event
+        * @param aEventType the type of event that was triggered
+        */
+        void HandleControlEventL( CCoeControl* aControl,TCoeEvent aEventType );
+        /**
+        * Sets the state of menu items dynamically according to the 
+        * state of application data.
+        * @since 2.6
+        * @param aResourceId Resource ID identifying the menu pane to initialise.
+        * @param aMenuPane The in-memory representation of the menu pane.
+        */
+        void DynInitMenuPaneL( TInt aResourceId,CEikMenuPane* aMenuPane );
+        
+        /**
+        * SetMiddleSoftKeyLabelL, sets the MSK label
+        * from resource
+        */
+        void SetMiddleSoftKeyLabelL( const TInt aResourceId, const TInt aCommandId );        
+        /**
+        * SetMiddleSoftKeyIconL, sets the MSK icon
+        * 
+        */
+        void SetMiddleSoftKeyIconL();        
+        /**
+        * Called when user cancels waiting note or process finishes
+        */       
+        void DialogDismissedL( TInt  aButtonId );
+        /**
+        * from MAknToolbarObserver
+        * Handle commands from toolbar.
+        * @param aCommandId The command id
+        */        
+        void OfferToolbarEventL( TInt aCommandId );
+        /**
+        * SetContextMenu, to set MSK context
+        */
+	    void SetContextMenu( TInt aMenuTitleResourceId );
+    private: // new functions
+
+		/** modes for channel saving */
+		enum TSavingMode
+			{
+			EAppend = 0x1,
+			EReplace
+			};	
+	    /**
+		* C++ default constructor
+		*/
+	 	CFMRadioScanLocalStationsView( CRadioEngine& aRadioEngine, MChannelListHandler& aObserver );
+	    /**
+	    * EPOC default constructor.
+	    * @since 2.6
+	    */
+	    void ConstructL();
+		/**
+		* Save scanned channels to presets
+		*/        
+		void SaveFoundChannelsToPresetsL( TSavingMode aSavingMode );         
+		/**
+		* Add found channel to the frequency list
+		*/           
+		void AddTunedFrequencyToListL();
+		/**
+		* Tune to the selected channel
+		*/        
+		void PlayCurrentlySelectedChannelL();
+		
+		/**
+		 * Show aResQuery confimation query with aResText.
+		 * aResText and aResQuery must be real resource ids.  
+		 * Returns users response, 0 if user denied.
+		 */
+		TInt ShowConfirmationQueryL(TInt aResText, TInt aResQuery);		
+		/**
+        * Prepare toolbar for FMRadio command buttons
+        */
+		void PrepareToolbar();
+		        /**
+        * Set the current dimmed state of the toolbar 
+        * 
+        * @param aState the new toolbar dimmed state
+        */
+        void SetToolbarDimmedState( const TBool aState );        
+        /**
+         * check if the frequency is already found
+         * @param aFrequency frequency to check
+		 * @return list index or KErrNotFound if the frequency is not in the list
+         */
+        TInt FrequencyIndex( TInt aFrequency );
+        /**
+         * Handle single channel save
+         */
+        void HandleOneChannelSaveL();
+        /*
+         * Activates main view. Doesn't bring radio to
+         * foreground if the app is in the background
+         */
+        void ActivateMainViewL();
+        
+        /*
+         * Resolves index number for the given frequency.
+         * Frequencies are sorted from smallest to largest.
+         * @param aFrequency frequency to add
+         */
+        TInt SortedFrequencyListIndex( TInt aFrequency );
+    	
+    private: // Data
+    	CFMRadioScanLocalStationsContainer* iContainer;
+        TInt iChIndex;
+        TInt iNowPlayingIndex;
+        TBool iScanAndSaveActivated;
+        TInt iCurrentMSKCommandId; //owned
+		TBool iFaded;
+		TBool iScanCancelled;
+        CRadioEngine& iRadioEngine; 
+		TInt iLowerFrequencyBound;
+		TInt iUpperFrequencyBound;
+		
+		TBool iScanningNoteIsVisible;
+		// array for the scanned channels
+		RPointerArray<CFMRadioPreset> iScannedChannels; 
+		
+		TInt iInitialTunedFrequency;
+		// A wait used when channel fill in progress
+        CAknWaitDialog* iScanningNote;
+        TBool iTuneRequested;
+       	/**
+		* Toolbar for controlling the application.	
+		*/
+		CAknToolbar* iToolbar;
+        /**
+        * channel list handler observer
+        */
+        MChannelListHandler& iObserver; 
+        TFMRadioCancelScanType iCancelType;
+    };
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiosvkevents.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,201 @@
+/*
+* 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: 
+*  Class which implements handling Side Volume Key events (SVK).
+*  This class implements methods of MRemConCoreApiTargetObserver
+*
+*
+*/
+
+
+#ifndef FMRADIOSVKEVENTS_H
+#define FMRADIOSVKEVENTS_H
+
+// INCLUDES
+#include <remconcoreapitargetobserver.h>
+#include <RemConCallHandlingTargetObserver.h>
+#include <e32debug.h>
+
+#include "fmradio.hrh"
+
+// FORWARD DECLARATIONS
+
+// CONSTANTS
+
+enum TAccessoryEvent
+	{
+	EForward = 1,
+	ERewind,
+	EPausePlay,
+	EStop
+	};
+
+// CLASS DECLARATION
+class CRemConCallHandlingTarget;
+class CRemConCoreApiTarget;
+class CRemConInterfaceSelector;
+class CRemConCoreApiTarget;
+
+
+class MFMRadioSvkEventsObserver
+    {
+
+	public:
+
+
+
+	public:
+		/**
+		* Called when volume level should be changed.
+		* @param aVolumeChange: +1 change volume up
+		*                       -1 change volume down
+		*/
+		virtual void FMRadioSvkChangeVolumeL( TInt aVolumeChange ) = 0;
+
+		/**
+		* Called when volume was changed last time 2 seconds ago or
+		* timer was started 2 seconds ago. The remove control timer
+		* is started when ChangeVolumeL() is called
+		* or when started through CFMRadioSvkEvents::StartRemoveTimerL()
+		*/
+		virtual void FMRadioSvkRemoveVolumeL( ) = 0;
+
+		/**
+		* Called when accessory key is pressed.
+		* @param aEvent The headset event generated.
+		*/
+		virtual void FMRadioHeadsetEvent(TAccessoryEvent aEvent) = 0;
+
+    };
+
+
+class CFMRadioSvkEvents : public CBase,
+						  public MRemConCoreApiTargetObserver,
+						  public MRemConCallHandlingTargetObserver
+    {
+    public: // Constructors and destructor
+        /**
+        * Symbian constructor
+        * @param aObserver observer to implement callback functions
+        */
+
+        static CFMRadioSvkEvents* NewL( MFMRadioSvkEventsObserver& aObserver );
+
+        /**
+        * Starts remove timer. Cancels running remove timer.
+        * If SVK event occurs, the timer is cancelled and restarted.
+        */
+        void StartRemoveTimerL( );
+
+        /**
+        * Cancels remove timer.
+        * If SVK event occurs, the timer is restarted.
+        */
+        void CancelRemoveTimer( );
+
+        /**
+        * Destructor.
+        */
+        virtual ~CFMRadioSvkEvents();
+
+
+	public: // From MRemConCallHandlingTargetObserver
+
+       	void AnswerCall();
+
+        void AnswerEndCall();
+
+        void DialCall( const TDesC8& aTelNumber );
+
+        void EndCall();
+
+        void GenerateDTMF( const TChar aChar );
+
+        void LastNumberRedial();
+
+        void MultipartyCalling( const TDesC8& aData );
+
+        void SpeedDial( const TInt aIndex );
+
+        void VoiceDial( const TBool aActivate );
+
+    protected: // New functions
+        /**
+        * Default constructor.
+        */
+        CFMRadioSvkEvents( MFMRadioSvkEventsObserver& aObserver );
+
+        /**
+        * EPOC constructor.
+        */
+        void ConstructL();
+
+    	// From MRemConCoreApiTargetObserver
+    	void MrccatoCommand(TRemConCoreApiOperationId aOperationId,
+    	 					TRemConCoreApiButtonAction aButtonAct);
+
+
+    private:
+
+        /**
+        * Calls respective observer function
+        */
+        void DoChangeVolume( );
+
+        /**
+        * Calls respective observer function
+        */
+        void RemoveControlL( );
+
+
+        /**
+        * ChangeVolume is the callback function called from change volume timer.
+        */
+        static TInt ChangeVolume(TAny* aThis);
+
+        /**
+        * RemoveControl is the callback function called from remove control timer.
+        */
+        static TInt RemoveControl(TAny* aThis);
+        
+        /**
+        * TuneChannel can be used to tune up/down
+        */
+        void TuneChannel( TFMRadioCommandIds aDirection );
+
+        /**
+         * Takes care of remcon volume keys
+         * @param aButtonAct the button event  
+         * @param aDirection volume up or down
+         */
+        void HandleVolumeButtons( TRemConCoreApiButtonAction aButtonAct, TInt aDirection );
+        
+
+	private:
+	    MFMRadioSvkEventsObserver&  iObserver;
+	    CRemConInterfaceSelector*   iInterfaceSelector;
+	    CRemConCoreApiTarget*       iCoreTarget;
+	    CRemConCallHandlingTarget*  iCallTarget;
+	    CPeriodic*                  iVolumeTimer;
+        CPeriodic*                  iRemoveTimer;
+
+        /// indicates size of volume level change
+        TInt                        iChange;
+        TBool 				    	iTargetOpen;
+    };
+
+
+#endif
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/fmradiouids.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,30 @@
+/*
+* 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: FMRadio identifiers
+*
+*/
+#ifndef FMRADIOUIDS_H
+#define FMRADIOUIDS_H
+
+#include <e32cmn.h>
+
+// FMRadio Application UID
+#define KUidFMRadioApplication 0x10207A89
+
+// FM Radio View id's
+const TUid KFMRadioMainViewId = {0x01};
+const TUid KFMRadioChannelListViewId = {0x02};
+const TUid KFMRadioScanLocalStationsViewId = {0x03};
+
+#endif // FMRADIOUIDS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/mchannellisthandler.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,60 @@
+/*
+* 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:  Callback definitions to channel main list update
+*                     
+*
+*/
+
+#ifndef MCHANNELLISTHANDLER_H
+
+#define MCHANNELLISTHANDLER_H
+
+#include "fmradiopreset.h"
+
+/**
+*	Operations to main list
+*    @since 2.6
+*/
+enum TMoveoperations
+	{
+	EMoveChannels,
+	EDeleteChannel,
+	EAddChannelToList,
+	EStoreAllToRepository,
+	EStoreIndexToRepository,
+	ERemoveAllFromRepository
+	};
+
+
+/**
+* Interface to update channel list
+*
+*    @since 2.6
+*/
+class MChannelListHandler
+	{
+	public:
+		
+		
+		virtual void UpdateChannelsL( TMoveoperations aOperation, 
+				TInt aIndex, 
+				TInt aMovedToNewIndex ) = NULL;
+		
+		virtual void AddChannelToListL( const TDesC& aChannelName, TInt aChannelFreq ) = 0;
+		
+		virtual RPointerArray<CFMRadioPreset>& Channels() = 0;
+		
+	};
+
+#endif // MCHANNELLISTHANDLER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/inc/mfmradiolayoutchangeobserver.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,42 @@
+/*
+* 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 an interface for observing
+*
+*/
+
+
+
+#ifndef MFMRADIOLAYOUTCHANGEOBSERVER_H
+#define MFMRADIOLAYOUTCHANGEOBSERVER_H
+
+// INCLUDES
+#include <e32def.h>
+
+// CLASS DECLARATION
+
+/**
+*  Notifies layot change.
+*
+*  @lib VoiceRecorderUtils.dll
+*  @since 2.0
+*/
+class MFMRadioLayoutChangeObserver
+    {
+    public:
+		virtual void LayoutChangedL( TInt aType ) = 0;
+    };
+
+#endif      // MFMRADIOLAYOUTCHANGEOBSERVER_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/rom/fmradio.iby	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,44 @@
+/*
+* 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:  Image description file for project FM Radio
+*
+*/
+
+
+#ifndef __FMRADIO_IBY__
+#define __FMRADIO_IBY__
+
+#include <bldvariant.hrh>
+
+#ifdef __S60_FM_RADIO_APPLICATION  
+
+S60_APP_EXE(fmradio)
+S60_APP_AIF_ICONS(fmradio)
+data=DATAZ_\PRIVATE\10003A3F\IMPORT\APPS\fmradio_reg.rsc        private\10003a3f\import\apps\fmradio_reg.rsc
+
+data=ZSYSTEM\install\fmradio_stub.sis    system\install\fmradio_stub.sis
+
+SCALABLE_IMAGE(APP_BITMAP_DIR,APP_BITMAP_DIR,fmradio)
+
+// Active Idle Engine
+file=ABI_DIR\BUILD_DIR\fmradioactiveidleengine200.dll               SHARED_LIB_DIR\fmradioactiveidleengine200.dll
+
+#ifdef FF_HOMESCREEN_COMMON_IDLEFW
+ECOM_PLUGIN(fmradiomcpplugin100.dll, 2001f497.rsc)
+ECOM_PLUGIN(fmradioactionhandler.dll, 2001f498.rsc)
+#endif // FF_HOMESCREEN_COMMON_IDLEFW
+
+#endif // __S60_FM_RADIO_APPLICATION 
+
+#endif // __FMRADIO_IBY__
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/rom/fmradioresources.iby	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,35 @@
+/*
+* 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:  The iby file contains files that must be included in image
+*
+*/
+
+
+#ifndef __FMRADIORESOURCES_IBY__
+#define __FMRADIORESOURCES_IBY__
+
+#include <bldvariant.hrh>
+#ifdef __S60_FM_RADIO_APPLICATION
+
+data=DATAZ_\APP_RESOURCE_DIR\fmradio.rsc				APP_RESOURCE_DIR\fmradio.rsc
+data=DATAZ_\RESOURCE_FILES_DIR\fmradioengine.rsc		RESOURCE_FILES_DIR\fmradioengine.rsc
+
+#ifdef FF_HOMESCREEN_COMMON_IDLEFW
+data=DATAZ_\RESOURCE_FILES_DIR\fmradiomcpplugin.rsc            RESOURCE_FILES_DIR\fmradiomcpplugin.rsc
+#endif // FF_HOMESCREEN_COMMON_IDLEFW
+
+#endif // __S60_FM_RADIO_APPLICATION
+
+#endif //__FMRADIORESOURCES_IBY__
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradioalfbitmapanimation.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,369 @@
+/*
+* 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:  Tuning animation for fmradio
+*
+*/
+
+#include <aknlayoutscalable_apps.cdl.h>
+#include <AknUtils.h>
+#include <alf/alfimage.h>
+#include <alf/alfimagevisual.h>
+#include <alf/alfevent.h>
+#include <AknsItemID.h>
+#include <barsread.h>
+#include <data_caging_path_literals.hrh>
+#include <fmradio.rsg>
+#include <alf/alfanchorlayout.h>
+#include <alf/alfenv.h>
+
+#include "fmradioalfbitmapanimation.h"
+#include "fmradiodefines.h"
+
+// CONSTANTS
+//const TInt KBmpAnimationDelay = 90;
+const TInt KBmpAnimationStartupDelay = 500;
+const TInt KBmpAnimationFadeInDefaultDurationTime = 200;
+const TInt KBmpAnimationFadeOutDefaultDurationTime = 200;
+const TInt KbmpAnimationStopDelay = 210;
+
+const TReal KDefaultOpacityInVisibleState = 1.0f;
+const TReal KDefaultOpacityInHiddenState = 0.0f;
+
+_LIT8( KBmpAnimationAnchorTag, "BitmapAnimationAnchorTag" );
+// values from fmradio LAF document
+const TInt KLAFVarietyTuningAnimationPortrait = 7;
+
+// ======== MEMBER FUNCTIONS ========
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfBitmapAnimation::CFMRadioAlfBitmapAnimation
+// Default constructor
+// ----------------------------------------------------------------------------
+//
+CFMRadioAlfBitmapAnimation::CFMRadioAlfBitmapAnimation() :
+	iOpacityInVisibleState( KDefaultOpacityInVisibleState ),
+ 	iOpacityInHiddenState( KDefaultOpacityInHiddenState ),
+ 	iAnimationState( EBmpAnimationStopped )
+	{
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfBitmapAnimation::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfBitmapAnimation::ConstructL( CAlfEnv& aEnv )
+    {
+    CAlfControl::ConstructL( aEnv );     
+    CreateBitmapAnimationArrayL();
+    CreateImageAnimationVisualL();
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfBitmapAnimation::NewL
+// Two-phase constructor of CFMRadioAlfBitmapAnimation
+// ---------------------------------------------------------------------------
+//
+CFMRadioAlfBitmapAnimation* CFMRadioAlfBitmapAnimation::NewL( CAlfEnv& aEnv ) 
+    {
+    CFMRadioAlfBitmapAnimation* self = new ( ELeave ) CFMRadioAlfBitmapAnimation;
+    CleanupStack::PushL( self );
+    self->ConstructL( aEnv );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfBitmapAnimation::~CFMRadioAlfBitmapAnimation
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CFMRadioAlfBitmapAnimation::~CFMRadioAlfBitmapAnimation()
+	{
+	iFrames.Reset();
+	iFrames.Close();
+	delete iBitmapFileName;
+	}
+
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfBitmapAnimation::OfferEventL
+// From CAlfControl, takes care of alfred event handling.
+// ----------------------------------------------------------------------------
+//
+TBool CFMRadioAlfBitmapAnimation::OfferEventL( const TAlfEvent& aEvent )
+	{
+	TBool eventHandled = EFalse;
+	
+	if ( aEvent.IsCustomEvent() )
+		{
+		switch( aEvent.CustomParameter() )
+			{
+			case EBmpAnimationStart:
+				{				
+				eventHandled = ETrue;
+				iAnimationState = EBmpAnimationRunning;
+				StartAnimation();
+				break;
+				}
+			case EBmpAnimationContinue:
+				{
+				eventHandled = ETrue;				
+				ContinueBmpAnimation();							
+				break;
+				}
+			case EBmpAnimationStop:
+				{
+				eventHandled = ETrue;				
+				Env().CancelCustomCommands( this );
+				iAnimationState = EBmpAnimationStopped;
+				break;
+				}
+			default:
+				{
+				break;	
+				}				
+			}
+		}
+	return eventHandled;
+	}
+	
+// ----------------------------------------------------------------------------
+// CFMRadioAlfBitmapAnimation::CreateImageAnimationVisualL
+// ----------------------------------------------------------------------------
+//		
+void CFMRadioAlfBitmapAnimation::CreateImageAnimationVisualL()
+	{
+			
+	//CAlfAnchorLayout* imageAnchorLayout = CAlfAnchorLayout::AddNewL( *this );
+	//imageAnchorLayout->SetTagL( KBitmapAnimationAnchorTag );
+	// Create an anchor for the indicator layout 
+	iBmpAnimationAnchor = CAlfAnchorLayout::AddNewL( *this );
+	iBmpAnimationAnchor->SetTagL( KBmpAnimationAnchorTag );
+	
+	iAnimationImageVisual = CAlfImageVisual::AddNewL( *this, iBmpAnimationAnchor ); 	
+	iAnimationImageVisual->SetImage( iFrames[0] );
+			
+	TAlfTimedValue opacity;	
+	opacity.SetTarget( iOpacityInHiddenState, 0 );
+		
+	iAnimationImageVisual->SetOpacity( opacity );							
+	}
+	
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfBitmapAnimation::CreateBitmapAnimationArrayL
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfBitmapAnimation::CreateBitmapAnimationArrayL()
+    {
+    CCoeEnv* coeEnv = CCoeEnv::Static();
+
+    TResourceReader resourceReader;
+    coeEnv->CreateResourceReaderLC( resourceReader, R_FMRADIO_WAIT_ANIM_TUNING );
+
+    iFrameInterval = resourceReader.ReadInt32();
+    TInt bitmapCount = resourceReader.ReadInt16();
+
+    TFindFile finder( coeEnv->FsSession() );
+    TInt err = finder.FindByDir( KFMRadioBmpFile, KDC_APP_BITMAP_DIR );
+    if ( err == KErrNone )
+        {
+        iBitmapFileName = finder.File().AllocL();
+        }
+    
+    // read bitmap size from layout data
+    TRect tempRect;
+    TAknLayoutRect bitmapLayout;
+    bitmapLayout.LayoutRect( 
+            tempRect,
+            AknLayoutScalable_Apps::area_fmrd2_info_pane_g1( KLAFVarietyTuningAnimationPortrait ) );
+    
+    
+    for ( TInt i = 0; i < bitmapCount; i++ )
+        {
+        TFileName bmpFile = resourceReader.ReadTPtrC();
+        TInt bitmapId = resourceReader.ReadInt32();
+        TInt bitmapMaskId = resourceReader.ReadInt32();
+        TInt xx = resourceReader.ReadInt16();
+        TInt xxx = resourceReader.ReadInt8();
+
+        TAlfImage alfImage( KAknsIIDNone,
+                            bitmapLayout.Rect().Size(),
+                            EAspectRatioPreserved,
+                            iBitmapFileName,
+                            bitmapId,
+                            bitmapMaskId );
+
+        iFrames.AppendL( alfImage );
+        }
+    CleanupStack::PopAndDestroy(); //resourceReader
+    }
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfBitmapAnimation::StartBmpAnimation
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfBitmapAnimation::StartAnimation()
+	{
+	iCurrentFrameIndex = 0;
+	iAnimationImageVisual->SetImage( iFrames[iCurrentFrameIndex] );
+	
+	Show( ETrue );
+		
+	Env().Send( TAlfCustomEventCommand( EBmpAnimationContinue, this ), iFrameInterval );
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfBitmapAnimation::ContinueBmpAnimation
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfBitmapAnimation::ContinueBmpAnimation()
+	{
+	iCurrentFrameIndex++;
+	
+	if ( iCurrentFrameIndex == 9 )
+		{
+		iCurrentFrameIndex = 0;
+		}
+	iAnimationImageVisual->SetImage( iFrames[iCurrentFrameIndex] );
+	Env().Send( TAlfCustomEventCommand( EBmpAnimationContinue, this ), iFrameInterval );
+	}
+
+// ---------------------------------------------------------
+// CFMRadioAlfIndicator::Show
+// Shows the indicator with the defined opacity value.
+// ---------------------------------------------------------
+//
+void CFMRadioAlfBitmapAnimation::Show( TBool aShowWithFading )
+	{
+	TAlfTimedValue opacity;
+		
+	if ( aShowWithFading )
+		{				
+		opacity.SetTarget( iOpacityInVisibleState, KBmpAnimationFadeInDefaultDurationTime );
+		
+		iAnimationImageVisual->SetOpacity( opacity );				
+		}
+	else
+		{
+		opacity.SetValueNow( iOpacityInVisibleState );
+		iAnimationImageVisual->SetOpacity( opacity );
+		}	
+	}
+
+// ---------------------------------------------------------
+// CFMRadioAlfIndicator::Hide
+// Hides the indicator with the defined opacity value.
+// ---------------------------------------------------------
+//
+void CFMRadioAlfBitmapAnimation::Hide( TBool aHideWithFading )
+	{
+	TAlfTimedValue opacity;
+	
+	if ( aHideWithFading )
+		{				
+		opacity.SetTarget( iOpacityInHiddenState, KBmpAnimationFadeOutDefaultDurationTime );
+		
+		iAnimationImageVisual->SetOpacity( opacity );
+		}
+	else
+		{	
+		opacity.SetValueNow( iOpacityInHiddenState );
+		iAnimationImageVisual->SetOpacity( opacity );
+		}
+	}
+
+// ---------------------------------------------------------
+// CFMRadioAlfIndicator::StopBmpAnimation
+// ---------------------------------------------------------
+//
+void CFMRadioAlfBitmapAnimation::StopBmpAnimation()
+	{	
+	if ( iAnimationState == EBmpAnimationStartup )
+		{
+		Env().CancelCustomCommands( this, EBmpAnimationStart );
+		iAnimationState = EBmpAnimationStopped;
+		}
+	else if ( iAnimationState == EBmpAnimationRunning )
+		{
+		Hide( ETrue );
+		
+		Env().Send( TAlfCustomEventCommand( EBmpAnimationStop, this ), KbmpAnimationStopDelay );			
+		}		
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfBitmapAnimation::SetRect
+// Sets the Bmpanimation rectangle. 
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfBitmapAnimation::SetRect( const TRect& aRect )
+	{
+	iRect = aRect;
+	if ( iBmpAnimationAnchor )
+		{
+		SetAbsoluteCornerAnchors( iBmpAnimationAnchor, 0, iRect.iTl, iRect.iBr );
+		iBmpAnimationAnchor->UpdateChildrenLayout();
+		}
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfBitmapAnimation::SetAbsoluteCornerAnchors
+// Sets absolute rect of the anchor by top left and bottom right points.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfBitmapAnimation::SetAbsoluteCornerAnchors( CAlfAnchorLayout* aAnchor,
+													 TInt aOrdinal,
+													 const TPoint& aTopLeftPosition,
+													 const TPoint& aBottomRightPosition )
+	{
+	if ( aAnchor )
+		{		
+		// Set top/left anchor.
+	    aAnchor->Attach( aOrdinal, 
+		                 EAlfAnchorTypeTopLeft,
+		                 TAlfXYMetric( TAlfMetric( aTopLeftPosition.iX ), TAlfMetric( aTopLeftPosition.iY ) ),
+		                 EAlfAnchorAttachmentOriginTopLeft );
+		
+		
+		// Set bottom/right anchor.
+    	aAnchor->Attach( aOrdinal, 
+	                     EAlfAnchorTypeBottomRight, 
+	                     TAlfXYMetric( TAlfMetric( aBottomRightPosition.iX ), TAlfMetric( aBottomRightPosition.iY ) ),
+	                     EAlfAnchorAttachmentOriginTopLeft );			
+		}
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfBitmapAnimation::StartBmpAnimation
+// ---------------------------------------------------------------------------
+//	
+void CFMRadioAlfBitmapAnimation::StartBmpAnimation()
+	{
+	if ( iAnimationState == EBmpAnimationRunning )
+	    {
+	    Env().CancelCustomCommands( this );
+	    Hide( EFalse ); // hide without fade
+	    }
+	else if ( iAnimationState == EBmpAnimationStartup )
+        {
+        Env().CancelCustomCommands( this, EBmpAnimationStart );        
+        }	
+	iAnimationState = EBmpAnimationStartup;	
+	Env().Send( TAlfCustomEventCommand( EBmpAnimationStart, this ), KBmpAnimationStartupDelay );
+	}
+			
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradioalfindicator.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,333 @@
+/*
+* 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:  Implementation of the class CFMRadioAlfIndicator
+*
+*/
+
+
+// INCLUDE FILES
+
+#include <alf/alfenv.h>
+#include <alf/alftextvisual.h>
+#include <alf/alfevent.h>
+#include <alf/alftransformation.h>
+#include <alf/alftextstyle.h>
+
+#include "fmradioalfindicator.h"
+
+// CONSTANTS
+
+const TInt  KIndicatorFadeInDefaultDurationTime = 500;
+const TInt  KIndicatorFadeOutDefaultDurationTime = 500;
+const TReal KDefaultOpacityInVisibleState = 1.0f;
+const TReal KDefaultOpacityInHiddenState = 0.0f;
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfIndicator::NewL
+// Two-phase constructor of CFMRadioAlfIndicator
+// ---------------------------------------------------------------------------
+//
+CFMRadioAlfIndicator* CFMRadioAlfIndicator::NewL( CAlfEnv& aEnv )
+	{
+	CFMRadioAlfIndicator* self = new (ELeave) CFMRadioAlfIndicator( );
+	CleanupStack::PushL(self);
+	self->ConstructL( aEnv );
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfIndicator::CFMRadioAlfIndicator
+// Default constructor
+// ----------------------------------------------------------------------------
+//
+CFMRadioAlfIndicator::CFMRadioAlfIndicator( ) 
+:  iTextStyleId( KErrNotFound ),
+   iOpacityInVisibleState( KDefaultOpacityInVisibleState ),
+   iOpacityInHiddenState( KDefaultOpacityInHiddenState )
+	{
+	//No implementation needed
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfIndicator::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfIndicator::ConstructL( CAlfEnv& aEnv )
+	{	    
+	CAlfControl::ConstructL( aEnv ); 
+    AddIndicatorLayerL();   
+    Hide( EFalse );
+  	}
+
+// ---------------------------------------------------------------------------
+// ~CFMRadioAlfIndicator::~CFMRadioAlfIndicator
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CFMRadioAlfIndicator::~CFMRadioAlfIndicator()
+	{
+	if( iTextStyleId != KErrNotFound )
+		{
+		CAlfTextStyleManager& manager = Env().TextStyleManager();
+		manager.DeleteTextStyle( iTextStyleId );
+		}
+	} 
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfIndicator::OfferEventL
+// From CAlfControl, takes care of alfred event handling. 
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioAlfIndicator::OfferEventL( const TAlfEvent& /*aEvent*/ )
+	{
+	return EFalse;
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfIndicator::SetRect
+// Sets the indicator rectangle. 
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfIndicator::SetRect( const TRect& aRect )
+	{
+	iRect = aRect;
+	TRAP_IGNORE( SetTextStyleL() );
+	if( iIndicatorTextAnchor )
+		{
+		SetAbsoluteCornerAnchors( iIndicatorTextAnchor, 0, iRect.iTl, iRect.iBr );
+		iIndicatorTextAnchor->UpdateChildrenLayout();
+		}
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfIndicator::AddIndicatorLayerL
+// Creates the needed drawing layers and visual objects
+// for the indicator. 
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfIndicator::AddIndicatorLayerL()
+	{   
+	// Create an anchor for the indicator layout 
+	iIndicatorTextAnchor = CAlfAnchorLayout::AddNewL( *this );	
+	
+	// Create visual object for the indicator
+	iText = CAlfTextVisual::AddNewL( *this, iIndicatorTextAnchor );
+	iText->SetColor( iTextColor );
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfIndicator::SetTextStyleL
+// Creates the text style for indicator
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfIndicator::SetTextStyleL()
+	{
+    CAlfTextStyleManager& manager = Env().TextStyleManager();   
+    if ( iTextStyleId == KErrNotFound )
+        {
+        iTextStyleId = manager.CreatePlatformTextStyleL( 
+                EAknLogicalFontSecondaryFont,
+                EAlfTextStyleNormal );
+        }
+    iText->SetTextStyle( iTextStyleId );
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfIndicator::SetTextColor
+// Changes indicator text color.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfIndicator::SetTextColor( const TRgb& aTextColor )
+	{
+	iTextColor = aTextColor;
+	if( iText )
+		{
+		iText->SetColor( aTextColor );	
+		}
+	}
+
+// ---------------------------------------------------------
+// CFMRadioAlfIndicator::SetTextL
+// Sets the indicator text.
+// ---------------------------------------------------------
+//
+void CFMRadioAlfIndicator::SetTextL( const TDesC& aText ) 
+	{	 
+	iText->SetTextL( aText );
+	}
+
+// ---------------------------------------------------------
+// CFMRadioAlfIndicator::Show
+// Shows the indicator with the defined opacity value.
+// ---------------------------------------------------------
+//
+void CFMRadioAlfIndicator::Show( TBool aShowWithFading )
+	{
+	if( aShowWithFading )
+		{
+		Fade( iText, KIndicatorFadeInDefaultDurationTime, iOpacityInVisibleState );
+		}
+	else
+		{
+		Fade( iText, 0, iOpacityInVisibleState );
+		}	
+	}
+
+// ---------------------------------------------------------
+// CFMRadioAlfIndicator::Hide
+// Hides the indicator with the defined opacity value.
+// ---------------------------------------------------------
+//
+void CFMRadioAlfIndicator::Hide( TBool aHideWithFading )
+	{
+	if( aHideWithFading )
+		{
+		Fade( iText, KIndicatorFadeOutDefaultDurationTime, iOpacityInHiddenState );		
+		}
+	else
+		{
+		Fade( iText, 0, iOpacityInHiddenState );	
+		}
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfIndicator::SetOpacityInVisibleState
+// Sets the indicator opacity in visible state.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfIndicator::SetOpacityInVisibleState( const TReal aOpacity )
+	{
+	iOpacityInVisibleState = aOpacity;
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfIndicator::SetOpacityInHiddenState
+// Sets the indicator opacity in hidden state.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfIndicator::SetOpacityInHiddenState( const TReal aOpacity )
+	{
+	iOpacityInHiddenState = aOpacity;
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfIndicator::SetAbsoluteCornerAnchors
+// Sets absolute rect of the anchor by top left and bottom right points.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfIndicator::SetAbsoluteCornerAnchors( CAlfAnchorLayout* aAnchor,
+													 TInt aOrdinal,
+													 const TPoint& aTopLeftPosition,
+													 const TPoint& aBottomRightPosition )
+	{
+	if ( aAnchor )
+		{					
+		// Set top/left anchor.
+	    aAnchor->Attach( aOrdinal, 
+			             EAlfAnchorTypeTopLeft,
+			             TAlfXYMetric( TAlfMetric( aTopLeftPosition.iX ), TAlfMetric( aTopLeftPosition.iY ) ),
+			             EAlfAnchorAttachmentOriginTopLeft );
+		
+		
+		// Set bottom/right anchor.
+		aAnchor->Attach( aOrdinal, 
+		                 EAlfAnchorTypeBottomRight, 
+		                 TAlfXYMetric( TAlfMetric( aBottomRightPosition.iX ), TAlfMetric( aBottomRightPosition.iY ) ),
+		                 EAlfAnchorAttachmentOriginTopLeft );
+		}
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfIndicator::SetAbsoluteCornerAnchors
+// Sets absolute rect of the anchor by top left point and size of the rect
+// ---------------------------------------------------------------------------
+//	
+void CFMRadioAlfIndicator::SetAbsoluteCornerAnchors( CAlfAnchorLayout* aAnchor,
+												   	 TInt aOrdinal,
+													 const TPoint& aTopLeftPosition,
+													 const TSize& aSize )
+	{
+	if( aAnchor )
+		{
+		// set top left corner position
+		aAnchor->SetAnchor( EAlfAnchorTopLeft, aOrdinal,
+		EAlfAnchorOriginLeft, 
+		EAlfAnchorOriginTop,
+		EAlfAnchorMetricAbsolute, 
+		EAlfAnchorMetricAbsolute, 
+		TAlfTimedPoint( aTopLeftPosition.iX, aTopLeftPosition.iY ) );
+		// .. and set the bottom right corner also to fix the size
+		aAnchor->SetAnchor( EAlfAnchorBottomRight, aOrdinal,
+		EAlfAnchorOriginLeft, 
+		EAlfAnchorOriginTop,
+		EAlfAnchorMetricAbsolute, 
+		EAlfAnchorMetricAbsolute,
+		TAlfTimedPoint( aTopLeftPosition.iX + aSize.iWidth, aTopLeftPosition.iY + aSize.iHeight ) );			
+		}
+	}
+	
+// ---------------------------------------------------------------------------
+// CFMRadioAlfIndicator::SetRelativeCornerAnchors
+// Sets relative rect of the anchor by top left and bottom right points.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfIndicator::SetRelativeCornerAnchors( CAlfAnchorLayout* aAnchor,
+													 TInt aOrdinal,
+													 const TAlfRealPoint& aTopLeftPosition,
+													 const TAlfRealPoint& aBottomRightPosition )
+	{
+	if( aAnchor )
+		{
+		aAnchor->SetRelativeAnchorRect( aOrdinal,
+    	EAlfAnchorOriginLeft, EAlfAnchorOriginTop, aTopLeftPosition,
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop, aBottomRightPosition );		
+		}
+	}
+	
+// ---------------------------------------------------------------------------
+// CFMRadioAlfIndicator::SetRelativeCornerAnchors
+// Sets relative rect of the anchor by top left point and size of the rect
+// ---------------------------------------------------------------------------
+//	
+void CFMRadioAlfIndicator::SetRelativeCornerAnchors( CAlfAnchorLayout* aAnchor,
+													 TInt aOrdinal,
+													 const TAlfRealPoint& aTopLeftPosition,
+													 const TAlfRealSize& aSize )
+	{
+	if( aAnchor )
+		{
+		aAnchor->SetRelativeAnchorRect( aOrdinal,
+    	EAlfAnchorOriginLeft, EAlfAnchorOriginTop, aTopLeftPosition,
+        EAlfAnchorOriginLeft, EAlfAnchorOriginTop, aTopLeftPosition + TAlfRealPoint( aSize.iWidth, aSize.iHeight ) );		
+		}
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfIndicator::Fade
+// Sets the fading animation to the CAlfVisual object.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfIndicator::Fade( CAlfVisual* aVisual, TInt aFadingTime, TReal aOpacity ) const
+	{
+	TAlfTimedValue opacity;
+	opacity.SetTarget( aOpacity, aFadingTime ); // and smooth target
+	aVisual->SetOpacity( opacity );
+	}
+
+//  End of File  
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradioalfmediaidle.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,1166 @@
+/*
+* 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:  Implementation of the class CFMRadioAlfMediaIdle
+*
+*/
+
+
+// INCLUDE FILES
+
+#include <aknlayoutscalable_apps.cdl.h>
+#include <alf/alfenv.h>
+#include <alf/alftextvisual.h>
+#include <alf/alfevent.h>
+#include <alf/alftransformation.h>
+#include <alf/alfgradientbrush.h>
+#include <alf/alfbrusharray.h>
+#include <alf/alfborderbrush.h>
+#include <alf/alfimagebrush.h>
+#include <alf/alftexturemanager.h>
+#include <alf/alfviewportlayout.h>
+#include <alf/alfdecklayout.h>
+#include <alf/alfflowlayout.h> 
+#include <alf/alfutil.h>
+#include <alf/alftextstyle.h>
+#include <AknsItemID.h>
+#include <data_caging_path_literals.hrh>
+#include <e32math.h>
+#include <eikenv.h>
+#include <StringLoader.h>
+
+#include "fmradioalfmediaidle.h"
+#include "fmradioappui.h"
+#include "debug.h"
+
+// CONSTANTS
+
+
+_LIT8( KMediaIdleAnchorTag, "mediaIdleAnchor" );
+_LIT8( KMediaIdleViewportTag, "mediaIdleViewport" );
+_LIT8( KMediaIdleFlowLayoutTag, "mediaIdleFlowLayout" );
+_LIT8( KMediaIdleBackgroundTextTag, "mediaIdleBackgroundText" );
+_LIT8( KMediaIdleItemTag, "mediaIdleItem" );
+
+const TInt KNumberOfTextStyles = 4;
+const TReal KRelativeFontSizeArray[KNumberOfTextStyles] = {0.12f, 0.17f, 0.25f, 0.33f};
+const TReal KRelativeSizeOfMediaIdleBackgroundFont = 0.7f;
+
+const TInt KMediaIdleFadeOutDurationTime = 500;
+const TInt KMediaIdleFadeInDurationTime = 500;
+
+const TInt  KMediaIdleBackgroundTextScrollInterval = 12000;
+const TReal KMediaIdleBackgroundTextOpacity = 0.2f;
+const TInt  KMediaIdleBackgroundTextSideToSideTransitionDurationTime = 25000;
+const TInt  KMediaIdleBackgroundTextYTransition = 10;
+
+//const TInt KMediaIdleModeChangeInterval = 20000;
+
+const TInt KMaxNumberOfMediaIdleItems = 5;
+const TInt KMaxMediaIdleItemScrollDurationTime = 35000;
+const TInt KMinMediaIdleItemScrollDurationTime = 25000;
+const TInt KMinMediaIdleItemHideDurationTime = 5000;
+const TInt KModeChangingFactor = 3;
+
+const TReal KMaxOpacity = 0.3f;
+const TReal KMinOpacity = 0.1f;
+
+const TRgb KMediaIdleItemDefaultColor(0, 0, 0);  
+const TRgb KMediaIdleItemBackgroundColor(255, 255, 255); 
+const TReal KMediaIdleItemBackgroundOpacity = 0.4f;
+
+const TInt KMediaIdleItemArrayGranularity = 4;
+
+const TInt KLAFVarietyRadioIdlePortrait = 0;
+const TInt KLAFVarietyRadioIdleLandscape = 1;
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+
+// ============================ LOCAL FUNCTIONS ===============================
+
+namespace LocalFunctions {
+
+// ---------------------------------------------------------------------------
+// fullyVerticallyVisibleRect
+// Check does the given rect fit vertically into a CAlfLayout area
+// ---------------------------------------------------------------------------
+//
+static TBool fullyVerticallyVisibleRect( const CAlfLayout& aLayout, const TAlfRealRect & aRect )
+	{	
+	TBool ret = ETrue;
+	TInt layoutHeight = aLayout.Size().IntTarget().iY;
+	TInt bottomY = aRect.BottomLeft().iY;
+	TInt topY = aRect.TopRight().iY;
+	
+	if ( bottomY >= layoutHeight || topY < 0 ) ret = EFalse;
+	
+	return ret;
+	}
+// ---------------------------------------------------------------------------
+// updateItemVisibility
+// Hide (or unhide) an visual depending is it going to be not fully visible or not
+// ---------------------------------------------------------------------------
+//
+static void updateItemVisibility( const CAlfLayout& aLayout, TInt index )
+	{
+	CAlfVisual& visual = aLayout.Visual( index );
+	if ( !LocalFunctions::fullyVerticallyVisibleRect( aLayout, visual.DisplayRectTarget() ) )
+		{
+		visual.SetOpacity( TAlfTimedValue( 0.0f, KMinMediaIdleItemHideDurationTime ) );
+		}
+	}
+}
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::NewL
+// Two-phase constructor of CFMRadioAlfMediaIdle
+// ---------------------------------------------------------------------------
+//
+CFMRadioAlfMediaIdle* CFMRadioAlfMediaIdle::NewL( CAlfEnv& aEnv )
+	{
+	CFMRadioAlfMediaIdle* self = new (ELeave) CFMRadioAlfMediaIdle( );
+	CleanupStack::PushL(self);
+	self->ConstructL( aEnv );
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::CFMRadioAlfMediaIdle
+// Default constructor
+// ----------------------------------------------------------------------------
+//
+CFMRadioAlfMediaIdle::CFMRadioAlfMediaIdle() 
+:   iFontsOrientation( EOrientationNone ),
+    iOrientation( EOrientationNone ),
+	iMediaIdleItemBackgroundTextStyleId( KErrNotFound ), 
+	iMediaIdleState( EStopped ),
+	iMediaIdleMode( EBackgroundTextAndMediaIdleItems ),
+	iMediaIdleRequestedMode( EBackgroundTextAndMediaIdleItems ),	
+	iMediaIdlePrimaryColor( KRgbBlue ),
+	iMediaIdleSecondaryColor( KRgbBlue ),
+	iPsName( NULL )
+	{
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::ConstructL( CAlfEnv& aEnv )
+    {
+    CAlfControl::ConstructL( aEnv );
+    UpdateLayout();
+    iIsConstructed = ETrue;
+    }
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::CreateFontsL
+// Create fonts that are based on a list of relative sizes
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::CreateFontsL()
+	{
+	TInt layoutHeight = 20;
+	
+	if ( iMediaIdleLayout.Rect().Height() != 0 )
+		{
+		layoutHeight = iMediaIdleLayout.Rect().Height();
+		}
+	
+	if( iFontsOrientation != iOrientation ||  
+		iFontReferenceHeight != layoutHeight )
+		{
+		CAlfTextStyleManager& manager = Env().TextStyleManager();
+		for( TInt i=0; i < iTextStyleIdArray.Count(); i++ )
+			{
+			manager.DeleteTextStyle( iTextStyleIdArray[i] );
+			iTextStyleIdArray.Reset();
+			}
+		if( iMediaIdleItemBackgroundTextStyleId != KErrNotFound )
+			{
+			manager.DeleteTextStyle( iMediaIdleItemBackgroundTextStyleId );
+			iMediaIdleItemBackgroundTextStyleId = KErrNotFound;
+			}
+
+		// Create largest font for the background text of media idle
+		iMediaIdleItemBackgroundTextStyleId = manager.CreatePlatformTextStyleL();	
+		CAlfTextStyle* mediaIdleItemStyle = manager.TextStyle( iMediaIdleItemBackgroundTextStyleId );					
+		mediaIdleItemStyle->SetTextSizeInPixels( KRelativeSizeOfMediaIdleBackgroundFont * layoutHeight, ETrue );
+		// Create text styles for other media idle items
+		for( TInt i = 0; i < KNumberOfTextStyles; i++ )
+			{		
+			TInt mediaIdleItemTextStyleId = manager.CreatePlatformTextStyleL();	
+			CAlfTextStyle* mediaIdleItemStyle = manager.TextStyle( mediaIdleItemTextStyleId );					
+			mediaIdleItemStyle->SetTextSizeInPixels( KRelativeFontSizeArray[i] * layoutHeight, ETrue ); 
+			iTextStyleIdArray.AppendL( mediaIdleItemTextStyleId );
+			}
+		iFontsOrientation = iOrientation;
+		iFontReferenceHeight = layoutHeight;
+		}
+	}
+
+// ---------------------------------------------------------------------------
+// ~CFMRadioAlfMediaIdle::~CFMRadioAlfMediaIdle
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CFMRadioAlfMediaIdle::~CFMRadioAlfMediaIdle()
+	{
+	Env().CancelCustomCommands( this );
+	if( iMediaIdleItemArray )
+		{
+		if( iMediaIdleItemArray->Count() > 0 )
+			{
+			iMediaIdleItemArray->Reset();	
+			}
+		delete iMediaIdleItemArray;
+		}
+	CAlfTextStyleManager& manager = Env().TextStyleManager();
+	for( TInt i=0; i < iTextStyleIdArray.Count(); i++ )
+		{
+		manager.DeleteTextStyle( iTextStyleIdArray[i] );
+		}
+	iTextStyleIdArray.Close();
+    if ( iMediaIdleItemBackgroundTextStyleId != KErrNotFound )
+        {
+        manager.DeleteTextStyle( iMediaIdleItemBackgroundTextStyleId );
+        }
+    delete iPsName;
+    }
+ 
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::AddMediaIdleL
+// Creates the media idle with passed number of media idle items
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::AddMediaIdleL( const TInt aNumberOfMediaIdleItems ) 
+	{	
+	FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::AddMediaIdleL(%d)"), aNumberOfMediaIdleItems ) );
+	
+	CAlfAnchorLayout* mediaIdleAnchor = static_cast<CAlfAnchorLayout*> ( FindTag( KMediaIdleAnchorTag ) );
+	if ( !mediaIdleAnchor )
+		{
+		mediaIdleAnchor = CAlfAnchorLayout::AddNewL( *this );	
+		}
+	mediaIdleAnchor->SetTagL( KMediaIdleAnchorTag );
+	
+	CAlfViewportLayout* mediaIdleViewport = static_cast<CAlfViewportLayout*> ( FindTag( KMediaIdleViewportTag ) );
+	if( !mediaIdleViewport )
+		{
+		mediaIdleViewport = CAlfViewportLayout::AddNewL( *this, mediaIdleAnchor );
+		mediaIdleViewport->SetTagL( KMediaIdleViewportTag );
+		mediaIdleViewport->SetViewportPos( TAlfRealPoint( .0f, .0f ), 0 );
+		mediaIdleViewport->SetViewportSize( TAlfRealSize( 1.0f, 1.0f ), 0 );
+		}
+	MediaIdleFadeOut( ETrue ); 
+
+	// Create the flow layout for the other media idle items
+	CAlfFlowLayout* mediaIdleFlowLayout = static_cast<CAlfFlowLayout*> ( FindTag( KMediaIdleFlowLayoutTag ) );
+	if( !mediaIdleFlowLayout )
+		{
+		mediaIdleFlowLayout = CAlfFlowLayout::AddNewL( *this, mediaIdleViewport );
+		mediaIdleFlowLayout->SetTagL( KMediaIdleFlowLayoutTag );
+		mediaIdleFlowLayout->SetFlowDirection( CAlfFlowLayout::EFlowVertical );
+		mediaIdleFlowLayout->SetMode( CAlfFlowLayout::EModeCenterPerpendicular );
+		}
+	
+	InitializeMediaIdleItemsL( aNumberOfMediaIdleItems );
+	UpdateLayout();	
+	AnimateMediaIdleItems();
+	MediaIdleFadeIn();
+	}
+	
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::CreateBackgroundTextL
+// Creates backgrounf text for media idle content
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::CreateBackgroundTextL()
+	{
+	FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::CreateBackgroundTextL()") ) );
+
+	CAlfViewportLayout* mediaIdleViewport = static_cast<CAlfViewportLayout*> ( FindTag( KMediaIdleViewportTag ) );
+	// Create and animate the background text of the media idle
+	HBufC* itemText = GetRandomMediaIdleContentL();
+	CleanupStack::PushL( itemText ); 
+	CAlfTextVisual* backgroundText = static_cast<CAlfTextVisual*> ( mediaIdleViewport->FindTag( KMediaIdleBackgroundTextTag ) );
+	if( !backgroundText && itemText )
+		{	
+		backgroundText = AddMediaIdleItemL( mediaIdleViewport, *itemText, EFalse, KMediaIdleItemBackgroundColor, KMediaIdleItemBackgroundOpacity );			
+		backgroundText->SetTagL( KMediaIdleBackgroundTextTag );
+		SetMediaIdleItemSettingsL( backgroundText, *itemText, iMediaIdleItemBackgroundTextStyleId );
+		backgroundText->SetOpacity( TAlfTimedValue( KMediaIdleBackgroundTextOpacity ) ); 
+		backgroundText->EnableBrushesL();
+		backgroundText->EnableShadow( EFalse );
+        backgroundText->SetFlag( EAlfVisualFlagManualSize );
+		SetScrollingToBackgroundText( backgroundText,
+						   KMediaIdleBackgroundTextSideToSideTransitionDurationTime,
+						   EMediaIdleBackgroundTextScrollEnd );	
+		}
+	else if( itemText )
+		{
+		SetMediaIdleItemSettingsL( backgroundText, *itemText, iMediaIdleItemBackgroundTextStyleId );
+		backgroundText->SetOpacity( TAlfTimedValue( KMediaIdleBackgroundTextOpacity ) ); 
+		SetScrollingToBackgroundText( backgroundText, KMediaIdleBackgroundTextSideToSideTransitionDurationTime, EMediaIdleBackgroundTextScrollEnd );
+		}
+	CleanupStack::PopAndDestroy( itemText ); 
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::InitializeMediaIdleItemsL
+// Initializes the media idle items
+// ----------------------------------------------------------------------------
+//	
+void CFMRadioAlfMediaIdle::InitializeMediaIdleItemsL( const TInt aNumberOfMediaIdleItems )
+	{
+	FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::InitializeMediaIdleItemsL(%d)"), aNumberOfMediaIdleItems ) );
+
+	CAlfFlowLayout* mediaIdleFlowLayout = static_cast<CAlfFlowLayout*> ( FindTag( KMediaIdleFlowLayoutTag ) );
+	if( mediaIdleFlowLayout )
+		{
+		CreateFontsL();
+		CreateBackgroundTextL();
+		// Create the media idle items 	  	
+		for( TInt i = 0, fontStyleIdIx = 0; i < aNumberOfMediaIdleItems; i++, fontStyleIdIx++ )
+			{
+			HBufC* itemText = GetRandomMediaIdleContentL();
+			const TPtrC& text = itemText ? itemText->Des() : KNullDesC();
+
+			CleanupStack::PushL( itemText ); 
+            TInt randFontStyleIx = AlfUtil::RandomInt( 0,  iTextStyleIdArray.Count() - 1 );
+            CAlfTextVisual* mediaIdleItem = NULL;
+            if( mediaIdleFlowLayout->Count() < aNumberOfMediaIdleItems )	
+                {
+                mediaIdleItem  = AddMediaIdleItemL( mediaIdleFlowLayout, text, EFalse, KMediaIdleItemBackgroundColor, KMediaIdleItemBackgroundOpacity );					
+                }
+            else
+                {
+                mediaIdleItem = static_cast<CAlfTextVisual*> ( &mediaIdleFlowLayout->Visual( i ) );
+                mediaIdleItem->SetOpacity( TAlfTimedValue( .0f ) );
+                mediaIdleItem->EnableTransformationL( ETrue );
+                mediaIdleItem->Transformation().LoadIdentity();
+                }	
+            SetMediaIdleItemSettingsL( mediaIdleItem, text, iTextStyleIdArray[ randFontStyleIx ] );		
+            CleanupStack::PopAndDestroy( itemText );
+			} 
+		}
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::AnimateMediaIdleItems
+// Sets defined animation to the created media idle items
+// ----------------------------------------------------------------------------
+//	
+void CFMRadioAlfMediaIdle::AnimateMediaIdleItems()
+	{
+	FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::AnimateMediaIdleItems()") ) );
+
+	CAlfFlowLayout* mediaIdleFlowLayout = static_cast<CAlfFlowLayout*> ( FindTag( KMediaIdleFlowLayoutTag ) );
+	if( mediaIdleFlowLayout )
+		{		  	
+		for( TInt i = 0; i < mediaIdleFlowLayout->Count(); i++ )
+			{	
+		    CAlfTextVisual* mediaIdleItem = static_cast<CAlfTextVisual*> ( &mediaIdleFlowLayout->Visual( i ) );
+		    if( mediaIdleItem )	
+				{
+			 	SetMediaIdleItemAnimation( mediaIdleItem );	
+				}	
+			} 
+		}
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::AddMediaIdleItemL
+// Creates the media idle item to the passed media idle view port.
+// ----------------------------------------------------------------------------
+//	
+CAlfTextVisual* CFMRadioAlfMediaIdle::AddMediaIdleItemL( CAlfLayout* aMediaIdle, 
+                                                         const TDesC& aMediaIdleItemText, 
+                                                         TBool aMediaIdleItemHasBackground, 
+                                                         const TRgb& aBackgroundColor, 
+                                                         const TReal aBackgroundOpacity )
+	{
+	FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::AddMediaIdleItemL('%S')"), &aMediaIdleItemText ) );
+	
+	CAlfTextVisual* mediaIdleItem = CAlfTextVisual::AddNewL( *this, aMediaIdle );
+    mediaIdleItem->EnableBrushesL();
+    mediaIdleItem->SetTextL( aMediaIdleItemText );	
+    mediaIdleItem->SetTagL( KMediaIdleItemTag );
+    mediaIdleItem->EnableShadow( EFalse );
+    mediaIdleItem->SetAlign( EAlfAlignHCenter, EAlfAlignVCenter );
+   	// mediaIdleItem->SetFlag( EAlfVisualFlagManualLayout );
+    mediaIdleItem->SetSize( mediaIdleItem->TextExtents() );
+        
+    if ( aMediaIdleItemHasBackground )
+	    {
+		CAlfGradientBrush* gradientBrush = CAlfGradientBrush::NewLC( Env() );
+		gradientBrush->SetColor( aBackgroundColor, aBackgroundOpacity );
+		mediaIdleItem->Brushes()->AppendL( gradientBrush, EAlfHasOwnership );
+		CleanupStack::Pop( gradientBrush );		
+	    }
+	return mediaIdleItem;
+	}
+	
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::SetMediaIdleItemSettings
+// Sets color, opacity and scaling settings to the media idle item
+// ----------------------------------------------------------------------------
+//	
+void CFMRadioAlfMediaIdle::SetMediaIdleItemSettingsL( CAlfTextVisual* aMediaIdleItem, const TDesC& aMediaIdleItemText, const TInt aTextStyleId )
+	{
+	// Set text of the media idle item
+	aMediaIdleItem->SetTextL( aMediaIdleItemText );	
+	aMediaIdleItem->SetOpacity( TAlfTimedValue( .0f ) );
+	aMediaIdleItem->EnableTransformationL( ETrue );
+	CAlfTransformation* mediaIdleItemTransformation = &( aMediaIdleItem->Transformation() );
+	mediaIdleItemTransformation->LoadIdentity();	
+	
+	// Select text color of the media idle item	
+	TInt randomColorSelector = AlfUtil::RandomInt( 0, 1 );
+	if ( randomColorSelector )
+		{
+		// Set text color of the media idle item 	
+		aMediaIdleItem->SetColor( iMediaIdlePrimaryColor );	
+		}
+	else
+		{
+		// Set text color of the media idle item 	
+		aMediaIdleItem->SetColor( iMediaIdleSecondaryColor );
+		}
+				    	
+	// Set text style of the media idle	item   
+	aMediaIdleItem->SetTextStyle( aTextStyleId );
+		
+	TSize itemSize( 0, 0 );
+	if ( aMediaIdleItem->TextExtents() != itemSize )
+		{
+		aMediaIdleItem->SetSize( aMediaIdleItem->TextExtents() );	
+		}		
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::SetMediaIdleItemAnimation
+// Sets translating animations to the media idle item
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::SetMediaIdleItemAnimation( CAlfTextVisual* aMediaIdleItem )
+	{	
+	FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::SetMediaIdleItemAnimation()") ) );
+
+	CAlfFlowLayout* mediaIdleFlowLayout = static_cast<CAlfFlowLayout*> ( aMediaIdleItem->Layout() );
+	TInt mediaIdleItemCount = mediaIdleFlowLayout->Count();
+	TInt mediaIdleItemIndex = mediaIdleFlowLayout->FindVisual( aMediaIdleItem );
+	
+	TInt mediaIdleItemWidth = aMediaIdleItem->DisplayRect().Width();
+	TInt mediaIdleWidth = mediaIdleFlowLayout->Size().IntTarget().iX;
+	
+	TInt randomTranslateDuration = AlfUtil::RandomInt( KMinMediaIdleItemScrollDurationTime, KMaxMediaIdleItemScrollDurationTime );
+	TInt scrollDirection = AlfUtil::RandomInt( 0,  1 );
+	TAlfTimedValue targetPositionX;
+	if( scrollDirection )
+		{
+		targetPositionX.SetValueNow( -mediaIdleWidth/2 - mediaIdleItemWidth/2 ); 
+		targetPositionX.SetTarget( mediaIdleWidth/2 + mediaIdleItemWidth/2, randomTranslateDuration ); 
+		}
+	else
+		{
+		targetPositionX.SetValueNow( mediaIdleWidth/2 + mediaIdleItemWidth/2  );
+		targetPositionX.SetTarget( -mediaIdleWidth/2 - mediaIdleItemWidth/2, randomTranslateDuration ); 
+		}
+
+	Translate( aMediaIdleItem, targetPositionX, TAlfTimedValue(0)); // targetPositionY );
+
+	if( mediaIdleItemIndex >= 0 )
+		{
+		Env().Send( TAlfCustomEventCommand( EMediaIdleItemTransformationEnd,
+											this,
+											mediaIdleItemIndex ),
+											randomTranslateDuration );
+		}
+	// Set text opacity of the media idle item
+	if( !LocalFunctions::fullyVerticallyVisibleRect( *mediaIdleFlowLayout, aMediaIdleItem->DisplayRect() ) )
+		{
+		aMediaIdleItem->SetOpacity( TAlfTimedValue( 0.0f ) );
+		}
+	else
+		{
+		TReal randomOpacity = AlfUtil::RandomReal( KMinOpacity, KMaxOpacity );
+		aMediaIdleItem->SetOpacity( TAlfTimedValue( randomOpacity ) );
+		}
+	
+	mediaIdleFlowLayout->UpdateChildrenLayout( KMinMediaIdleItemScrollDurationTime );
+	
+	// Checking all items, should they fade or not; must be done after UpdateChildrenLayout
+	for (TInt i=0; i<mediaIdleItemCount; i++ ) 
+		{
+		LocalFunctions::updateItemVisibility( *mediaIdleFlowLayout, i );
+		}
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::MediaIdleFadeIn
+// Fades in media idle
+// ---------------------------------------------------------------------------
+//		
+void CFMRadioAlfMediaIdle::MediaIdleFadeIn( TBool aNow )
+	{
+	FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::MediaIdleFadeIn(%d)"), aNow ) );
+
+	CAlfViewportLayout* mediaIdle = static_cast<CAlfViewportLayout*> ( FindTag( KMediaIdleViewportTag ) );
+	if ( mediaIdle )
+		{	
+		if( aNow )
+			{
+			FadeIn( mediaIdle, 0 );
+			}
+		else
+			{
+			FadeIn( mediaIdle, KMediaIdleFadeInDurationTime );	
+			}
+		}
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::MediaIdleFadeOut
+// Fades out media idle
+// ---------------------------------------------------------------------------
+//	
+void CFMRadioAlfMediaIdle::MediaIdleFadeOut( TBool aNow )
+	{
+	FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::MediaIdleFadeOut(%d)"), aNow ) );
+
+	CAlfViewportLayout* mediaIdle = static_cast<CAlfViewportLayout*> ( FindTag( KMediaIdleViewportTag ) );
+	if ( mediaIdle )
+		{		
+		if( aNow )
+			{
+			FadeOut( mediaIdle, 0 );
+			}
+		else
+			{
+			FadeOut( mediaIdle, KMediaIdleFadeOutDurationTime );	
+			}
+		}
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::StartMediaIdleL
+// Launches media idle.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::StartMediaIdleL() 
+    {
+    FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::StartMediaIdleL()") ) );
+
+    if ( iMediaIdleState == EStopped )
+        {
+        Env().CancelCustomCommands( this );
+        iMediaIdleState = ERunning;
+        AddMediaIdleL( KMaxNumberOfMediaIdleItems );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::AddMediaIdleContentL
+// Adds media idle item text to be used in the media idle
+// ----------------------------------------------------------------------------
+//		
+void CFMRadioAlfMediaIdle::AddMediaIdleContentL( const TDesC& aMediaIdleItemText )
+	{
+	FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::AddMediaIdleContentL('%S')"), &aMediaIdleItemText ) );
+
+	if( !iMediaIdleItemArray )
+		{
+		// Array for media idle items
+    	iMediaIdleItemArray = new( ELeave ) CDesCArrayFlat( KMediaIdleItemArrayGranularity );
+    	iMediaIdleItemArray->AppendL( aMediaIdleItemText );
+		}
+	else
+	    {
+	    TInt searchResultIndex = 0;
+	    if ( iMediaIdleItemArray->Find( aMediaIdleItemText, searchResultIndex ) )
+	        {
+	        // text wasn't added earlier
+	        iMediaIdleItemArray->AppendL( aMediaIdleItemText );
+	        }
+	    }
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::GetRandomMediaIdleContentL
+// Retrieves text from randomly chousen media idle item
+// ----------------------------------------------------------------------------
+//	
+HBufC* CFMRadioAlfMediaIdle::GetRandomMediaIdleContentL()	
+	{
+	if( !iMediaIdleItemArray )
+		{	
+		return NULL;		
+		}
+	TInt count = iMediaIdleItemArray->MdcaCount();
+	if( count > 0 )
+    	{  
+    	TInt mediaIdleItemIndex;
+    	mediaIdleItemIndex = AlfUtil::RandomInt( 0, count - 1 );
+    	TPtrC itemContent( iMediaIdleItemArray->MdcaPoint( mediaIdleItemIndex ) );
+    	return itemContent.AllocL();
+    	}
+    else
+    	{
+    	return NULL;	
+    	}
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::ResetMediaIdleContent
+// Removes all media idle item texts
+// ----------------------------------------------------------------------------
+//
+void  CFMRadioAlfMediaIdle::ResetMediaIdleContent()
+	{
+	FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::ResetMediaIdleContent()") ) );
+
+	delete iPsName;
+	iPsName = NULL;
+	if( iMediaIdleItemArray )
+		{
+		if( iMediaIdleItemArray->Count() > 0 )
+			{
+			iMediaIdleItemArray->Reset();	
+			iMediaIdleItemArray->Compress();
+			}	
+		}	
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::MediaIdleContentCount
+// Returns number of media idle content items  
+// ----------------------------------------------------------------------------
+//
+TInt CFMRadioAlfMediaIdle::MediaIdleContentCount() const
+	{
+	if( iMediaIdleItemArray )
+		{
+		return iMediaIdleItemArray->Count();
+		}
+	else
+		{
+		return 0;
+		}
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::SetPrimaryColor
+// Sets primary color for the media idle
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::SetPrimaryColor( const TRgb& aColor )		
+	{
+	iMediaIdlePrimaryColor = aColor;	
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::SetSecondaryColor
+// Sets secondary color for the media idle
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::SetSecondaryColor( const TRgb& aColor )		
+	{
+	iMediaIdleSecondaryColor = aColor;	
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::Translate
+// Translates the visual object with passed arguments
+// ----------------------------------------------------------------------------
+//	
+void CFMRadioAlfMediaIdle::Translate( CAlfTextVisual* aTextVisual, const TAlfTimedValue& aX, const TAlfTimedValue& aY )
+	{
+	if( aTextVisual )
+		{
+		TRAPD( err, aTextVisual->EnableTransformationL( ETrue ) );
+		if( err == KErrNone )
+			{
+			CAlfTransformation* visualTransformation = &( aTextVisual->Transformation() );
+			TAlfTimedValue x(aX);
+			x.SetStyle( EAlfTimedValueStyleLinear );
+			
+			TAlfTimedValue y(aY);
+			y.SetStyle( EAlfTimedValueStyleLinear );
+			
+			visualTransformation->Translate( x, y );
+			}			
+		}
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::LoadTextVisualIdentity
+// Removes all transformations of the visual object such as the scaling and translating.
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::LoadTextVisualIdentity( CAlfTextVisual* aTextVisual )
+	{
+	if( aTextVisual )
+		{
+		TRAPD( err, aTextVisual->EnableTransformationL( ETrue ) );
+		if( err == KErrNone )
+			{
+			CAlfTransformation* visualTransformation = &( aTextVisual->Transformation() );
+			visualTransformation->LoadIdentity();		
+			}
+		}
+	}
+	
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::UpdateLayout
+// Calculates display layout
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::UpdateLayout()
+	{
+	FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::UpdateLayout()") ) );
+	
+    TRect mainPaneRect;
+    AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect );   
+    TRect displayRect( mainPaneRect.Size() );   	
+
+    TInt lafVarietyMediaIdle = 0;
+
+    // Adjust positions of the visual elements 
+    if ( iOrientation == EPortrait || iOrientation == EOrientationNone )
+        {
+        lafVarietyMediaIdle = KLAFVarietyRadioIdlePortrait;		
+        }
+    else if ( iOrientation == ELandscape )
+        {
+        lafVarietyMediaIdle = KLAFVarietyRadioIdleLandscape;
+        }
+
+    iMediaIdleLayout.LayoutRect( displayRect,
+            AknLayoutScalable_Apps::area_fmrd2_visual_pane( lafVarietyMediaIdle ).LayoutLine() );
+
+	if ( iIsConstructed )
+		{
+		CAlfVisual* thirdVisual = FindTag( KMediaIdleAnchorTag );
+		if ( thirdVisual )
+			{
+			CAlfAnchorLayout* mediaIdleAnchor = static_cast<CAlfAnchorLayout*>( thirdVisual );
+			SetAbsoluteCornerAnchors( mediaIdleAnchor, 0, iMediaIdleLayout.Rect().iTl, iMediaIdleLayout.Rect().iBr  );
+			mediaIdleAnchor->UpdateChildrenLayout();
+			}
+		}
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::SetModeChangeRequest
+// Sets request for mode change
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::SetModeChangeRequestL( TMediaIdleMode aRequestedMode )
+	{
+	FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::SetModeChangeRequestL(%d)"), aRequestedMode ) );
+
+	iMediaIdleRequestedMode = aRequestedMode;
+	if( iMediaIdleRequestedMode == EBackgroundTextAndMediaIdleItems && 
+		Mode() == EOnlyBackgroundText )
+		{
+		InitializeMediaIdleItemsL( KMaxNumberOfMediaIdleItems );
+		AnimateMediaIdleItems();
+		SetMode( EBackgroundTextAndMediaIdleItems );
+		}
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::SetMode
+// Sets the media idle mode
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::SetMode( TMediaIdleMode aMode )
+	{
+	FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::SetMode(%d)"), aMode ) );
+
+	iMediaIdleMode = aMode;
+	}
+	
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::Mode
+// Retrieves the media idle mode
+// ----------------------------------------------------------------------------
+//
+CFMRadioAlfMediaIdle::TMediaIdleMode CFMRadioAlfMediaIdle::Mode()
+	{
+	return iMediaIdleMode;
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::Orientation
+// Return orientation of the display
+// ----------------------------------------------------------------------------
+//
+CFMRadioAlfMediaIdle::TOrientation CFMRadioAlfMediaIdle::Orientation()
+	{
+	return iOrientation;
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::Orientation
+// Set orientation of the display
+// ----------------------------------------------------------------------------
+//		
+void CFMRadioAlfMediaIdle::SetOrientation( TOrientation aOrientation )
+	{
+	iOrientation = aOrientation;
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::OfferEventL
+// From CAlfControl, takes care of alfred event handling.
+// ----------------------------------------------------------------------------
+//
+TBool CFMRadioAlfMediaIdle::OfferEventL( const TAlfEvent& aEvent )
+	{
+	TBool isHandled = EFalse;
+	if( aEvent.IsCustomEvent() )
+		{
+		FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::OfferEventL(aEvent.CustomParameter()=%d)"), aEvent.CustomParameter() ) );
+
+		switch( aEvent.CustomParameter() )
+			{
+			case EMediaIdleItemTransformationEnd:
+				{
+				HandleMediaIdleItemTransformationEndEventL( aEvent );	
+				isHandled = ETrue;
+				}
+				break;
+			case EMediaIdleBackgroundTextScrollEnd:
+				{	
+				HandleBackgroundTextScrollEndEventL( aEvent );		
+				isHandled = ETrue;
+				}
+				break;
+			case EMediaIdleChangeMode:
+				{	
+				if( Mode() == EBackgroundTextAndMediaIdleItems )
+					{
+					SetModeChangeRequestL( EOnlyBackgroundText );
+					}
+				else
+					{
+					SetModeChangeRequestL( EBackgroundTextAndMediaIdleItems );
+					}
+				isHandled = ETrue;
+				}
+				break;
+			default:
+			break;
+			}
+		}
+	return isHandled;
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::HandleMediaIdleItemTransformationEndEventL
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::HandleMediaIdleItemTransformationEndEventL( const TAlfEvent& aEvent )
+	{
+	FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::HandleMediaIdleItemTransformationEndEventL()") ) );
+	
+	iItemsTransformationEndEventCounter++;
+	if ( iMediaIdleRequestedMode == EOnlyBackgroundText || Mode() == EOnlyBackgroundText )
+		{			
+		CAlfFlowLayout* mediaIdleFlowLayout = static_cast<CAlfFlowLayout*> ( FindTag( KMediaIdleFlowLayoutTag ) );			
+		if ( mediaIdleFlowLayout )
+			{					
+			TInt mediaIdleItemIndex = aEvent.CustomEventData(); 
+			CAlfTextVisual* mediaIdleItem = static_cast<CAlfTextVisual*> ( &mediaIdleFlowLayout->Visual( mediaIdleItemIndex ) );
+			if ( mediaIdleItem )
+				{
+				mediaIdleItem->SetOpacity( TAlfTimedValue( .0f ) ); 
+				}
+			
+			if( iItemsTransformationEndEventCounter == mediaIdleFlowLayout->Count() )
+				{
+				SetMode( EOnlyBackgroundText ); 
+				iItemsTransformationEndEventCounter = 0;
+				Env().Send( TAlfCustomEventCommand( EMediaIdleBackgroundTextScrollEnd, this ), 0 );
+				}
+			}
+		}
+	else 
+		{ 
+		CAlfFlowLayout* mediaIdleFlowLayout = static_cast<CAlfFlowLayout*> ( FindTag( KMediaIdleFlowLayoutTag ) );			
+		if ( mediaIdleFlowLayout )
+			{
+			HBufC* itemText = GetRandomMediaIdleContentL();
+			if( itemText )
+				{
+				CleanupStack::PushL( itemText ); 
+				TInt mediaIdleItemIndex = aEvent.CustomEventData(); 
+				CAlfTextVisual* mediaIdleItem = static_cast<CAlfTextVisual*> ( &mediaIdleFlowLayout->Visual( mediaIdleItemIndex ) );
+				if ( mediaIdleItem && iTextStyleIdArray.Count() > 0 )
+					{
+			    	// First hide the media idle item	
+					mediaIdleItem->SetOpacity( TAlfTimedValue( .0f ) );
+					mediaIdleItem->EnableTransformationL( ETrue );
+					mediaIdleItem->Transformation().LoadIdentity();	
+										
+					TInt randFontStyleIx = AlfUtil::RandomInt( 0,  iTextStyleIdArray.Count() - 1 );
+					SetMediaIdleItemSettingsL( mediaIdleItem, *itemText,  iTextStyleIdArray[ randFontStyleIx ] );				
+					SetMediaIdleItemAnimation( mediaIdleItem );	
+					
+					if ( iMediaIdleRequestedMode != EOnlyBackgroundText )
+						{
+						if( iItemsTransformationEndEventCounter == mediaIdleFlowLayout->Count() )
+							{
+							Env().Send( TAlfCustomEventCommand( EMediaIdleChangeMode, this ),
+									KMaxMediaIdleItemScrollDurationTime * KModeChangingFactor );
+							iItemsTransformationEndEventCounter = 0;
+							}
+						}
+					}
+				CleanupStack::PopAndDestroy( itemText ); 
+				}
+			}
+		}
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::HandleBackgroundTextScrollEndEventL
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::HandleBackgroundTextScrollEndEventL( const TAlfEvent& /*aEvent*/ )
+	{
+    FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::HandleBackgroundTextScrollEndEventL()") ) );
+	   
+	CAlfViewportLayout* mediaIdleViewport = static_cast<CAlfViewportLayout*> ( FindTag( KMediaIdleViewportTag ) );
+	if( mediaIdleViewport )
+		{
+		CAlfTextVisual* backgroundText = static_cast<CAlfTextVisual*> ( mediaIdleViewport->FindTag( KMediaIdleBackgroundTextTag ) );
+		if( backgroundText )
+			{				
+			backgroundText->SetOpacity( TAlfTimedValue( .0f ) );
+
+			if ( iMediaIdleRequestedMode == EOnlyBackgroundText && Mode() ==  EBackgroundTextAndMediaIdleItems )
+				{
+				}
+			else
+				{
+				if( iMediaIdleRequestedMode == EOnlyBackgroundText && 
+						Mode() == EOnlyBackgroundText )
+					{
+					Env().CancelCustomCommands( this );
+					Env().Send( TAlfCustomEventCommand( EMediaIdleChangeMode, this ),
+							KMediaIdleBackgroundTextSideToSideTransitionDurationTime );
+					}
+				backgroundText->EnableTransformationL( ETrue );
+				backgroundText->Transformation().LoadIdentity();
+				HBufC* itemText = GetRandomMediaIdleContentL();
+				if( itemText )
+					{
+					CleanupStack::PushL( itemText ); 
+					SetMediaIdleItemSettingsL( backgroundText, *itemText, iMediaIdleItemBackgroundTextStyleId );
+					CleanupStack::PopAndDestroy( itemText );
+					}
+				backgroundText->SetOpacity( TAlfTimedValue( KMediaIdleBackgroundTextOpacity ) );
+				SetScrollingToBackgroundText( backgroundText,
+								   KMediaIdleBackgroundTextSideToSideTransitionDurationTime,
+								   EMediaIdleBackgroundTextScrollEnd );		
+				}	
+			}
+		}
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::SetAbsoluteCornerAnchors
+// Sets absolute rect of the anchor by top left and bottom right points.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::SetAbsoluteCornerAnchors( CAlfAnchorLayout* aAnchor,
+                                                     TInt aOrdinal,
+                                                     const TPoint& aTopLeftPosition,
+                                                     const TPoint& aBottomRightPosition )
+    {
+    if ( aAnchor )
+        {
+        // Set top/left anchor.
+        aAnchor->Attach( aOrdinal, 
+                         EAlfAnchorTypeTopLeft,
+                         TAlfXYMetric( TAlfMetric( aTopLeftPosition.iX ), TAlfMetric( aTopLeftPosition.iY ) ),
+                         EAlfAnchorAttachmentOriginTopLeft );
+        
+        // Set bottom/right anchor.
+        aAnchor->Attach( aOrdinal, 
+                         EAlfAnchorTypeBottomRight, 
+                         TAlfXYMetric( TAlfMetric( aBottomRightPosition.iX ), TAlfMetric( aBottomRightPosition.iY ) ),
+                         EAlfAnchorAttachmentOriginTopLeft );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::SetScrollingToBackgroundText
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::SetScrollingToBackgroundText( CAlfTextVisual* aVisual, TInt aTransitionTime, TMediaIdleCustomEvent aEventAfterScrollingEnd )
+    {
+    FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::SetScrollingToBackgroundText(aTransitionTime=%d)"), aTransitionTime ) );
+    
+    CAlfViewportLayout* mediaIdle = static_cast<CAlfViewportLayout*> ( aVisual->Layout() );
+    TInt mediaIdleItemWidth = aVisual->DisplayRect().Width();
+    TInt mediaIdleWidth = mediaIdle->Size().IntTarget().iX;
+    
+    TAlfTimedValue targetPositionX;
+    if ( iBackgroundTextScrollDirection == EScrollRightToLeft )
+        {
+        targetPositionX.SetValueNow(  -mediaIdleItemWidth );
+        targetPositionX.SetTarget( mediaIdleWidth, aTransitionTime );
+        iBackgroundTextScrollDirection = EScrollLeftToRight;
+        }
+    else
+        { 	
+        targetPositionX.SetValueNow( mediaIdleWidth );
+        targetPositionX.SetTarget( -mediaIdleItemWidth, aTransitionTime ); 
+        iBackgroundTextScrollDirection = EScrollRightToLeft;
+        }
+    Translate( aVisual, targetPositionX, TAlfTimedValue( KMediaIdleBackgroundTextYTransition ) );
+    Env().Send( TAlfCustomEventCommand( aEventAfterScrollingEnd, this ), 
+                aTransitionTime + KMediaIdleBackgroundTextScrollInterval );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::FadeIn
+// Sets fade-in animation to the CAlfVisual.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::FadeIn( CAlfVisual* aVisual, TInt aTime, TReal aOpacity ) const
+	{
+	FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::FadeIn(aVisual=0x%x, aTime=%d)"), aVisual, aTime ) );
+	
+	TAlfTimedValue opacity;
+	opacity.SetValueNow( 0.0f ); // immediate change
+	opacity.SetTarget( aOpacity, aTime ); // and smooth target
+	aVisual->SetOpacity( opacity );
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::FadeOut
+// Sets fade-out animation to the CAlfVisual.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::FadeOut( CAlfVisual* aVisual, TInt aTime, TReal aOpacity ) const
+	{
+	FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::FadeOut(aVisual=0x%x, aTime=%d)"), aVisual, aTime ) );
+	TAlfTimedValue opacity;
+	opacity.SetTarget( aOpacity, aTime ); 
+	aVisual->SetOpacity( opacity );
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::AddPsNameToMediaIdleL
+// Adds PS name to the media idle item array
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::AddPsNameToMediaIdleL( const TDesC& aPsName )
+	{
+	FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::AddPsNameToMediaIdleL('%S')"), &aPsName ) );
+	
+	if ( !iMediaIdleItemArray )
+		{
+		// Array for media idle items
+    	iMediaIdleItemArray = new ( ELeave ) CDesCArrayFlat( KMediaIdleItemArrayGranularity );
+    	iPsName = aPsName.AllocL();
+    	iMediaIdleItemArray->AppendL( *iPsName );
+    	return;
+		}
+	else if ( !iPsName ) 	
+		{	
+		// PS name is added for the first time or media idle item array is reseted			
+		if ( iMediaIdleItemArray->Count() < KFMRadioMaxNumberOfMediaIdleContentItem )
+			{
+			iPsName = aPsName.AllocL();							
+			iMediaIdleItemArray->AppendL( *iPsName );
+			}
+		return;
+		}
+		
+	TInt returnValue;
+	TInt searchResultIndex;	
+	
+	returnValue = iMediaIdleItemArray->Find( *iPsName, searchResultIndex );
+		
+	if ( returnValue == 0 ) 
+		{
+		// if old PS name is found, replace it with new name
+        iMediaIdleItemArray->InsertL( searchResultIndex, aPsName );
+        iMediaIdleItemArray->Delete( searchResultIndex + 1 );
+		}
+						
+	delete iPsName;
+	iPsName = NULL;
+	iPsName = aPsName.AllocL();			
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::StopAndFadeOutMediaIdle
+// stops media idle and clears out animation and background image
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::StopAndFadeOutMediaIdle()
+    {
+    FTRACE( FPrint( _L("CFMRadioAlfMediaIdle::StopAndFadeOutMediaIdle() - iMediaIdleState was %d"), iMediaIdleState ) );
+
+    if ( iMediaIdleState != EStopped )
+        {
+        Env().CancelCustomCommands( this );
+        iMediaIdleState = EStopped;
+        MediaIdleFadeOut();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::Show
+// from MFMRadioIdleControlInterface
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::Show()
+    {
+    TRAP_IGNORE( StartMediaIdleL() )
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::Hide
+// from MFMRadioIdleControlInterface
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::Hide()
+    {
+    StopAndFadeOutMediaIdle();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::Deactivate
+// from MFMRadioIdleControlInterface
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfMediaIdle::Deactivate()
+    {
+    StopAndFadeOutMediaIdle();
+    }
+
+//  End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradioalfrdsviewer.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,425 @@
+/*
+* 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:  Implementation of the class CFMRadioAlfIndicator
+*
+*/
+
+
+// INCLUDE FILES
+
+#include <e32cmn.h>
+#include <alf/alfenv.h>
+#include <alf/alftextvisual.h>
+#include <alf/alfevent.h>
+#include <alf/alftransformation.h>
+#include <alf/alftextstyle.h>
+
+// brushes
+#include <alf/alfgradientbrush.h>
+#include <alf/alfbrusharray.h>
+#include <alf/alfborderbrush.h>
+#include <alf/alfimagebrush.h>
+
+#include "debug.h"
+#include "fmradioalfrdsviewer.h"
+#include "fmradioalfrdsviewobserver.h"
+// CONSTANTS
+
+const TInt  KIndicatorFadeInDefaultDurationTime = 500;
+const TInt  KIndicatorFadeOutDefaultDurationTime = 500;
+const TInt  KRDSDisplayPeriod = 60000; //milliseconds = 1 min.
+const TReal KDefaultOpacityInVisibleState = 1.0f;
+const TReal KDefaultOpacityInHiddenState = 0.0f;
+const TReal KRelativeFontSize = 0.10;
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfIndicator::NewL
+// Two-phase constructor of CFMRadioAlfIndicator
+// ---------------------------------------------------------------------------
+//
+CFMRadioAlfRDSViewer* CFMRadioAlfRDSViewer::NewL( CAlfEnv& aEnv )
+	{
+	CFMRadioAlfRDSViewer* self = new (ELeave) CFMRadioAlfRDSViewer( );
+	CleanupStack::PushL(self);
+	self->ConstructL( aEnv );
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfRDSViewer::CFMRadioAlfRDSViewer
+// Default constructor
+// ----------------------------------------------------------------------------
+//
+CFMRadioAlfRDSViewer::CFMRadioAlfRDSViewer()
+:  iTextStyleId( KErrNotFound ),
+   iOpacityInVisibleState( KDefaultOpacityInVisibleState ),
+   iOpacityInHiddenState( KDefaultOpacityInHiddenState ),
+   iIsRdsTextVisible( EFalse ),
+   iRdsTextVisibilityTimerCompleted( ETrue )
+    {
+    //No implementation needed
+    }
+
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfRDSViewer::SetObserver
+// Sets observer
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfRDSViewer::SetObserver( MFMRadioAlfRdsViewObserver* aObserver )
+    {
+	FTRACE( FPrint( _L( "CFMRadioAlfRDSViewer::SetObserver" ) ) );
+    TInt index = iObservers.FindInAddressOrder( aObserver );
+    if ( index == KErrNotFound )
+        {
+        iObservers.InsertInAddressOrder( aObserver );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfRDSViewer::RemoveObserver
+// Removes observer
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfRDSViewer::RemoveObserver( MFMRadioAlfRdsViewObserver* aObserver )
+    {
+	FTRACE( FPrint( _L( "CFMRadioAlfRDSViewer::RemoveObserver" ) ) );
+    TInt index = iObservers.FindInAddressOrder( aObserver );
+
+    if ( index >= 0 )
+        {
+        iObservers.Remove( index );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfRDSViewer::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfRDSViewer::ConstructL( CAlfEnv& aEnv )
+    {
+    FTRACE( FPrint( _L( "CFMRadioAlfRDSViewer::ConstructL" ) ) );
+    CAlfControl::ConstructL( aEnv );
+    AddIndicatorLayerL();
+    Hide();
+    }
+
+// ---------------------------------------------------------------------------
+// ~CFMRadioAlfRDSViewer::~CFMRadioAlfRDSViewer
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CFMRadioAlfRDSViewer::~CFMRadioAlfRDSViewer()
+    {
+    FTRACE( FPrint( _L( "CFMRadioAlfRDSViewer::Destructor" ) ) );
+    Env().CancelCustomCommands( this );
+    if( iTextStyleId != KErrNotFound )
+        {
+        CAlfTextStyleManager& manager = Env().TextStyleManager();
+        manager.DeleteTextStyle( iTextStyleId );
+        }
+    iRadioText.Close();
+    iObservers.Close();
+    } 
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfRDSViewer::OfferEventL
+// From CAlfControl, takes care of alfred event handling. 
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioAlfRDSViewer::OfferEventL( const TAlfEvent& aEvent )
+    {
+    FTRACE( FPrint( _L( "CFMRadioAlfRDSViewer::OfferEventL" ) ) );
+    TBool eventHandled = EFalse;
+
+    if ( aEvent.IsCustomEvent() )
+        {
+        switch( aEvent.CustomParameter() )
+            {
+        	case EFadeInCompleted:
+                {
+                eventHandled = ETrue;
+                Env().Send( TAlfCustomEventCommand( ERDSDisplayTimerCompleted, this ), KRDSDisplayPeriod );
+                break;
+                }
+            case EOldTextFadeEffectCompleted:
+                {
+                eventHandled = ETrue;
+                iText->SetTextL( iRadioText );
+                // fade in the new radio text
+                Fade( iText, KIndicatorFadeInDefaultDurationTime, iOpacityInVisibleState );
+                Env().Send( TAlfCustomEventCommand( EFadeInCompleted, this ), KIndicatorFadeOutDefaultDurationTime );				
+                break;
+                }
+            case ERDSDisplayTimerCompleted:
+                {
+                eventHandled = ETrue;
+                iRdsTextVisibilityTimerCompleted = ETrue;
+                iIsRdsTextVisible = EFalse;
+                Fade( iText, KIndicatorFadeOutDefaultDurationTime, iOpacityInHiddenState );
+                for ( TInt i = 0 ; i < iObservers.Count() ; i++ )
+                    {
+                    iObservers[i]->NotifyRdsTextTimerCompletion();
+                    }
+                break;
+                }
+            default:
+                {
+                break;
+                }
+            }
+        }
+    return eventHandled;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfRDSViewer::SetRect
+// Sets the indicator rectangle. 
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfRDSViewer::SetRect( const TRect& aRect )
+    {
+    iRect = aRect;
+    TRAP_IGNORE( SetTextStyleL() );
+    if ( iIndicatorTextAnchor )
+        {
+        SetAbsoluteCornerAnchors( iIndicatorTextAnchor, 0, iRect.iTl, iRect.iBr );
+        iIndicatorTextAnchor->UpdateChildrenLayout();
+        // It seems that layout is not updated if the text is not changed
+        TRAP_IGNORE( iText->SetTextL( KNullDesC );
+                     iText->SetTextL( iRadioText ); )
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfRDSViewer::AddIndicatorLayerL
+// Creates the needed drawing layers and visual objects
+// for the indicator. 
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfRDSViewer::AddIndicatorLayerL()
+    {
+    // Create an anchor for the indicator layout 
+    iIndicatorTextAnchor = CAlfAnchorLayout::AddNewL( *this );	
+    
+    // Create visual object for the indicator
+    iText = CAlfTextVisual::AddNewL( *this, iIndicatorTextAnchor );
+    iText->SetColor( iTextColor );
+    iText->SetAlign( EAlfAlignHCenter, EAlfAlignVCenter );	
+    iText->SetWrapping( CAlfTextVisual::ELineWrapBreak );
+    iText->SetClipping( ETrue );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfRDSViewer::SetTextStyleL
+// Creates the text style for indicator
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfRDSViewer::SetTextStyleL()
+	{
+	CAlfTextStyleManager& manager = Env().TextStyleManager();
+	CAlfTextStyle* textStyle = NULL;
+	if( iTextStyleId == KErrNotFound )
+		{
+		iTextStyleId = manager.CreatePlatformTextStyleL( EAlfTextStyleNormal );
+		}
+	
+	textStyle = manager.TextStyle( iTextStyleId );
+	// 5 lines 
+	textStyle->SetTextSizeInPixels( ( iRect.Height()*KRelativeFontSize ), ETrue );
+	//textStyle->SetTextPaneHeightInPixels(iRect.Height(), ETrue ); 
+	iText->SetTextStyle( iTextStyleId );
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfRDSViewer::SetTextColor
+// Changes indicator text color.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfRDSViewer::SetTextColor( const TRgb& aTextColor )
+	{
+	iTextColor = aTextColor;
+	if( iText )
+		{
+		iText->SetColor( aTextColor );	
+		}
+	}
+
+// ---------------------------------------------------------
+// CFMRadioAlfRDSViewer::SetTextL
+// Sets the indicator text.
+// ---------------------------------------------------------
+//
+TBool CFMRadioAlfRDSViewer::SetTextL( const TDesC& aText )
+    {
+    TBool result = EFalse;
+    if ( aText.Length() > 0 )
+        {
+        if ( iRadioText.Compare( aText ) != 0 )
+            {
+            iRdsTextVisibilityTimerCompleted = EFalse;
+            Env().CancelCustomCommands( this, ERDSDisplayTimerCompleted );
+
+            iRadioText.Close();
+            iRadioText.Create( aText );
+
+            if ( !iIsRdsTextVisible )
+                {
+                iText->SetTextL( aText );
+                }
+            else
+                {
+                // fade out the old radio text
+                Fade( iText, KIndicatorFadeOutDefaultDurationTime, iOpacityInHiddenState );
+                Env().Send( TAlfCustomEventCommand( EOldTextFadeEffectCompleted, this ), KIndicatorFadeOutDefaultDurationTime );
+                }
+            result = ETrue;
+            }
+        }
+    return result;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioAlfRDSViewer::Show
+// Shows the indicator with the defined opacity value.
+// ---------------------------------------------------------
+//
+void CFMRadioAlfRDSViewer::Show()
+    {
+    if ( !iIsRdsTextVisible )
+        {
+        iIsRdsTextVisible = ETrue;
+        Fade( iText, KIndicatorFadeInDefaultDurationTime, iOpacityInVisibleState );
+        Env().Send( TAlfCustomEventCommand( EFadeInCompleted, this ), KIndicatorFadeOutDefaultDurationTime );
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioAlfRDSViewer::Hide
+// Hides the indicator with the defined opacity value.
+// ---------------------------------------------------------
+//
+void CFMRadioAlfRDSViewer::Hide()
+    {
+    if ( iIsRdsTextVisible )
+        {
+        // cancel timer event
+        Env().CancelCustomCommands( this, ERDSDisplayTimerCompleted );
+        iIsRdsTextVisible = EFalse;
+        Fade( iText, KIndicatorFadeOutDefaultDurationTime, iOpacityInHiddenState );
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioAlfRDSViewer::Reset
+// Cancel events and flush radio text cache
+// ---------------------------------------------------------
+//
+void CFMRadioAlfRDSViewer::Reset()
+    {
+    FTRACE( FPrint( _L( "CFMRadioAlfRDSViewer::Reset" ) ) );
+    iRdsTextVisibilityTimerCompleted = ETrue;
+    iRadioText.Close();
+    Env().CancelCustomCommands( this );
+    }
+// ---------------------------------------------------------------------------
+// CFMRadioAlfRDSViewer::SetOpacityInVisibleState
+// Sets the indicator opacity in visible state.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfRDSViewer::SetOpacityInVisibleState( const TReal aOpacity )
+	{
+	iOpacityInVisibleState = aOpacity;
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfRDSViewer::SetOpacityInHiddenState
+// Sets the indicator opacity in hidden state.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfRDSViewer::SetOpacityInHiddenState( const TReal aOpacity )
+	{
+	iOpacityInHiddenState = aOpacity;
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfRDSViewer::SetAbsoluteCornerAnchors
+// Sets absolute rect of the anchor by top left and bottom right points.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfRDSViewer::SetAbsoluteCornerAnchors( CAlfAnchorLayout* aAnchor,
+                                                     TInt aOrdinal,
+                                                     const TPoint& aTopLeftPosition,
+                                                     const TPoint& aBottomRightPosition )
+    {
+    if ( aAnchor )
+        {
+        // Set top/left anchor.
+        aAnchor->Attach( aOrdinal, 
+                         EAlfAnchorTypeTopLeft,
+                         TAlfXYMetric( TAlfMetric( aTopLeftPosition.iX ), TAlfMetric( aTopLeftPosition.iY ) ),
+                         EAlfAnchorAttachmentOriginTopLeft );
+                
+        // Set bottom/right anchor.
+        aAnchor->Attach( aOrdinal, 
+                         EAlfAnchorTypeBottomRight, 
+                         TAlfXYMetric( TAlfMetric( aBottomRightPosition.iX ), TAlfMetric( aBottomRightPosition.iY ) ),
+                         EAlfAnchorAttachmentOriginTopLeft );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfRDSViewer::Fade
+// Sets the fading animation to the CAlfVisual object.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfRDSViewer::Fade( CAlfVisual* aVisual, TInt aFadingTime, TReal aOpacity ) const
+	{
+	TAlfTimedValue opacity;
+	opacity.SetTarget( aOpacity, aFadingTime ); // and smooth target
+	aVisual->SetOpacity( opacity );
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfRDSViewer::IsShowingRdsTextArea
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioAlfRDSViewer::IsShowingRdsTextArea() const
+    {
+    return iIsRdsTextVisible;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfRDSViewer::Deactivate
+// from MFMRadioIdleControlInterface
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfRDSViewer::Deactivate()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfRDSViewer::IsRdsTextVisibilityTimerCompleted
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioAlfRDSViewer::IsRdsTextVisibilityTimerCompleted()
+    {
+    return iRdsTextVisibilityTimerCompleted;
+    }
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradioalfvisualizer.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,1210 @@
+/*
+* 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:  Implementation of the class CFMRadioAlfVisualizer
+*
+*/
+
+
+// INCLUDE FILES
+
+#include <aknlayoutscalable_apps.cdl.h>
+#include <alf/alfbatchbuffer.h>
+#include <alf/alfcontrolgroup.h>
+#include <alf/alfenv.h>
+#include <alf/alftextvisual.h>
+#include <alf/alfevent.h>
+#include <alf/alftransformation.h>
+#include <alf/alfgradientbrush.h>
+#include <alf/alfbrusharray.h>
+#include <alf/alfborderbrush.h>
+#include <alf/alfimagevisual.h>
+#include <alf/alfimagebrush.h>
+#include <alf/alftexturemanager.h>
+#include <alf/alfdisplay.h>
+#include <alf/alfviewportlayout.h>
+#include <alf/alfdecklayout.h>
+#include <alf/alfutil.h>
+#include <alf/alftextstyle.h>
+#include <AknsItemID.h>
+#include <e32math.h>
+#include <eikenv.h>
+#include <fmradio.mbg>
+#include <aknview.h>
+#include <aknViewAppUi.h>
+#include <AknVolumePopup.h>
+#include <touchfeedback.h>
+
+#include "fmradioalfvisualizer.h"
+#include "fmradioappui.h"
+#include "fmradioalfbitmapanimation.h"
+#include "fmradio.hrh"
+#include "debug.h"
+
+using namespace GestureHelper;
+
+// CONSTANTS
+const TInt KFMRadioStationInformationFadeDurationTime = 200;
+const TInt KFMRadioStationInformationScrollDurationTime = 300;
+// The delay, in microseconds, after which long keypress is activated. Taken from S60 UI style guide
+const TInt KFMRadioRockerLongPressDelay = 600000;
+
+// values from fmradio LAF document
+const TInt KLAFVarietyTuningAnimationPortrait = 7;
+const TInt KLAFVarietyTuningAnimationLandscape = 7;
+const TInt KLAFVarietyTuningTextPortrait = 7;
+const TInt KLAFVarietyTuningTextLandscape = 7;
+const TInt KLAFVarietyInfoPaneFirstLinePortrait = 0;
+const TInt KLAFVarietyInfoPaneFirstLineLandscape = 1;
+const TInt KLAFVarietyInfoPaneSecondLinePortrait = 0;
+const TInt KLAFVarietyInfoPaneSecondLineLandscape = 1;
+const TInt KLAFVarietyStationInfoPanePortrait = 0;
+const TInt KLAFVarietyStationInfoPaneLandscape = 1;
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::NewL
+// Two-phase constructor of CFMRadioAlfVisualizer
+// ---------------------------------------------------------------------------
+//
+CFMRadioAlfVisualizer* CFMRadioAlfVisualizer::NewL( CAlfEnv& aEnv )
+	{
+	CFMRadioAlfVisualizer* self = new (ELeave) CFMRadioAlfVisualizer( );
+	CleanupStack::PushL(self);
+	self->ConstructL( aEnv );
+	CleanupStack::Pop(self);
+	return self;
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::CFMRadioAlfVisualizer
+// Default constructor
+// ----------------------------------------------------------------------------
+//
+CFMRadioAlfVisualizer::CFMRadioAlfVisualizer( ) 
+:  iOrientation ( EOrientationNone )
+	{
+	//No implementation needed
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::ConstructL( CAlfEnv& aEnv )
+	{	    
+    CGestureControl::ConstructL( *this, aEnv, aEnv.PrimaryDisplay(), KFMRadioVisualizerGestureControlGroupId );
+
+    CCoeEnv* coeEnv = CCoeEnv::Static();
+    iAppUi = static_cast<CFMRadioAppUi*>( coeEnv->AppUi() );  
+	
+	SetDisplayStyle( EFMRadioDisplayNoDisplay );  
+    AddInformationLayersL();
+    
+    iBmpAnimation = CFMRadioAlfBitmapAnimation::NewL( aEnv );
+    CAlfControlGroup& group = aEnv.ControlGroup( KFMRadioVisualControlsGroupId );
+    group.AppendL( iBmpAnimation );
+    
+    iTouchFeedback = MTouchFeedback::Instance();
+    
+    UpdateLayout();
+    
+    if ( AknLayoutUtils::PenEnabled() )
+        {
+        iLongPressTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// ~CFMRadioAlfVisualizer::~CFMRadioAlfVisualizer
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CFMRadioAlfVisualizer::~CFMRadioAlfVisualizer()
+	{
+	CAlfTextStyleManager& manager = Env().TextStyleManager();
+	manager.DeleteTextStyle( iFirstLineTextStyleId );
+	manager.DeleteTextStyle( iSecondLineTextStyleId );
+	manager.DeleteTextStyle( iTuningTextStyleId );
+
+	delete iLongPressTimer;
+	}
+    	
+// ----------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::UpdateLayout
+// Calculates display layout
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::UpdateLayout()
+    {
+    TRect mainPaneRect;
+    AknLayoutUtils::LayoutMetricsRect( AknLayoutUtils::EMainPane, mainPaneRect );
+    TRect displayRect( mainPaneRect.Size() );
+
+    TInt lafVarietyAnimation = 0;
+    TInt lafVarietyTuningText = 0;
+    TInt lafVarietyStationInfoPane = 0;
+    TInt lafVarietyFirstLineText = 0;
+    TInt lafVarietySecondLineText = 0;
+
+    TFMRadioDisplayStyle displayStyle = DisplayStyle();
+
+    // Adjust positions of the visual elements 
+    if ( iOrientation == EPortrait || iOrientation == EOrientationNone )
+        {
+        lafVarietyAnimation = KLAFVarietyTuningAnimationPortrait;
+        lafVarietyTuningText = KLAFVarietyTuningTextPortrait;
+        lafVarietyStationInfoPane = KLAFVarietyStationInfoPanePortrait;
+        lafVarietyFirstLineText = KLAFVarietyInfoPaneFirstLinePortrait;
+        lafVarietySecondLineText = KLAFVarietyInfoPaneSecondLinePortrait;
+        }
+    else if ( iOrientation == ELandscape )
+        {
+        lafVarietyAnimation = KLAFVarietyTuningAnimationLandscape;
+        lafVarietyTuningText = KLAFVarietyTuningTextLandscape;
+        lafVarietyStationInfoPane = KLAFVarietyStationInfoPaneLandscape;
+        lafVarietyFirstLineText = KLAFVarietyInfoPaneFirstLineLandscape;
+        lafVarietySecondLineText  = KLAFVarietyInfoPaneSecondLineLandscape;
+        }
+
+    iStationInformationLayout.LayoutRect( displayRect,
+                                          AknLayoutScalable_Apps::area_fmrd2_info_pane( lafVarietyStationInfoPane ).LayoutLine() );
+
+    if ( EFMRadioDisplayDoubleLine == displayStyle )
+        {    
+        iFirstLineLayout.LayoutText( iStationInformationLayout.Rect(),
+                                     AknLayoutScalable_Apps::area_fmrd2_info_pane_t1( lafVarietyFirstLineText ).LayoutLine() );
+        }
+    else // use bigger area for first line because it is the only visible line
+        {
+        iFirstLineLayout.LayoutText( iStationInformationLayout.Rect(),
+                                     AknLayoutScalable_Apps::area_fmrd2_info_pane_t3( lafVarietyFirstLineText ).LayoutLine() );
+        }
+
+    iSecondLineLayout.LayoutText( iStationInformationLayout.Rect(),
+                                  AknLayoutScalable_Apps::area_fmrd2_info_pane_t2( lafVarietySecondLineText ).LayoutLine() );
+
+    iTuningTextLayout.LayoutText( iStationInformationLayout.Rect(),
+                                  AknLayoutScalable_Apps::area_fmrd2_info_pane_t4( lafVarietyTuningText ).LayoutLine() );
+
+    iTuningAnimationLayout.LayoutRect( iStationInformationLayout.Rect(),
+                                       AknLayoutScalable_Apps::area_fmrd2_info_pane_g1( lafVarietyAnimation ) );
+
+    CAlfTextStyleManager& manager = Env().TextStyleManager();
+    CAlfTextStyle* style = NULL;
+    style = manager.TextStyle( iFirstLineTextStyleId );
+    if ( style->TextSizeInPixels() != iFirstLineLayout.TextRect().Height() )
+        {  // Update text size according to height of layout in LS & PT modes
+        style->SetTextSizeInPixels( iFirstLineLayout.TextRect().Height(), ETrue );
+        iFirstLineVisualText->SetTextStyle( iFirstLineTextStyleId );
+        }
+
+    style = manager.TextStyle( iSecondLineTextStyleId );
+    if ( style->TextSizeInPixels() != iSecondLineLayout.TextRect().Height() )
+        {  // Update text size according to height of layout in LS & PT modes
+        style->SetTextSizeInPixels( iSecondLineLayout.TextRect().Height(), ETrue );
+        iSecondLineVisualText->SetTextStyle( iSecondLineTextStyleId );
+        }
+
+    style = manager.TextStyle( iTuningTextStyleId );
+    if ( style->TextSizeInPixels() != iTuningTextLayout.TextRect().Height() )
+        {  // Update text size according to height of layout in LS & PT modes
+        style->SetTextSizeInPixels( iTuningTextLayout.TextRect().Height(), ETrue );
+        iTuningVisualText->SetTextStyle( iTuningTextStyleId );
+        }
+
+    SetAbsoluteCornerAnchors( iStationInformationAnchorLayout, 0, iFirstLineLayout.TextRect().iTl, iFirstLineLayout.TextRect().iBr );
+    SetAbsoluteCornerAnchors( iStationInformationAnchorLayout, 1, iSecondLineLayout.TextRect().iTl, iSecondLineLayout.TextRect().iBr );
+    SetAbsoluteCornerAnchors( iStationInformationAnchorLayout, 2, iTuningTextLayout.TextRect().iTl, iTuningTextLayout.TextRect().iBr );
+    iStationInformationAnchorLayout->UpdateChildrenLayout();
+    iBmpAnimation->SetRect( iTuningAnimationLayout.Rect() );
+    }
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::Orientation
+// Return orientation of the display
+// ----------------------------------------------------------------------------
+//
+TDisplayOrientation CFMRadioAlfVisualizer::Orientation()
+	{
+	return iOrientation;
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::Orientation
+// Set orientation of the display
+// ----------------------------------------------------------------------------
+//		
+void CFMRadioAlfVisualizer::SetOrientation( TDisplayOrientation aOrientation )
+	{
+	iOrientation = aOrientation;
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::SetMirrored
+// ----------------------------------------------------------------------------
+//		
+void CFMRadioAlfVisualizer::SetMirrored( const TBool aIsMirrored  )
+	{
+	iMirrored = aIsMirrored;
+	}
+
+	
+// ---------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::IsMirroredL
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioAlfVisualizer::IsMirrored() const
+    {
+	return iMirrored;
+    }
+	
+// ---------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::AddInformationLayersL
+// Creates the needed drawing layers and visual objects
+// for visualiazing the station information. 
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::AddInformationLayersL()
+	{   
+	CreateTextStylesForStationInformationL();	
+	// Create an anchor for layout of texts
+	iStationInformationAnchorLayout = CAlfAnchorLayout::AddNewL( *this );	
+	
+	// Create anchor to be used when preset channel is changed
+	iStationInformationTempAnchorLayout = CAlfAnchorLayout::AddNewL( *this );															
+	iStationInformationTempAnchorLayout->SetOpacity( TAlfTimedValue( 0.0 ) );
+
+	for ( TInt i = 0; i < 3; i++ )
+		{
+		CAlfTextVisual* tempTextVisual = CAlfTextVisual::AddNewL( *this, iStationInformationTempAnchorLayout ); 	
+		tempTextVisual->SetWrapping( CAlfTextVisual::ELineWrapTruncate );
+		tempTextVisual->SetAlign( EAlfAlignHCenter, EAlfAlignVCenter );
+		}
+
+	// Create visual object for the station name
+	iFirstLineVisualText = CAlfTextVisual::AddNewL( *this, iStationInformationAnchorLayout );
+	iFirstLineVisualText->SetTextStyle( iFirstLineTextStyleId );	
+	iFirstLineVisualText->SetWrapping( CAlfTextVisual::ELineWrapTruncate );
+	iFirstLineVisualText->SetAlign( EAlfAlignHCenter, EAlfAlignVCenter );
+	// Create visual object for frequency information
+	iSecondLineVisualText = CAlfTextVisual::AddNewL( *this, iStationInformationAnchorLayout );
+	iSecondLineVisualText->SetTextStyle( iSecondLineTextStyleId );	
+	iSecondLineVisualText->SetWrapping( CAlfTextVisual::ELineWrapTruncate );
+	iSecondLineVisualText->SetAlign( EAlfAlignHCenter, EAlfAlignVCenter );
+	// Visual for tuning text
+	iTuningVisualText = CAlfTextVisual::AddNewL( *this, iStationInformationAnchorLayout );
+	iTuningVisualText->SetTextStyle( iTuningTextStyleId );  
+	iTuningVisualText->SetWrapping( CAlfTextVisual::ELineWrapTruncate );
+	iTuningVisualText->SetAlign( EAlfAlignHCenter, EAlfAlignVCenter );	
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::CreateTextStylesForStationInformationL
+// Creates the text styles to be used by station information visualiazing
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::CreateTextStylesForStationInformationL()
+	{
+	CAlfTextStyleManager& manager = Env().TextStyleManager();
+	
+	iFirstLineTextStyleId = manager.CreatePlatformTextStyleL(
+	        EAknLogicalFontPrimaryFont,
+	        EAlfTextStyleNormal );
+
+	iSecondLineTextStyleId = manager.CreatePlatformTextStyleL(
+	        EAknLogicalFontSecondaryFont,
+	        EAlfTextStyleNormal );
+
+	iTuningTextStyleId = manager.CreatePlatformTextStyleL(
+	        EAknLogicalFontSecondaryFont,
+	        EAlfTextStyleNormal );
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::SetVisualText
+// Sets text to the defined station information visual.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::SetVisualTextL( TStationInformationVisual aVisual, const TDesC& aText )
+	{
+	if( aVisual & EFirstLineTextVisual )
+		{
+		iFirstLineVisualText->SetTextL( aText );
+		iFirstLineVisualText->SetSize( iFirstLineVisualText->TextExtents() );
+		}
+	if( aVisual & ESecondLineTextVisual )
+		{
+		iSecondLineVisualText->SetTextL( aText );
+		iSecondLineVisualText->SetSize( iSecondLineVisualText->TextExtents() );
+		}
+	if ( aVisual & ETuningTextVisual )
+	    {
+	    iTuningVisualText->SetTextL( aText );
+	    iTuningVisualText->SetSize( iTuningVisualText->TextExtents() );	    	    
+	    }
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::ShowVisual
+// Shows the defined station information visual. 
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::ShowVisual( TStationInformationVisual aVisual, TBool aFade )
+    {
+    if ( aVisual & EFirstLineTextVisual )
+        {
+        if ( aFade )
+            {
+            FadeIn( *iFirstLineVisualText, KFMRadioStationInformationFadeDurationTime );
+            }
+        else
+            {
+            FadeIn( *iFirstLineVisualText, 0 );
+            }
+        }
+    if ( aVisual & ESecondLineTextVisual )
+        {
+        if ( aFade )
+            {
+            FadeIn( *iSecondLineVisualText, KFMRadioStationInformationFadeDurationTime );
+            }
+        else
+            {
+            FadeIn( *iSecondLineVisualText, 0 );
+            }
+        }
+    if ( aVisual & ETuningTextVisual )
+        {
+        if ( aFade )
+            {
+            FadeIn( *iTuningVisualText, KFMRadioStationInformationFadeDurationTime );
+            }
+        else
+            {
+            FadeIn( *iTuningVisualText, 0 );
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::HideVisual
+// Hides the defined station information visual. 
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::HideVisual( TStationInformationVisual aVisual )
+    {
+    if ( aVisual & EFirstLineTextVisual )
+        {
+        FadeOut( *iFirstLineVisualText, 0 );
+        }
+    if ( aVisual & ESecondLineTextVisual )
+        {
+        FadeOut( *iSecondLineVisualText, 0 );
+        }
+    if ( aVisual & ETuningTextVisual )
+        {
+        FadeOut( *iTuningVisualText, 0 );
+        }    
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::SetStationInformationTextColor
+// Change text color of the text visuals.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::SetStationInformationTextColor( const TRgb& aTextColor )
+	{
+	iStationInformationTextColor = aTextColor;
+	iFirstLineVisualText->SetColor( aTextColor );	
+	iSecondLineVisualText->SetColor( aTextColor );
+	iTuningVisualText->SetColor( aTextColor );
+	};
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::ScrollOutCurrentStationInformationL
+// Scrolls out the current station information lines by hiding actual visuals and scrolling out
+// the created temporary information lines
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::ScrollOutCurrentStationInformationL( TFMRadioStationChangeType aChangeType )
+    {
+    // Don't start any effects if the current station info is already disappeared
+    if ( iStationInformationAnchorLayout->Opacity().Target() != 0 )
+        {
+        // Hide the actual station information visuals
+        CreateTemporaryStationInformationVisualsL();
+        AnimateTemporaryStationInformationVisuals( aChangeType );
+        // Hide the original and set it to origin by default
+		HideVisual( EAllVisuals );
+        FadeOut( *iStationInformationAnchorLayout, 0 );
+        iStationInformationAnchorLayout->SetPos( TAlfRealPoint() );
+        // Flush manually
+        Env().BatchBufferHandler().FlushBatchBuffer();
+        }	
+    }
+	
+// ----------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::CreateTemporaryStationInformationVisualsL
+// Creates copy of current station information
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::CreateTemporaryStationInformationVisualsL()
+	{
+    // update layout and attributes for child visuals											
+    for ( TInt i = 0, count = iStationInformationAnchorLayout->Count(); i < count; i++ )
+        {
+        TPoint childPosition;
+        TSize childSize;
+        
+        iStationInformationAnchorLayout->ChildPos( i , childPosition );
+        iStationInformationAnchorLayout->ChildSize( i , childSize );			
+        TAlfRealRect childRect( TRect( childPosition, childSize ) );			
+
+        CAlfTextVisual* textVisual = static_cast<CAlfTextVisual*>( &iStationInformationAnchorLayout->Visual( i ) ); 
+        CAlfTextVisual* tempTextVisual = static_cast<CAlfTextVisual*>( &iStationInformationTempAnchorLayout->Visual( i ) );
+                    
+        tempTextVisual->SetTextL( textVisual->Text() );						
+        tempTextVisual->SetTextStyle( textVisual->TextStyle() );			
+        tempTextVisual->SetColor( iStationInformationTextColor );
+        tempTextVisual->SetOpacity( textVisual->Opacity() );
+
+        SetAbsoluteCornerAnchors( iStationInformationTempAnchorLayout, i, childRect.iTl, childRect.iBr ); 
+        }
+    iStationInformationTempAnchorLayout->UpdateChildrenLayout();
+
+    // Flush manually
+    Env().BatchBufferHandler().FlushBatchBuffer();
+     
+    iStationInformationTempAnchorLayout->SetOpacity( iStationInformationAnchorLayout->Opacity() );
+    iStationInformationTempAnchorLayout->SetPos( iStationInformationAnchorLayout->Pos() );
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::AnimateTemporaryStationInformationVisuals
+// Animates temporary station infoout of the display
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::AnimateTemporaryStationInformationVisuals( TFMRadioStationChangeType aChangeType )
+    {
+    FadeOut( *iStationInformationTempAnchorLayout, KFMRadioStationInformationFadeDurationTime );
+    switch ( aChangeType )
+        {
+        // Swipe visuals in the opposite direction to give the right impression 
+        case EFMRadioStationChangePrevious:
+            {	
+            ScrollToRight( *iStationInformationTempAnchorLayout, KFMRadioStationInformationScrollDurationTime  );
+            break;
+            }
+        case EFMRadioStationChangeNext:
+            {
+            ScrollToLeft( *iStationInformationTempAnchorLayout, KFMRadioStationInformationScrollDurationTime  );				 					 					 					 					 					 					 	
+            break;
+            }
+        case EFMRadioStationChangeScanUp:
+            {
+            ScrollUp( *iStationInformationTempAnchorLayout, KFMRadioStationInformationScrollDurationTime  );                                                                                                                                            
+            break;
+            }
+        case EFMRadioStationChangeScanDown:
+            {
+            ScrollDown( *iStationInformationTempAnchorLayout, KFMRadioStationInformationScrollDurationTime  );                                                                                                                                            
+            break;
+            }
+        default:
+            break;
+        };
+	} 
+
+// ---------------------------------------------------------------------------
+// From class MGestureObserver.
+// Called when user makes gestures.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::HandleGestureL( const MGestureEvent& aEvent )
+    {
+    TGestureCode eventCode( aEvent.Code( MGestureEvent::EAxisBoth ) );
+    FTRACE( FPrint( _L("CFMRadioAlfVisualizer::HandleGestureL(eventCode=%d)"), eventCode ) );
+    
+    // handle gestures only if there is no call or tuning ongoing
+    if ( !iAppUi->RadioEngine()->IsInCall() &&
+            iAppUi->RadioState() != CFMRadioAppUi::EFMRadioStateBusySeek )
+        {
+        switch ( eventCode )
+            {
+            case EGestureTap:
+                {
+                CAknVolumePopup* volPopup = iAppUi->ActiveVolumePopup();
+                if ( volPopup )
+                    {
+                    if ( volPopup->IsVisible() )
+                        {
+                        volPopup->CloseVolumePopup();
+                        iTouchFeedback->InstantFeedback( ETouchFeedbackBasic );
+                        }
+                    else
+                        {
+                        volPopup->ShowVolumePopupL();
+                        }
+                    }
+                break;
+                }
+            case EGestureSwipeLeft:
+                {
+                if ( iDragAxis == EFMRadioDragAxisX )
+                    {
+                    if ( iAppUi->NumberOfChannelsStored() )
+                        {
+                        iRevertGestureDrag = EFalse;
+                        }
+                    iAppUi->HandleCommandL( EFMRadioCmdNextChannel );
+                    }
+                break;
+                }
+            case EGestureSwipeRight:
+                {
+                if ( iDragAxis == EFMRadioDragAxisX )
+                    {
+                    if ( iAppUi->NumberOfChannelsStored() )
+                        {
+                        iRevertGestureDrag = EFalse;
+                        }
+                    iAppUi->HandleCommandL( EFMRadioCmdPrevChannel );
+                    }
+                break;
+                }
+            case EGestureSwipeUp:
+                {
+                if ( iDragAxis == EFMRadioDragAxisY )
+                    {
+                    iRevertGestureDrag = EFalse;
+                    iAppUi->HandleCommandL( EFMRadioCmdSeekUp );
+                    }
+                break;
+                }
+            case EGestureSwipeDown:
+                {
+                if ( iDragAxis == EFMRadioDragAxisY )
+                    {
+                    iRevertGestureDrag = EFalse;
+                    iAppUi->HandleCommandL( EFMRadioCmdSeekDown );
+                    }
+                break;
+                }
+            case EGestureStart:
+                {
+                iDragAxis = EFMRadioDragAxisNone;
+                iRevertGestureDrag = ETrue;
+                iDragStartPosition = iStationInformationAnchorLayout->Pos();
+                break;
+                }
+            case EGestureDrag:
+                {
+                TPoint delta = aEvent.CurrentPos() - aEvent.StartPos();
+                
+                // Determine the dragging axis
+                if ( iDragAxis == EFMRadioDragAxisNone )
+                    {
+                    TInt absX = Abs( delta.iX );
+                    TInt absY = Abs( delta.iY );
+                    if ( absX > absY )
+                        {
+                        iDragAxis = EFMRadioDragAxisX;
+                        }
+                    else if ( absY > absX )
+                        {
+                        iDragAxis = EFMRadioDragAxisY;
+                        }
+                    else
+                        {
+                        //X and Y are equal, can't determine the axis
+                        }
+                    }
+                
+                
+                if ( iRevertGestureDrag && iDragAxis != EFMRadioDragAxisNone ) // gesture is ongoing, ok to move visual
+                    {
+                    TAlfRealPoint newPosition;
+                    newPosition.iX = iDragStartPosition.iX.ValueNow();
+                    newPosition.iY = iDragStartPosition.iY.ValueNow();
+                    
+                    if ( iDragAxis == EFMRadioDragAxisX )
+                        {
+                        newPosition.iX += delta.iX;
+                        }
+                    else
+                        {
+                        newPosition.iY += delta.iY;
+                        }
+                    iStationInformationAnchorLayout->SetPos( newPosition );
+                    }
+                break;
+                }
+            case EGestureUnknown:
+            case EGestureReleased:
+                {
+                if ( iRevertGestureDrag )
+                    {
+                    RevertVisual( *iStationInformationAnchorLayout );
+                    }
+                break;
+                }
+            case EGestureHoldLeft:
+            case EGestureHoldRight:
+            case EGestureHoldUp:
+            case EGestureHoldDown:
+                {
+                // gesture "timed out"
+                if ( iRevertGestureDrag )
+                    {
+                    // change revert status so that the following
+                    // EGestureDrag event doesn't change visual position
+                    // anymore
+                    iRevertGestureDrag = EFalse;
+                    RevertVisual( *iStationInformationAnchorLayout );
+                    }
+                break;
+                }
+            default:
+                {
+                break;
+                }
+            }
+        }
+    else
+        {
+        FTRACE(FPrint(_L("CFMRadioAlfVisualizer::HandleGestureL() call or tuning ongoing -> gestures ignored")));
+        }
+    }
+// ----------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::OfferEventL
+// From CAlfControl, takes care of alfred event handling.
+// ----------------------------------------------------------------------------
+//
+TBool CFMRadioAlfVisualizer::OfferEventL( const TAlfEvent& aEvent )
+    {
+    TBool keyHandled = EFalse;
+    
+    if ( !iAppUi->RadioEngine()->IsInCall() )
+        {
+        if ( aEvent.IsKeyEvent() && AknLayoutUtils::PenEnabled() )
+            {
+            const TKeyEvent& kEvent = aEvent.KeyEvent();
+            
+            if ( kEvent.iCode == EKeyEnter || kEvent.iCode == EKeyOK )
+                {
+                TriggerCommandL( EFMRadioCmdChannelList );
+                keyHandled = ETrue;
+                }
+            
+            switch ( kEvent.iScanCode )
+                {
+                case EStdKeyRightArrow: // check arrow keys
+                case EStdKeyLeftArrow:
+                case EStdKeyUpArrow:
+                case EStdKeyDownArrow:
+                    {
+                    iKeyScanCode = kEvent.iScanCode;
+        
+                    if ( aEvent.Code() == EEventKeyUp )
+                        {
+                        iLongPressTimer->Cancel();
+                        if ( !iLongKeyTriggered )
+                            {
+                            TriggerCommandL();
+                            }
+                        }
+                    else if ( aEvent.Code() == EEventKeyDown )
+                        {
+                        iLongKeyTriggered = EFalse;
+                        // Start the long key press timer
+                        iLongPressTimer->Cancel();
+                        iLongPressTimer->Start( KFMRadioRockerLongPressDelay, 
+                                                0, 
+                                                TCallBack( CFMRadioAlfVisualizer::StaticLongPressCallBack, this ) );
+                        
+                        }
+                    keyHandled = ETrue;
+                    break;
+                    }
+                default:
+                    {
+                    break;
+                    }
+                }
+            }
+        if ( aEvent.IsPointerEvent() )
+            {
+            return CGestureControl::OfferEventL( aEvent );
+            }
+        }
+    
+    return keyHandled;
+    }
+
+// ---------------------------------------------------------------------------
+// Sets the display style in use.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::SetDisplayStyle( TFMRadioDisplayStyle aDisplayStyle )
+    {
+    iDisplayStyle = aDisplayStyle;
+    }
+    		
+// ---------------------------------------------------------------------------
+// Returns the display style.
+// ---------------------------------------------------------------------------
+//
+TFMRadioDisplayStyle CFMRadioAlfVisualizer::DisplayStyle() const
+    {
+    return iDisplayStyle;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::SetAbsoluteCornerAnchors
+// Sets absolute rect of the anchor by top left and bottom right points.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::SetAbsoluteCornerAnchors( CAlfAnchorLayout* aAnchor,
+                                                      TInt aOrdinal,
+                                                      const TPoint& aTopLeftPosition,
+                                                      const TPoint& aBottomRightPosition )
+    {
+    if ( aAnchor )
+        {					
+        // Set top/left anchor.
+        aAnchor->Attach( aOrdinal, 
+                         EAlfAnchorTypeTopLeft,
+                         TAlfXYMetric( TAlfMetric( aTopLeftPosition.iX ), TAlfMetric( aTopLeftPosition.iY ) ),
+                         EAlfAnchorAttachmentOriginTopLeft );
+        
+        
+        // Set bottom/right anchor.
+        aAnchor->Attach( aOrdinal, 
+                         EAlfAnchorTypeBottomRight, 
+                         TAlfXYMetric( TAlfMetric( aBottomRightPosition.iX ), TAlfMetric( aBottomRightPosition.iY ) ),
+                         EAlfAnchorAttachmentOriginTopLeft );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::ScrollRightToLeftWithFadeIn
+// Sets and starts scrolling and fading animations to CAlfVisual.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::ScrollRightToLeftWithFadeIn( CAlfVisual& aVisual ) const
+	{
+	TInt visualWidthInDisplayCoord = aVisual.DisplayRect().Width();
+    
+	TAlfTimedPoint targetPoint;
+    targetPoint.iX.SetValueNow( visualWidthInDisplayCoord );
+    targetPoint.iX.SetTarget( 0, KFMRadioStationInformationScrollDurationTime );
+	aVisual.SetPos( targetPoint );
+	
+	FadeIn( aVisual, KFMRadioStationInformationFadeDurationTime);
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::ScrollLeftToRightWithFadeIn
+// Sets and starts scrolling and fading animations to CAlfVisual.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::ScrollLeftToRightWithFadeIn( CAlfVisual& aVisual ) const
+	{	
+	TInt visualWidthInDisplayCoord = aVisual.DisplayRect().Width();
+	TAlfTimedPoint targetPoint;
+	targetPoint.iX.SetValueNow( - visualWidthInDisplayCoord );
+	targetPoint.iX.SetTarget( 0, KFMRadioStationInformationScrollDurationTime );
+	aVisual.SetPos( targetPoint );
+
+	FadeIn( aVisual, KFMRadioStationInformationFadeDurationTime);
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::ScrollInFromTop
+// Sets and starts scrolling and fading animations to CAlfVisual.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::ScrollInFromTop( CAlfVisual& aVisual ) const
+    {   
+    TRect displayArea = Env().PrimaryDisplay().VisibleArea();
+    TAlfTimedPoint targetPoint;
+    targetPoint.iY.SetValueNow( -displayArea.Height() );
+    targetPoint.iY.SetTarget( 0, KFMRadioStationInformationScrollDurationTime );
+    aVisual.SetPos( targetPoint );
+
+    FadeIn( aVisual, KFMRadioStationInformationFadeDurationTime);
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::ScrollInFromBottom
+// Sets and starts scrolling and fading animations to CAlfVisual.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::ScrollInFromBottom( CAlfVisual& aVisual ) const
+    {   
+    TRect displayArea = Env().PrimaryDisplay().VisibleArea();
+    TAlfTimedPoint targetPoint;
+    targetPoint.iY.SetValueNow( displayArea.Height() );
+    targetPoint.iY.SetTarget( 0, KFMRadioStationInformationScrollDurationTime );
+    aVisual.SetPos( targetPoint );
+
+    FadeIn( aVisual, KFMRadioStationInformationFadeDurationTime);
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::RevertVisual
+// Reverts the visual to the origin
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::RevertVisual( CAlfVisual& aVisual )
+    {
+    TAlfTimedPoint targetPoint;
+    targetPoint.iX.SetTarget( 0, KFMRadioStationInformationScrollDurationTime );    
+    targetPoint.iY.SetTarget( 0, KFMRadioStationInformationScrollDurationTime );
+    aVisual.SetPos( targetPoint ); 
+    TAlfTimedValue opacity;
+    opacity.SetTarget( 1.0f, KFMRadioStationInformationFadeDurationTime );  
+    aVisual.SetOpacity( opacity );
+    }
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::ScrollToLeft
+// Sets and starts scrolling animation to CAlfVisual.
+// The visual object is scrolled from current position to 
+// left side of the display
+// ----------------------------------------------------------------------------
+//	
+void CFMRadioAlfVisualizer::ScrollToLeft( CAlfVisual& aVisual, TInt aTime ) const
+    {
+    TInt visualWidth = aVisual.DisplayRect().Width();
+    TAlfTimedPoint timedPosition = aVisual.Pos();
+    TAlfRealPoint positionLeft( - ( visualWidth ), timedPosition.iY.ValueNow() );
+    aVisual.SetPos( positionLeft, aTime );
+    }
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::ScrollToRight
+// Sets and starts scrolling animation to CAlfVisual.
+// The visual object is scrolled from current position to 
+// right side of the display
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::ScrollToRight( CAlfVisual& aVisual, TInt aTime ) const
+    {
+    TRect displayArea = Env().PrimaryDisplay().VisibleArea();
+    TAlfTimedPoint timedPosition = aVisual.Pos();
+    TAlfRealPoint positionRight( displayArea.Width(), timedPosition.iY.ValueNow() );
+    
+    aVisual.SetPos( positionRight, aTime );
+    }
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::ScrollUp
+// Sets and starts scrolling animation to CAlfVisual.
+// The visual object is scrolled up
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::ScrollUp( CAlfVisual& aVisual, TInt aTime ) const
+    {
+    TInt visualHeight = aVisual.DisplayRect().Height();
+    TAlfTimedPoint timedPosition = aVisual.Pos();
+    TAlfRealPoint positionUp( timedPosition.iX.ValueNow(), -visualHeight );
+    aVisual.SetPos( positionUp, aTime );
+    }
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::ScrollDown
+// Sets and starts scrolling animation to CAlfVisual.
+// The visual object is scrolled down
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::ScrollDown( CAlfVisual& aVisual, TInt aTime ) const
+    {
+    TRect displayArea = Env().PrimaryDisplay().VisibleArea();
+    TAlfTimedPoint timedPosition = aVisual.Pos();
+    TAlfRealPoint positionDown( timedPosition.iX.ValueNow(), displayArea.Height() );
+    aVisual.SetPos( positionDown, aTime );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::FadeIn
+// Sets fading in animation to CAlfVisual.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::FadeIn( CAlfVisual& aVisual, TInt aTime, TReal aOpacity ) const
+	{
+	TAlfTimedValue opacity;
+	opacity.SetValueNow( 0.0f ); // immediate change
+	opacity.SetTarget( aOpacity, aTime ); // and smooth target
+	aVisual.SetOpacity( opacity );
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::FadeOut
+// Sets fading out animation to CAlfVisual.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::FadeOut( CAlfVisual& aVisual, TInt aTime, TReal aOpacity ) const
+	{	
+	TAlfTimedValue opacity;
+	opacity.SetTarget( aOpacity, aTime ); 
+	aVisual.SetOpacity( opacity );
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::ChangeStationL
+// Changes station to next with scrolling and fading station's 
+// information (name, frequency, etc.).
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::ChangeStationL( TFMRadioStationChangeType aChangeType, 
+                                            const TDesC& aFirstLine, 
+                                            const TDesC* aSecondLine ) 
+	{	
+    const TDesC& secondLine = aSecondLine ? *aSecondLine : KNullDesC;
+    TBool firstLineFade = iFirstLineVisualText->Text() != aFirstLine;
+    TBool secondLineFade = iSecondLineVisualText->Text() != secondLine;
+	
+    if ( aChangeType != EFMRadioStationChangeNone || firstLineFade || secondLineFade )
+        {
+    	Env().CancelCommands( iFirstLineVisualText );
+    	Env().CancelCommands( iSecondLineVisualText );
+
+        if ( secondLine.Length() )
+            {
+            SetDisplayStyle( EFMRadioDisplayDoubleLine );
+            }
+        else
+            {
+            SetDisplayStyle( EFMRadioDisplaySingleLine );
+            }
+    
+        FadeOut( *iTuningVisualText, 0 );
+        LoadTextVisualIdentity( iFirstLineVisualText );
+        LoadTextVisualIdentity( iSecondLineVisualText );
+        iFirstLineVisualText->SetTextL( aFirstLine );
+        iSecondLineVisualText->SetTextL( secondLine );
+        UpdateLayout();
+
+    	// Set the horizontal animation	
+    	switch ( aChangeType )
+    	    {
+    	    case EFMRadioStationChangePrevious:
+    			{
+    			// Direction of the animation is left to right
+                ShowVisual( EFirstLineTextVisual, 0 );
+                ShowVisual( ESecondLineTextVisual, 0 );
+    			ScrollLeftToRightWithFadeIn( *iStationInformationAnchorLayout );
+    			}
+    			break;
+    	    case EFMRadioStationChangeNext:
+    			{
+    			// Direction of the animation is right to left
+                ShowVisual( EFirstLineTextVisual, 0 );
+                ShowVisual( ESecondLineTextVisual, 0 ); 
+    			ScrollRightToLeftWithFadeIn( *iStationInformationAnchorLayout );
+    			}
+    			break;
+            case EFMRadioStationChangeScanUp:
+                {
+                ShowVisual( EFirstLineTextVisual, 0 );
+                ShowVisual( ESecondLineTextVisual, 0 ); 
+                ScrollInFromBottom( *iStationInformationAnchorLayout );
+                }
+                break;
+            case EFMRadioStationChangeScanDown:
+                {
+                ShowVisual( EFirstLineTextVisual, 0 );
+                ShowVisual( ESecondLineTextVisual, 0 ); 
+                ScrollInFromTop( *iStationInformationAnchorLayout );
+                }
+                break;
+    	    case EFMRadioStationChangeNone:
+    	    	{	
+    			ShowVisual( EFirstLineTextVisual, firstLineFade );
+    			ShowVisual( ESecondLineTextVisual, secondLineFade );
+    	    	}
+    	    	break;
+    	    default:
+    		    break;	   
+    	    } 
+        }
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::SetStaticInfoTextL
+// Resets the station information and sets static text to the third line.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::SetStaticInfoTextL( TFMRadioStationChangeType aChangeType, const TDesC& aInfoText )
+	{	 
+	ScrollOutCurrentStationInformationL( aChangeType );
+	SetVisualTextL( ETuningTextVisual, aInfoText );
+	UpdateLayout();
+	ShowVisual( ETuningTextVisual, ETrue );
+	// Make the new station info visible
+    FadeIn( *iStationInformationAnchorLayout, 0 );
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::Translate
+// Translates the visual object with passed arguments
+// ----------------------------------------------------------------------------
+//	
+void CFMRadioAlfVisualizer::Translate( CAlfTextVisual* aTextVisual, const TAlfTimedValue& aX, const TAlfTimedValue& aY )
+	{
+	if( aTextVisual )
+		{
+		TRAPD( err, aTextVisual->EnableTransformationL( ETrue ) );
+		if( err == KErrNone )
+			{
+			CAlfTransformation* visualTransformation = &( aTextVisual->Transformation() );
+			TAlfTimedValue x(aX);
+			x.SetStyle( EAlfTimedValueStyleLinear );
+			
+			TAlfTimedValue y(aY);
+			y.SetStyle( EAlfTimedValueStyleLinear );
+			
+			visualTransformation->Translate( x, y );	
+			}
+		}
+	}
+
+// ---------------------------------------------------------------------------
+// Triggers the command to view handling
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::TriggerCommandL( TInt aCommand )
+    {
+    TVwsViewId viewId( KNullUid, KNullUid );
+    TInt err = iAppUi->GetActiveViewId( viewId );
+    RProcess process;
+    TSecureId id = process.SecureId();
+
+    if ( !err && viewId.iAppUid.iUid == id.iId )
+        {
+        CAknView* view = iAppUi->View( viewId.iViewUid );
+        if ( view )
+            {
+            // command to be generated
+            TInt commandId = 0;
+            
+            switch ( iKeyScanCode )
+                {
+                case EStdKeyLeftArrow:
+                    {
+                    if ( iLongKeyTriggered )
+                        {
+                        commandId = EFMRadioRockerButtonKeyLeftLong;
+                        break;
+                        }
+                    else
+                        {
+                        commandId = EFMRadioRockerButtonKeyLeft;                		
+                        }
+                    break;
+                    }
+                case EStdKeyRightArrow:
+                    {
+                    if ( iLongKeyTriggered )
+                        {
+                        commandId = EFMRadioRockerButtonKeyRightLong;
+                        }
+                    else
+                        {
+                        commandId = EFMRadioRockerButtonKeyRight;
+                        }
+                    break;
+                    }
+                case EStdKeyUpArrow:
+                    {
+                    commandId = EFMRadioRockerButtonKeyUp;
+                    break;
+                    }
+                case EStdKeyDownArrow:
+                    {
+                    commandId = EFMRadioRockerButtonKeyDown;
+                    break;
+                    }
+                }
+            if ( aCommand == EFMRadioCmdChannelList )
+                {
+                commandId = EFMRadioCmdChannelList;
+                }
+            // send command to view
+            view->ProcessCommandL( commandId );
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Callback that is invoked when a long key press has occurred.
+// ---------------------------------------------------------------------------
+//
+TInt CFMRadioAlfVisualizer::StaticLongPressCallBack( TAny* aSelf )
+    {
+    CFMRadioAlfVisualizer* self = static_cast<CFMRadioAlfVisualizer*>( aSelf );
+    if ( self )
+        {
+        self->iLongPressTimer->Cancel();
+        self->iLongKeyTriggered = ETrue;
+        
+        TRAP_IGNORE( self->TriggerCommandL() )
+        }
+    return KErrNone;
+    }
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::LoadTextVisualIdentity
+// Removes all transformations of the visual object such as the scaling and translating.
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::LoadTextVisualIdentity( CAlfTextVisual* aTextVisual )
+	{
+	if( aTextVisual )
+		{
+		TRAPD( err, aTextVisual->EnableTransformationL( ETrue ) );
+		if( err == KErrNone )
+			{
+			CAlfTransformation* visualTransformation = &( aTextVisual->Transformation() );
+			visualTransformation->LoadIdentity();	
+			}			
+		}
+	}
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::StartTuningAnimation
+// Starts tuning animation after delay
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::StartTuningAnimation()
+    {
+    iBmpAnimation->StartBmpAnimation(); 
+    }
+
+// ----------------------------------------------------------------------------
+// CFMRadioAlfVisualizer::StopTuningAnimation
+// Stops tuning animation by fading it away
+// ----------------------------------------------------------------------------
+//
+void CFMRadioAlfVisualizer::StopTuningAnimation()
+    {
+    iBmpAnimation->StopBmpAnimation(); 
+    }
+
+//  End of File  
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradioapp.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,65 @@
+/*
+* 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:  Main application class implementation.
+*
+*/
+
+
+// INCLUDE FILES
+#include <fmradiouids.h>
+
+#include "fmradioapp.h"
+#include "fmradiodocument.h"
+#include "debug.h"
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CFMRadioApp::AppDllUid()
+// Returns application UID
+// ---------------------------------------------------------
+//
+TUid CFMRadioApp::AppDllUid() const
+    {
+    return TUid::Uid( KUidFMRadioApplication );
+    }
+
+   
+// ---------------------------------------------------------
+// CFMRadioApp::CreateDocumentL()
+// Creates CFMRadioDocument object
+// ---------------------------------------------------------
+//
+CApaDocument* CFMRadioApp::CreateDocumentL()
+    {
+    return CFMRadioDocument::NewL( *this );
+    }
+
+// ================= OTHER EXPORTED FUNCTIONS ==============
+
+
+#include <eikstart.h>
+
+LOCAL_C CApaApplication* NewApplication()
+    {
+    return new CFMRadioApp;
+    }
+
+GLDEF_C TInt E32Main()
+    {
+    return EikStart::RunApplication(NewApplication);
+    }
+
+
+// End of File  
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradioappui.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,2856 @@
+/*
+* 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:  FM Radio App UI implementation
+*
+*/
+
+// INCLUDE FILES
+
+#include <featmgr.h>
+#if defined  __SERIES60_HELP || defined FF_S60_HELPS_IN_USE
+#include <hlplch.h>
+#include "radio.hlp.hrh"
+#endif
+#include <akntoolbar.h>
+#include <StringLoader.h>
+#include <eikmenup.h>
+#include <avkon.hrh>
+#include <aknlistquerydialog.h> 
+#include <AknQueryDialog.h>
+#include <AknGlobalNote.h>
+#include <fmradio.rsg>
+#include <fmradiocommandlineparams.h>
+#include <alf/alfenv.h>
+#include <AknVolumePopup.h>
+#include <fmradiointernalpskeys.h>
+#include <fmradiouids.h> 
+#include <iaupdate.h>
+#include <iaupdateparameters.h>
+#include <iaupdateresult.h>
+#include <e32property.h>
+#include <apgwgnam.h>
+#include <centralrepository.h>
+#include <settingsinternalcrkeys.h>
+#include <activeidle2domainpskeys.h>
+#include <akntoolbarextension.h>
+
+#include "fmradiobacksteppingservicewrapper.h"
+#include "fmradiodocument.h"
+#include "fmradioengine.h"
+#include "fmradiovariant.hrh"
+#include "fmradiomainview.h"
+#include "fmradiochannellistview.h"
+#include "fmradiocontroleventobserverimpl.h"
+#include "fmradioscanlocalstationsview.h"
+#include "fmradio.hrh"
+#include "fmradioengine.hrh"
+#include "fmradioappui.h"
+#include "fmradiordsreceiver.h"
+#include "fmradioapp.h"
+#include "fmradiopubsub.h"
+#include "debug.h"
+
+// Application Uid for Active Idle app
+#ifdef __ACTIVE_IDLE
+const TUid KFMRadioUidIdleApp = { 0x101FD64C };
+#else
+const TUid KFMRadioUidIdleApp = KPSUidActiveIdle2; // use this one instead because the "aisystemuids.hrh" is not export
+#endif
+// CONSTANTS 
+
+// ---------------------------------------------------------------------------------
+// CFMInformationNote::CFMInformationNote
+// ---------------------------------------------------------------------------------
+CFMInformationNote::CFMInformationNote( MInformationNoteInterface& aObserver ) :
+    CAknInformationNote ( EFalse ),
+    iDialogObserver( aObserver )
+    {
+    
+    }
+// ---------------------------------------------------------------------------------
+// CFMInformationNote::~CFMInformationNote
+// ---------------------------------------------------------------------------------
+//
+CFMInformationNote::~CFMInformationNote()
+    {
+    iDialogObserver.DialogTerminated();
+    }
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------------------------------
+// C++ default constructor can NOT contain any code, that
+// might leave.
+// ---------------------------------------------------------------------------------
+//
+CFMRadioAppUi::CFMRadioAppUi() :
+    iStartUp( ETrue ),
+    iStartupWizardHandled( EFalse ),
+    iStartupWizardRunning( EFalse ),
+    iTuneFromWizardActivated( EFalse ),
+    iInfoNoteOn( EFalse ),
+    iPendingViewId( KNullUid ),
+    iRegionChanged( EFalse )
+    {
+    }
+
+// ---------------------------------------------------------------------------------
+// CFMRadioAppUi::ConstructL
+// 2nd phase constructor. Instanciates all member objects
+// ---------------------------------------------------------------------------------
+//
+void CFMRadioAppUi::ConstructL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::ConstructL()") ) );
+    
+    BaseConstructL( EAknEnableSkin | EAknEnableMSK | EAknSingleClickCompatible );
+    
+    FeatureManager::InitializeLibL();
+    iFeatureManagerInitialized = ETrue;
+
+    // initialise local variation key with all features disabled.
+    iFMRadioVariationFlags = 0;
+    iAudioResourceAvailable = ETrue;
+    iAlreadyClean = EFalse;
+
+    iRadioEngine = CRadioEngine::NewL( *this ); // Construct a radio engine object
+    
+    // Fill channels array from engine
+    GetChannelsArrayL();
+    
+    if ( iRadioEngine->IsInCall() ) 
+        {
+        iCurrentRadioState = EFMRadioStateOffForPhoneCall;
+        }
+    
+    iBsWrapper = CFMRadioBackSteppingServiceWrapper::NewL( TUid::Uid( KUidFMRadioApplication ) );
+    AddViewActivationObserverL( iBsWrapper );    
+
+    iMainView = CFMRadioMainView::NewL( iRadioEngine, *iAlfEnv, *this  );
+    AddViewL( iMainView );      // transfer ownership to CAknViewAppUi
+    iChannelListView = CFMRadioChannelListView::NewL( iRadioEngine, *this );
+    AddViewL( iChannelListView );     // transfer ownership to CAknViewAppUi
+    iScanLocalStationsView = CFMRadioScanLocalStationsView::NewL( *iRadioEngine, *this );
+    AddViewL( iScanLocalStationsView ); // transfer ownership to CAknViewAppUi
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::SecondaryConstructL()
+// All leaving function calls are made here, so that nothing is left on the stack if the ConstructL leaves
+// The reason for this behaviour is that the UI framework doesn't handle leaves from the AppUi correctly.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::SecondaryConstructL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::SecondaryConstructL()") ) );
+    
+    iLayoutChangeObserver = iMainView;
+
+    iRadioEngine->PubSubL().PublishPresetCountL( iChannels.Count() );
+    
+    // Create vertical volume popup for speaker and headset
+    iIhfVolumePopupControl = CAknVolumePopup::NewL( NULL, ETrue );
+    iIhfVolumePopupControl->SetRange( KFMRadioMinVolumeLevel, KFMRadioMaxVolumeLevel );
+    iIhfVolumePopupControl->SetStepSize( KFMRadioVolumeStepSize );
+    // Set observer for control events
+    iIhfVolumePopupControl->SetObserver( this );
+    
+    iHeadsetVolumePopupControl = CAknVolumePopup::NewL( NULL, ETrue );
+    iHeadsetVolumePopupControl->SetRange( KFMRadioMinVolumeLevel, KFMRadioMaxVolumeLevel );
+    iHeadsetVolumePopupControl->SetStepSize( KFMRadioVolumeStepSize );
+    iHeadsetVolumePopupControl->SetObserver( this );
+    
+    iActiveVolumePopupControl = iHeadsetVolumePopupControl; //initialize it to Headset
+
+    // Create and set our observer for control events.
+    iControlEventObserver = CFMRadioControlEventObserverImpl::NewL( *this );
+    iRadioEngine->PubSubL().SetControlEventObserver( iControlEventObserver );
+
+    // For monitoring side volume key events
+    iSvkEvents = CFMRadioSvkEvents::NewL(*this);
+
+    iRadioEngine->PubSubL().PublishApplicationRunningStateL( EFMRadioPSApplicationRunning );
+
+    UpdateLandscapeInformation();	
+
+    // Create alfred environment
+    iAlfEnv = CAlfEnv::NewL();
+
+    // Create alfred display
+    TRect rect;
+    AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EMainPane, rect);	
+    if( !IsLandscapeOrientation() )
+        {
+        TRect toolBarRect = iMainView->Toolbar()->Rect();
+        rect.SetHeight( rect.Height() - toolBarRect.Height() );	
+        }
+    iAlfEnv->NewDisplayL( rect, CAlfEnv::ENewDisplayAsCoeControl );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleTunerReadyCallback
+// Tuner is initialized and ready.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleTunerReadyCallback()
+    {
+    iRadioEngine->InitializeRadio();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::~CFMRadioAppUi
+// Destructor
+// Frees reserved resources
+// ---------------------------------------------------------------------------
+//
+CFMRadioAppUi::~CFMRadioAppUi()
+    {
+    if ( iRadioEngine )
+        {
+        TRAP_IGNORE(
+            iRadioEngine->PubSubL().PublishApplicationRunningStateL( EFMRadioPSApplicationClosing ) )
+        }
+
+    FTRACE( FPrint( _L("CFMRadioAppUi::~CFMRadioAppUi()") ) );
+    if ( iAlreadyClean == EFalse )
+        {
+        Cleanup();
+        }
+
+    if ( iFeatureManagerInitialized )
+        {
+        FeatureManager::UnInitializeLib();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::Cleanup()
+// Perform object cleanup. This would normally be performed in the destructor,
+// but since it can also be called from SecondaryConstructL it was moved into
+// a seperate function.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::Cleanup()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::Cleanup()") ) );
+
+    delete iIhfVolumePopupControl;
+    iIhfVolumePopupControl = NULL;
+    delete iHeadsetVolumePopupControl;
+    iHeadsetVolumePopupControl = NULL;
+
+    if (iRadioEngine)
+        {
+        delete iRadioEngine;
+        iRadioEngine = NULL;
+        }
+    if (iSvkEvents)
+        {
+        delete iSvkEvents;
+        }
+    if (iGlobalOfflineQuery)
+        {
+        delete iGlobalOfflineQuery;
+        }
+    if (iLocalActivateOfflineQuery)
+        {
+        delete iLocalActivateOfflineQuery;
+        }
+    if (iLocalContinueOfflineQuery)
+        {
+        delete iLocalContinueOfflineQuery;
+        }
+    delete iControlEventObserver;
+    delete iAlfEnv;
+    
+    iAlreadyClean = ETrue;
+    
+    if ( iConnectHeadsetGlobalNote )
+        {
+        delete iConnectHeadsetGlobalNote;
+        iConnectHeadsetGlobalNote = NULL;
+        }
+    if ( iConnectHeadsetQuery )
+        {
+        delete iConnectHeadsetQuery;
+        iConnectHeadsetQuery = NULL;
+        }
+
+     iChannels.ResetAndDestroy();
+     iChannels.Close();
+        
+    if ( iUpdate )
+        {
+        delete iUpdate;
+        iUpdate = NULL;
+        }
+    if ( iParameters )
+        {
+        delete iParameters;
+        iParameters = NULL;
+        }
+    if ( iSettingsRepository )
+        {
+        delete iSettingsRepository;
+        iSettingsRepository = NULL;
+        }
+    if ( iBsWrapper )
+        {
+        RemoveViewActivationObserver( iBsWrapper );
+        }
+    delete iBsWrapper;
+    iBsWrapper = NULL;
+    
+    delete iStartupForegroundCallback;
+    iStartupForegroundCallback = NULL;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleCommandL
+// Interprets view's menu-,softkey and other commands and acts
+// accordingly by calling the appropriate command handler
+// function for further action.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleCommandL( TInt aCommand )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleCommandL state=%d command=%d "), iCurrentRadioState, aCommand) );
+    if ( iCurrentRadioState == EFMRadioStateOn )
+        {
+        switch ( aCommand )
+            {
+            case EFMRadioCmdChannelList:
+                ActivateLocalViewL( iChannelListView->Id() );
+                break;
+            case EFMRadioCmdSeekUp:
+                ScanUpL();
+                break;
+            case EFMRadioCmdSeekDown:
+                ScanDownL();
+                break;
+            case EFMRadioCmdSaveChannel:
+                SaveChannelToLastIntoListL();
+                break;
+            case EFMRadioCmdScanLocalStations:
+                ActivateLocalViewL( iScanLocalStationsView->Id() );
+                break;
+            case EFMRadioCmdScanLocalStationsScan:
+                // continue scanning
+                StartLocalStationsSeekL();
+                break;
+            case EFMRadioCmdListenCh:
+                if ( iChannels.Count() > 0 )
+                    {
+                    PlayChannel( iChannelListView->CurrentlySelectedChannel() );
+                    }
+                break;
+            case EFMRadioCmdRename:
+                RenameCurrentChannelL();
+                break;
+            case EFMRadioCmdActivateIhf:
+                SetAudioOutput( CRadioEngine::EFMRadioOutputIHF );
+                break;
+            case EFMRadioCmdDeactivateIhf:
+                SetAudioOutput( CRadioEngine::EFMRadioOutputHeadset );
+                break;
+            case EFMRadioCmdEnableRdsAfSearch:
+                iRadioEngine->SetRdsAfSearchEnable( ETrue );
+                break;
+            case EFMRadioCmdDisableRdsAfSearch:
+                iRadioEngine->SetRdsAfSearchEnable( EFalse );
+                break;
+            case EFMRadioCmdUpdateVolume:
+                UpdateVolume( EDirectionNone );
+                break;
+            case EFMRadioCmdNextChannel:
+                {
+                TInt channelCount = iChannels.Count();
+                if ( channelCount >= 1 )
+                    {
+                    iMainView->SetStationChangeType( EFMRadioStationChangeNext );
+                    PlayChannel( iChannelListView->NextChannel() );
+                    }
+                else
+                    {
+                    if ( AknLayoutUtils::PenEnabled() )
+                        {
+                        DisplayInformationNoteL( R_QTN_FMRADIO_USE_LONG_TAP );
+                        }
+                    }
+                break;
+                }
+            case EFMRadioCmdPrevChannel:
+                {
+                TInt channelCount = iChannels.Count();
+                if ( channelCount >= 1 )
+                    {
+                    iMainView->SetStationChangeType( EFMRadioStationChangePrevious );
+                    PlayChannel( iChannelListView->PreviousChannel() );
+                    }
+                else
+                    {
+                    if ( AknLayoutUtils::PenEnabled() )
+                        {
+                        DisplayInformationNoteL( R_QTN_FMRADIO_USE_LONG_TAP );
+                        }
+                    }
+                break;
+            	}
+            case EFMRadioCmdMuteOn:
+            	iRadioEngine->SetMuteOn( ETrue );
+            	break;
+            case EFMRadioCmdMuteOff:
+            	iRadioEngine->SetMuteOn( EFalse );
+            	break;
+            case EFMRadioCmdMute:
+            	HandleMuteCommand();
+            	break;	
+            case EAknCmdHelp:
+            case EFMRadioCmdHelp:
+                {
+#if defined __SERIES60_HELP || defined FF_S60_HELPS_IN_USE
+                if ( ActiveView() == KFMRadioMainViewId )
+                    {
+                    HlpLauncher::LaunchHelpApplicationL( iCoeEnv->WsSession(), GetCurrentHelpContextL() );
+                    }
+                else
+                    {
+                    CArrayFix<TCoeHelpContext>* buf = CCoeAppUi::AppHelpContextL();
+                    HlpLauncher::LaunchHelpApplicationL( iCoeEnv->WsSession(), buf );
+                    }
+#endif
+                }
+                break;
+            default:
+                break;
+            }
+        }
+    else if ( iCurrentRadioState == EFMRadioStateBusySeek ||
+             iCurrentRadioState == EFMRadioStateBusyScanLocalStations )
+        {
+        switch ( aCommand )
+            {
+            case EFMRadioCmdStopTuning:
+            case EAknSoftkeyCancel:
+                CancelSeek();
+                break;
+            default:
+                break;
+            }
+        }
+    switch ( aCommand )
+        {
+        case EFMRadioCmdScanLocalStationsViewActive:
+            iLayoutChangeObserver = iScanLocalStationsView;
+            break;
+        case EFMRadioCmdChannelListViewActive:
+            iLayoutChangeObserver = iChannelListView;
+            break;
+        case EFMRadioCmdMainViewActive:
+            iLayoutChangeObserver = iMainView;
+            break;
+        case EAknSoftkeyExit:
+        case EEikCmdExit:
+        case EAknCmdExit:
+            Exit();
+            break;
+        default:
+            break;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::ActiveView
+// ---------------------------------------------------------------------------
+//
+TUid CFMRadioAppUi::ActiveView() const
+    {
+    return iView ? iView->Id() : KNullUid;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::RadioEngine
+// ---------------------------------------------------------------------------
+//
+CRadioEngine* CFMRadioAppUi::RadioEngine()
+    {
+    return iRadioEngine;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::Document
+// ---------------------------------------------------------------------------
+//
+CFMRadioDocument* CFMRadioAppUi::Document() const
+    {
+    return static_cast<CFMRadioDocument*>( CEikAppUi::Document() );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::BackSteppingWrapper
+// ---------------------------------------------------------------------------
+//
+CFMRadioBackSteppingServiceWrapper& CFMRadioAppUi::BackSteppingWrapper() const
+    {
+    return *iBsWrapper;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::TurnRadioOn
+// Turn the fm radio hardware on
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::TurnRadioOn()
+    {
+    FTRACE(FPrint(_L("CFMRadioAppUi::TurnRadioOn()")));
+    if ( !iRadioEngine->IsRadioOn() )
+        {
+        // Force the mute state only if it wasn't already forced
+        if ( iMuteStatusBeforeRadioInit == EFMUninitialized )
+            {
+            if ( iRadioEngine->IsMuteOn() )
+                {
+                FTRACE(FPrint(_L("CFMRadioAppUi::iMuteStatusBeforeRadioInit = ETrue;()")));
+                iMuteStatusBeforeRadioInit = EFMMuted;	
+                }
+            else
+                {
+                FTRACE(FPrint(_L("CFMRadioAppUi::iMuteStatusBeforeRadioInit = EFalse;()")));
+                iMuteStatusBeforeRadioInit = EFMUnmuted;
+                }
+            }
+        iCurrentRadioState = EFMRadioStateBusyRadioOn;
+        // use mute here so we have no audio until tune event
+        iRadioEngine->SetMuteOn( ETrue );
+        iRadioEngine->RadioOn();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::PlayChannel
+// Tune the radio hardware to the frequency saved at the specified channel
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::PlayChannel( TInt aIndex )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::PlayChannel(%d)"), aIndex ) );
+    if ( aIndex >= KMinNumberOfChannelListItems &&
+         aIndex < KMaxNumberOfChannelListItems )
+        {
+        // Activate the channel by index
+        TRAP_IGNORE( iRadioEngine->TunePresetL( aIndex ) )
+        iMainView->PrepareViewForChannelChange();
+
+        // Update channel list
+        iChannelListView->SetNowPlayingChannel( aIndex );
+        iChannelListView->SetLastListenedChannel( aIndex );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::EraseCurrentChannelL
+// Delete channel from the channel list
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioAppUi::EraseChannelL( TInt aIndex )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::EraseCurrentChannelL()") ) );
+
+    TBool accepted = ConfirmChannelListDeleteL( aIndex );
+    
+    if ( accepted )
+        {        
+        UpdateChannelsL( EDeleteChannel, aIndex, 0 ); 
+        UpdateChannelsL( EStoreAllToRepository, 0, 0 );
+        }
+    return accepted;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::RenameCurrentChannelL
+// Rename the currently selected channel
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::RenameCurrentChannelL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::RenameCurrentChannelL()") ) );
+    
+    TInt channelIndex = KErrNotFound;
+    if ( ActiveView() == KFMRadioChannelListViewId )
+        {
+        channelIndex = iChannelListView->CurrentlySelectedChannel();
+        }
+    else
+        {
+        channelIndex = iRadioEngine->GetPresetIndex();
+        }
+    // Display the text query
+    CRadioEngine::TStationName channelName = iChannels[ channelIndex ]->PresetName();
+   
+    CAknTextQueryDialog* dlg = new (ELeave) CAknTextQueryDialog( channelName, CAknQueryDialog::ENoTone );
+    
+    if ( dlg->ExecuteLD( R_FMRADIO_RENAME_QUERY ) )
+        {
+        FTRACE(FPrint(_L("CFMRadioAppUi::RenameCurrentChannelL()")));
+        
+        iChannels[channelIndex]->SetPresetNameL( channelName );
+        
+        iChannelListView->UpdateChannelListContentL( channelIndex,
+                        iChannels[ channelIndex ]->PresetName(),
+                        iChannels[ channelIndex ]->PresetFrequency() );
+        
+        UpdateChannelsL( EStoreIndexToRepository, channelIndex, 0 );
+        
+        iMainView->SetStationChangeType( EFMRadioStationChangeNone );
+        // A channel can also be renamed from the main view
+        iMainView->DisplayChannelL( channelIndex );
+        // show default logo for a while
+        // so that animation is stopped and it has the right channel name
+        // after restart
+        iMainView->ShowDefaultLogo();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::SaveChannelToLastIntoListL
+// Display listbox menu to allow user to specify a channel
+// to save currently tuned frequency to.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::SaveChannelToLastIntoListL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::SaveChannelToLastIntoListL()") ) );
+    SaveChannelL( iChannels.Count() + 1 );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::SaveChannel
+// Save currently tuned frequency to the currently selected channel
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::SaveChannelL( TInt aIndex )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::SaveChannelL(%d)"), aIndex ) );
+
+    TBool continueWithSave = ETrue;
+    // check if channel list is full
+    if ( aIndex == KMaxNumberOfChannelListItems + 1 )
+        {
+        CAknQueryDialog* query = CAknQueryDialog::NewL();
+        if ( query->ExecuteLD( R_FMRADIO_REPLACE_EXISTING_CHANNELS_QUERY ) )
+            {
+            UpdateChannelsL( ERemoveAllFromRepository, 0, 0  );
+            }
+        else
+            {
+            continueWithSave = EFalse;
+            }
+        }
+
+    if ( continueWithSave )
+        {
+        CFMRadioRdsReceiverBase& receiver = iRadioEngine->RdsReceiver();
+        CFMRadioRdsReceiverBase::TFMRadioProgrammeSeviceType type = 
+                receiver.ProgrammeServiceNameType();
+        const TDesC& channelName = type == CFMRadioRdsReceiverBase::EFMRadioPSNameStatic ?
+                receiver.ProgrammeService() : KNullDesC;
+        
+        CFMRadioPreset* preset = CFMRadioPreset::NewL();
+        CleanupStack::PushL( preset );
+        preset->SetPresetNameL( channelName );
+        preset->SetPresetFrequency( iRadioEngine->GetTunedFrequency() );
+                
+        const TDesC& webUrl = receiver.RtPlusProgramUrl();
+        if ( webUrl.Length() )
+            {
+            preset->SetPresetUrlL( webUrl );
+            }        
+        iChannels.AppendL( preset );
+        CleanupStack::Pop( preset ); 
+        
+        UpdateChannelsL( EStoreAllToRepository, 0, 0 );
+        
+        iMainView->SetStationChangeType( EFMRadioStationChangeNone );
+        PlayChannel( iChannels.Count() - 1 );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::ConfirmChannelListDeleteL
+// Display confirmation dialog for channel deletion
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioAppUi::ConfirmChannelListDeleteL( TInt aIndex )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::ConfirmChannelListActionL( %d )"), aIndex ) );
+    TInt accepted = EFalse; // Operation accepted or discarded
+    TInt stringResourceId = 0; // Resource id of the prompt text
+    TInt queryResourceId = R_FMRADIO_ERASE_CH_CONFIRMATION_QUERY;  // Resource id of the used query dialog
+
+    RBuf channelData;
+    channelData.CleanupClosePushL();
+    
+    if ( iChannels[ aIndex ]->PresetName().Length() )
+        {
+        stringResourceId = R_QTN_FMRADIO_QUERY_DELETE;
+        channelData.CreateL( iChannels[ aIndex ]->PresetName() );
+        }
+    else
+        {
+        stringResourceId = R_QTN_FMRADIO_QUERY_DELETE_MHZ;
+        TInt maxDecimalPlaces = iRadioEngine->DecimalCount();
+        TInt channelfreq = iChannels[ aIndex ]->PresetFrequency();
+        TReal realFrequency = static_cast<TReal>( channelfreq / static_cast<TReal>( KHzConversionFactor ));
+        
+        channelData.CreateL( KFrequencyMaxLength );
+        
+        TRealFormat format( KFrequencyMaxLength, maxDecimalPlaces );
+        channelData.Num( realFrequency, format );
+        AknTextUtils::LanguageSpecificNumberConversion( channelData );
+        }
+    // Excecute a confirmation query with string and query resource id
+    HBufC* prompt = StringLoader::LoadLC( stringResourceId, channelData, iCoeEnv );
+    CAknQueryDialog* queryDlg = CAknQueryDialog::NewL();
+    accepted = queryDlg->ExecuteLD( queryResourceId, *prompt );
+    CleanupStack::PopAndDestroy( prompt );
+    CleanupStack::PopAndDestroy( &channelData );
+    return accepted;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::ScanUpL
+// 
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::ScanUpL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::ScanUpL()") ) );
+    // Frequency is always 0 when asking engine for automatical tuning. Frequency
+    // parameter is then ignored by engine when automatical tuning (seek) is requested.
+    iCurrentRadioState = EFMRadioStateBusySeek;
+
+    if ( iMainView->IsForeground() )
+        {
+        iMainView->SetStationChangeType( EFMRadioStationChangeScanUp );
+        iMainView->SeekL(); // Show seek wait note
+        }
+    iRadioEngine->ScanUp();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::ScanDownL
+// 
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::ScanDownL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::ScanDownL()") ) );
+    // Frequency is always 0 when asking engine for automatical tuning. Frequency
+    // parameter is then ignored by engine when automatical tuning (seek) is requested.
+    iCurrentRadioState = EFMRadioStateBusySeek;
+    
+    if ( iMainView->IsForeground() )
+        {
+        iMainView->SetStationChangeType( EFMRadioStationChangeScanDown );
+        iMainView->SeekL(); // Show seek wait note
+        }
+    iRadioEngine->ScanDown();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::TuneL
+// 
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::TuneL( TInt aFrequency )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::TuneL(%d)"), aFrequency ) );
+    // Frequency is always 0 when asking engine for automatical tuning. Frequency
+    // parameter is then ignored by engine when automatical tuning (seek) is requested.
+    iCurrentRadioState = EFMRadioStateBusySeek;
+    if (iMainView->IsForeground())
+        {
+        iMainView->SeekL(); // Show seek wait note
+        }
+    iRadioEngine->Tune(aFrequency);
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::UpdateVolume
+// Update the radio volume
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::UpdateVolume( CFMRadioAppUi::TFMRadioDirections aDirection )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::UpdateVolume(%d)"), UpdateVolume ) );
+
+    if ( !iRadioEngine->IsInCall() )
+        {
+        TInt volumeControlLevel = iRadioEngine->GetVolume();
+
+        TInt newVol = 0;
+        if ( aDirection == EDirectionDown )
+            {
+            TRAP_IGNORE( ShowVolumePopupL(); )
+            newVol = volumeControlLevel - 1;
+            
+            if ( newVol > KFMRadioMinVolumeLevel )
+                {
+                iRadioEngine->SetVolume( newVol );
+                }
+            else
+                {
+                iRadioEngine->SetMuteOn( ETrue );
+                iRadioEngine->SetVolume( newVol );
+                iActiveVolumePopupControl->SetValue( KFMRadioMinVolumeLevel );
+                }
+            }
+        else if ( aDirection == EDirectionUp )
+            {
+            TRAP_IGNORE( ShowVolumePopupL(); )
+            if ( iRadioEngine->IsMuteOn() )
+                {
+                iRadioEngine->SetMuteOn( EFalse );
+                }
+            newVol = volumeControlLevel + 1;
+            
+            if ( newVol <= KFMRadioMaxVolumeLevel )
+                {
+                iRadioEngine->SetVolume( newVol );
+                }
+            else
+                {
+                iActiveVolumePopupControl->SetValue( KFMRadioMaxVolumeLevel );
+                }
+            }
+        else if ( aDirection == EDirectionNone )
+            {
+            //we just wish to update the UI's volume control
+            HandleVolumeChangedCallback();
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::SetAudioOutput
+// Set the audio output of the radio.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::SetAudioOutput(
+    CRadioEngine::TFMRadioAudioOutput aAudioOutput )
+    {
+    iRadioEngine->SetAudioOutput( aAudioOutput );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::CancelSeek
+// Cancel outstanding seek request.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::CancelSeek()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::CancelSeek()") ) );
+    if ( iCurrentRadioState == EFMRadioStateBusySeek )
+        {
+        iRadioEngine->CancelScan(); // Seek request to engine
+        }
+    HandleStopSeekCallback();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::DisplayErrorNoteL
+// Displays an error note with the text contained in the passed in reference
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::DisplayErrorNoteL( TInt aErrorNote )
+    {
+    // Show headset missing note
+    CAknErrorNote* errorNote = new ( ELeave ) CAknErrorNote( ETrue );
+    HBufC* noteText = StringLoader::LoadLC( aErrorNote, iCoeEnv );
+    errorNote->ExecuteLD( *noteText );
+    CleanupStack::PopAndDestroy( noteText );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::DisplayInformationNoteL
+// Displays an information note
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::DisplayInformationNoteL( TInt aInfoNote )
+    {
+    if ( !iInfoNoteOn && IsForeground() )
+        {
+        CFMInformationNote* infonote = new ( ELeave ) CFMInformationNote( *this );
+        HBufC* noteText = StringLoader::LoadLC( aInfoNote, iCoeEnv );
+        iInfoNoteOn = ETrue;
+        infonote->ExecuteLD( *noteText );
+        CleanupStack::PopAndDestroy( noteText );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::ExitApplication
+// Shutdown the application.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::ExitApplication()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::ExitApplication() - Start") ) );
+    //this method is called twice. First will trigger the RadioOff command
+    if ( iCurrentRadioState == EFMRadioStateOff ||
+         iCurrentRadioState == EFMRadioStateOffForPhoneCall ||
+         iCurrentRadioState == EFMRadioStateOffBeforePhoneCall )
+        {
+        //once we receive a radio off complete event we finish shutting down.
+        FTRACE( FPrint( _L("CFMRadioAppUi::ExitApplication() - calling exit") ) );
+        Exit();
+        }
+    else
+        {
+        if ( iCurrentRadioState != EFMRadioStateExiting )
+            {
+            iCurrentRadioState = EFMRadioStateExiting;
+            FTRACE( FPrint( _L("CFMRadioAppUi::ExitApplication() - turning off, and starting timer") ) );
+            iRadioEngine->RadioOff(); // Shutdown radio
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// From class CCoeAppUi
+// CFMRadioAppUi::HandleForegroundEventL
+// Application has gone to foreground/background.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleForegroundEventL( TBool aForeground )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleForegroundEventL(%d)"), aForeground ) );
+    CAknViewAppUi::HandleForegroundEventL( aForeground );
+    
+    if ( aForeground )
+        {
+        if ( iStartUp )
+            {
+            iStartUp = EFalse;
+            // Rest of startup processing may show a waiting dialog. It cannot be 
+            // done while processing a foreground event. So a call back is used.
+            iStartupForegroundCallback = new( ELeave ) CAsyncCallBack( 
+                TCallBack( StaticStartupForegroundCallback, this ), CActive::EPriorityStandard );
+            iStartupForegroundCallback->CallBack();
+            }
+        else
+            {
+            // Restores all resources that were released with a call to Release().
+            // After this the Hitchcock user interface should be in the same state
+            // in terms of resources as it was prior to the Release() call.
+            iAlfEnv->RestoreL();
+            
+            // Check if offline profile is activated after/when playing e.g. music player.
+            // In that case we didn't show the offline query as global, so we need
+            // to show it now.
+            if ( IsOfflineProfileActivatedWhenRadioAudioDisabled() )
+                {
+                // Do not re-show the offline query if user hasn't yet answered to it.
+                if ( !iShowingLocalOfflineContinueQuery )
+                    {
+                    iRadioEngine->RadioOff();
+                    TInt res(0);
+                    iShowingLocalOfflineContinueQuery = ETrue;
+                                                                                    
+                    iOfflineQueryDialogActivated = ETrue;
+                    
+                    if ( !iLocalContinueOfflineQuery )
+                        {
+                        iLocalContinueOfflineQuery = CAknQueryDialog::NewL();
+                        }
+                                        
+                    res = iLocalContinueOfflineQuery->ExecuteLD( R_FMRADIO_CONTINUE_IN_OFFLINE_QUERY );
+                    
+                    iLocalContinueOfflineQuery = NULL;
+                    iOfflineQueryDialogActivated = EFalse;
+                    iShowingLocalOfflineContinueQuery = EFalse;
+                                                            
+                    if ( res )
+                        {
+                        iOfflineProfileActivatedWhenRadioAudioDisabled = EFalse;
+                        iRadioEngine->RadioOn();
+                        HandlePendingViewActivationL();
+                        }
+                    else
+                        {
+                        Exit();
+                        }
+                    }
+                }
+            TryToResumeAudioL();
+            }  
+        }
+    else 
+        {
+        // Releases as many resources of the Hitchcock as possible. 
+        iAlfEnv->Release();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleRadioEngineCallBack
+// Notification from Radio Engine informing the UI when requests have
+// completed or certain events have occured that needs to be handled.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleRadioEngineCallBack(
+    MRadioEngineStateChangeCallback::TFMRadioNotifyEvent aEventCode,
+    TInt aErrorCode )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleRadioEngineCallBack - event %d error code: %d"), aEventCode, aErrorCode ) );
+    TInt err = KErrNone;
+    if ( aErrorCode == KErrNone )
+        {
+        switch ( aEventCode )
+            {
+            case EFMRadioEventTunerReady:
+                HandleTunerReadyCallback();
+                break;
+            case EFMRadioEventRadioOn:
+                {
+                iCurrentRadioState = EFMRadioStateOn;
+                TRAPD( err, HandleStartupWizardL() );
+                iStartupWizardHandled = ETrue;
+                const TUid activeViewTuid = ActiveView();
+                
+                if ( activeViewTuid == KFMRadioChannelListViewId )
+                    {
+                    CAknToolbar* toolbar = iChannelListView->Toolbar();
+                    if ( toolbar )
+                        {
+                        iChannelListView->UpdateToolbar();
+                        toolbar->DrawDeferred();
+                        }
+                    }
+                if( !IsStartupWizardRunning() || err != KErrNone )
+                    {
+                    //we use method because the behaviour we require is the same.
+                    if ( !iTuneFromWizardActivated && iMuteStatusBeforeRadioInit != EFMUninitialized )
+                        {
+                        TBool mute = EFalse; 
+                        if ( iMuteStatusBeforeRadioInit == EFMMuted )
+                            {
+                            mute = ETrue;
+                            }
+                        iRadioEngine->SetMuteOn( mute );
+                        iMuteStatusBeforeRadioInit = EFMUninitialized;
+                        }
+                    HandleStopSeekCallback(); 
+                    }
+                }
+                break;
+            case EFMRadioEventRadioOff:
+                iCurrentRadioState = EFMRadioStateOff;
+                
+                if ( !iOfflineQueryDialogActivated )
+                    {
+                    ExitApplication();
+                    }
+                
+                break;
+            case EFMRadioEventFMRadioInitialized:
+                TRAP( err, HandleInitializedCallbackL() );
+                break;
+            case EFMRadioEventTune:
+                if ( iTuneFromWizardActivated )
+                    {
+                    iTuneFromWizardActivated = EFalse;
+                    iRadioEngine->SetMuteOn( EFalse );
+                    iMuteStatusBeforeRadioInit = EFMUninitialized;
+                    }
+                if ( IsStartupWizardHandled() )
+                    {
+                    HandleStopSeekCallback();
+                    }
+                break;
+            case EFMRadioEventSetMuteState:
+                HandleSetMuteStateCallback();
+                break;
+            case EFMRadioEventVolumeUpdated:
+                HandleVolumeChangedCallback();
+                break;
+            case EFMRadioEventSetAudioOutput:
+                HandleAudioOutputSetCallback();
+                break;
+            case EFMRadioEventButtonPressed:
+                iMainView->SetStationChangeType( EFMRadioStationChangeNext );
+                PlayChannel( iChannelListView->NextChannel() );
+                break;
+            case EFMRadioEventHeadsetDisconnected:
+                HandleHeadsetDisconnectedCallback();
+                break;
+            case EFMRadioEventHeadsetReconnected:
+                HandleHeadsetReconnectedCallback();
+                break;
+            case EFMRadioEventAudioResourceLost:
+            	iAudioLost = ETrue;
+                TRAP( err, HandleAudioResourceNotAvailableL(aErrorCode) );
+                break;
+            case EFMRadioEventAudioResourcePaused:
+                TRAP( err, HandleAudioResourceNotAvailableL(aErrorCode) );
+                break;                
+            case EFMRadioEventAudioResourceAvailable:
+                TRAP( err, HandleAudioResourceAvailableL() );
+                break;
+            case EFMRadioEventCallStarted:
+                if ( iCurrentRadioState != EFMRadioStateOff && 
+                     iCurrentRadioState != EFMRadioStateOffBeforePhoneCall )
+                    {
+                    iCurrentRadioState = EFMRadioStateOffForPhoneCall;
+                    }
+                else
+                    {
+                    iCurrentRadioState = EFMRadioStateOffBeforePhoneCall;
+                    }
+                FadeViewsAndShowExit( ETrue );
+                break;
+            case EFMRadioEventCallEnded:
+                {
+                if ( iAudioLost )
+                    {
+                    TRAP_IGNORE( TryToResumeAudioL() );
+                    iCurrentRadioState = EFMRadioStateOff;
+                    }
+                else if ( iCurrentRadioState == EFMRadioStateOffForPhoneCall )
+                    {
+                    TurnRadioOn();
+                    }
+                else
+                    {
+                    // Do nothing.
+                    }
+                FadeViewsAndShowExit( EFalse );
+                break;
+                }
+            case EFMRadioEventStandbyMode:
+                ExitApplication();
+                break;
+            case EFMRadioEventFlightModeEnabled:
+                TRAP( err, HandleFlightModeEnabledCallbackL() );
+                break;
+            case EFMRadioEventFlightModeDisabled:
+                HandleFlightModeDisabledCallback();
+                break;
+            case EFMRadioEventFMTransmitterOn:
+                TRAP_IGNORE( HandleFMTransmitterOnCallbackL() );
+                break;
+            case EFMRadioEventFreqRangeChanged:
+                HandleFreqRangeChangedCallback();
+                break;
+            case EFMRadioEventScanLocalStationsCanceled:
+                {
+                HandleStopSeekCallback();
+                SetStartupWizardRunning( EFalse );
+                break;	
+                }
+            default:
+                break;
+            }
+        }
+    else
+        {
+        switch ( aEventCode )
+            {
+            case EFMRadioEventAudioResourceLost:
+            	iAudioLost = ETrue;
+                TRAP( err, HandleAudioResourceNotAvailableL( aErrorCode ) );
+                break;
+            case EFMRadioEventAudioResourcePaused:
+                TRAP( err, HandleAudioResourceNotAvailableL( aErrorCode ) );
+                break;
+            case EFMRadioEventTune:
+                if ( iTuneFromWizardActivated )
+                    {
+                    iTuneFromWizardActivated = EFalse;
+                    iRadioEngine->SetMuteOn( EFalse );
+                    iMuteStatusBeforeRadioInit = EFMUninitialized;
+                    }
+
+                if ( aErrorCode == KFmRadioErrAntennaNotConnected )
+                    {
+                    iScanLocalStationsView->SetScanCanceled(EFMRadioCancelScanByHeadsetDisconnect);
+                    }
+
+                HandleStopSeekCallback();
+                break;
+            case EFMRadioEventCallStarted:
+                {
+                FTRACE( FPrint( _L("CFMRadioAppUi::HandleRadioEngineCallBack() error -> EFMRadioEventCallStarted  ") ) );            		            	
+                if ( iCurrentRadioState != EFMRadioStateOff && 
+                     iCurrentRadioState != EFMRadioStateOffBeforePhoneCall )
+                    {
+                    iCurrentRadioState = EFMRadioStateOffForPhoneCall;
+                    }
+                else
+                    {
+                    iCurrentRadioState = EFMRadioStateOffBeforePhoneCall;
+                    }
+                FadeViewsAndShowExit( ETrue );
+                break;
+                }
+            default:
+                FTRACE( FPrint( _L("CFMRadioAppUi::HandleRadioEngineCallBack() failed to process event.") ) );
+                break;
+            }
+        }
+    FTRACE( FPrint( _L("END CFMRadioAppUi::HandleRadioEngineCallBack()") ) );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleVolumeChangedCallback
+// Processes "volume changed" callback
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleVolumeChangedCallback()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleVolumeChangedCallback()  Start") ) );
+    if ( !iRadioEngine->IsMuteOn() )
+        {
+        TInt newVolume = iRadioEngine->GetVolume();  // current volume
+        FTRACE( FPrint( _L("CFMRadioAppUi::HandleVolumeChangedCallback() - volume now %d "), newVolume ) );
+        iActiveVolumePopupControl->SetValue( newVolume );
+        }
+    else
+        {
+        iActiveVolumePopupControl->SetValue( KFMRadioMinVolumeLevel );	
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleInitializedCallbackL
+// The initialization of the radio is completed, the radio can be turned on if
+// not in call.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleInitializedCallbackL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleInitializedCallbackL()  Start") ) );
+    if( iCurrentRadioState != EFMRadioStateOffForPhoneCall && 
+        iCurrentRadioState != EFMRadioStateOffBeforePhoneCall )
+        {
+        TurnRadioOn();
+        if ( iRadioEngine->GetAudioOutput() == CRadioEngine::EFMRadioOutputIHF )
+            {
+            iActiveVolumePopupControl = iIhfVolumePopupControl;
+            }
+        else
+            {
+            iActiveVolumePopupControl = iHeadsetVolumePopupControl;
+            }
+        HandleVolumeChangedCallback();    
+        }
+    }
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::FadeViewsAndShowExit
+// fade and show exit for all views
+// ---------------------------------------------------------------------------
+//
+
+void CFMRadioAppUi::FadeViewsAndShowExit( TBool aState )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::FadeViewsAndShowExit( Tbool %d )"), aState ) );
+    iMainView->FadeAndShowExit( aState );
+    iChannelListView->FadeAndShowExit( aState );
+    iScanLocalStationsView->FadeAndShowExit( aState );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleAudioResourceAvailableL
+// When audio resource is available, we would resume the radio.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleAudioResourceAvailableL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleAudioResourceAvailableL") ) );
+
+    iAudioResourceAvailable = ETrue;
+
+    if ( !IsOfflineProfileActivatedWhenRadioAudioDisabled() &&
+        !( iGlobalOfflineQuery && iGlobalOfflineQuery->IsActive() ) )
+        {
+        if ( ( ( iFMRadioVariationFlags & KFMRadioInternalAntennaSupported) ||
+            iRadioEngine->IsHeadsetConnected() ) && !iAudioLost && !iRadioEngine->IsInCall() )
+            {
+            TurnRadioOn();   
+            }
+        else if ( iAudioLost &&
+                 iRadioEngine->IsHeadsetConnected() )
+            {
+            TryToResumeAudioL();
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleAudioResourceNotAvailableL
+// Handles the cases when the radio is interrupted due to:
+// 1. Call setup/in progress
+// 2. Higher priority audio
+// ---------------------------------------------------------------------------
+
+void CFMRadioAppUi::HandleAudioResourceNotAvailableL( TInt FDEBUGVAR(aError) )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleAudioResourceNotAvailableL()  error code: %d"),
+    aError ) );
+
+    SetStartupWizardRunning( EFalse );
+    iAudioResourceAvailable = EFalse;
+    
+    if ( iCurrentRadioState != EFMRadioStateOffForPhoneCall &&
+            iCurrentRadioState != EFMRadioStateOffBeforePhoneCall )
+        {
+        iCurrentRadioState = EFMRadioStateOff;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleHeadsetDisconnectedCallback
+// Take actions when the headset is disconnected.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleHeadsetDisconnectedCallback()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleHeadsetDisconnectedCallback" ) ) );
+
+    if ( iFMRadioVariationFlags & KFMRadioInternalAntennaSupported )
+        {
+        SetAudioOutput( CRadioEngine::EFMRadioOutputIHF );
+        }
+    else
+        {
+        // radio is already turned off, and if it was tuning it was canceled
+        iCurrentRadioState = EFMRadioStateOff;
+        TRAP_IGNORE( ShowConnectHeadsetDialogL() );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleHeadsetReconnectedCallback
+// Take actions when the headset is reconnected.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleHeadsetReconnectedCallback()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleHeadsetReconnectedCallback()") ) );
+    if ( iConnectHeadsetQuery )
+        {
+        delete iConnectHeadsetQuery;
+        iConnectHeadsetQuery = NULL;	
+        }
+    
+    //compare bitmask to see if feature supported
+    if ( !(iFMRadioVariationFlags & KFMRadioInternalAntennaSupported) &&
+            iCurrentRadioState != EFMRadioStateOffForPhoneCall && 
+            iCurrentRadioState != EFMRadioStateOffBeforePhoneCall )
+        {        
+        if ( !iRadioEngine->IsRadioOn() && !iRadioEngine->IsInCall() )
+            {
+            FTRACE( FPrint( _L("CFMRadioAppUi::HandleHeadsetReconnectedCallback() - Turn radio on") ) );
+            TurnRadioOn();
+            } 
+        // active offline query controls radio on/off
+        else if ( iAudioLost )
+            {
+            FTRACE( FPrint( _L("CFMRadioAppUi::HandleHeadsetReconnectedCallback() - Try to resume") ) );
+            TRAP_IGNORE( TryToResumeAudioL() );	
+            }
+        else if ( ( iGlobalOfflineQuery && !iGlobalOfflineQuery->IsActive() ) ||
+              !iGlobalOfflineQuery )
+            {
+            FTRACE( FPrint( _L("CFMRadioAppUi::HandleHeadsetReconnectedCallback() - Offline query") ) );
+            iRadioEngine->InitializeRadio();
+            }
+        HandleVolumeChangedCallback();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleManualTuneFailedCallback
+// Processes "manual tune failed" callback
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleManualTuneFailedCallback()
+    {
+    HandleStopSeekCallback();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleVolumeUpdateFailedCallback
+// Processes "volume update failed" callback
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleVolumeUpdateFailedCallback()
+    {
+    HandleVolumeChangedCallback();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleMuteCallback
+// Processes "radio volume muted" callback
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleSetMuteStateCallback()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleSetMuteStateCallback()")) );
+    HandleVolumeChangedCallback();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleStopSeekCallback
+// Processes "seek operation completed" callback
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleStopSeekCallback()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleStopSeekCallback() state %d "), iCurrentRadioState) );
+    
+    if ( iCurrentRadioState == EFMRadioStateBusyManualTune ||
+         iCurrentRadioState == EFMRadioStateBusySeek ||
+         iCurrentRadioState == EFMRadioStateBusyScanLocalStations )
+        {
+        iCurrentRadioState = EFMRadioStateOn; // Update state
+        }
+
+    const TUid activeViewTuid = ActiveView();
+    
+    if ( activeViewTuid == KFMRadioMainViewId )
+        {
+        TRAP_IGNORE( iMainView->StopSeekL() )
+        }
+    else if ( activeViewTuid == KFMRadioChannelListViewId )
+        {
+        TRAP_IGNORE( iChannelListView->StopSeekL() )
+        }
+    else if ( activeViewTuid == KFMRadioScanLocalStationsViewId )
+        {
+        TRAP_IGNORE( iScanLocalStationsView->StopSeekL() )
+        }
+    else
+        {
+        // nop
+        }
+    FTRACE( FPrint( _L("end CFMRadioAppUi::HandleStopSeekCallback") ) );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleAudioOutputSetCallback
+// Processes "set audio output completed" callback
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleAudioOutputSetCallback()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleAudioOutputSetCallback()")) );
+    if ( iRadioEngine->GetAudioOutput() == CRadioEngine::EFMRadioOutputIHF )
+        {
+        iActiveVolumePopupControl = iIhfVolumePopupControl;
+        }
+    else
+        {
+        iActiveVolumePopupControl = iHeadsetVolumePopupControl;
+        }
+    // restore volume for current output
+    TInt volumeLevel = iRadioEngine->GetVolume();
+    iRadioEngine->SetVolume( volumeLevel );
+    
+    if ( iCurrentRadioState != EFMRadioStateBusyScanLocalStations )
+        {
+        iRadioEngine->SetMuteOn( EFalse );
+        }
+    
+    TUid view = ActiveView();
+    
+    if ( view == KFMRadioScanLocalStationsViewId )
+        {
+        iScanLocalStationsView->UpdateToolbar();
+        }
+    else if ( view == KFMRadioChannelListViewId )
+        {
+        iChannelListView->UpdateToolbar();
+        }
+    else if ( view == KFMRadioMainViewId )
+        {
+        CAknView* mainView = View( KFMRadioMainViewId );
+        if ( mainView )
+            {
+            // force update for toolbar extension view
+            mainView->Toolbar()->ToolbarExtension()->SetShown( EFalse );
+            }
+        }
+    else
+        {
+        // NOP
+        }
+
+    // So the views can dynamically change the option menu
+    StopDisplayingMenuBar(); // force update for menu bar
+    // Force UI update
+    HandleVolumeChangedCallback();
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioAppUi::HandleWsEventL
+// --------------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleWsEventL( const TWsEvent& aEvent, CCoeControl* aDestination )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleWsEventL - event %d "), aEvent.Type() ) );
+    switch ( aEvent.Type() )
+        {
+        case KAknUidValueEndKeyCloseEvent:
+            {
+            if ( IsForeground() )
+                {
+                const TUid KPhoneAppUid = {0x100058B3}; // hardcoded value for phone app uid
+                TApaTaskList taskList( iEikonEnv->WsSession() );
+                TApaTask phoneTask = taskList.FindApp( KPhoneAppUid );
+                
+                if ( phoneTask.Exists() )
+                    {
+                    // Bring phone to foreground
+                    phoneTask.BringToForeground();
+                    }
+                else
+                    {
+                    // Phone app should always be there, but this is a backup 
+                    // plan, just set radio to background
+                    TApaTask task( iEikonEnv->WsSession() );
+                    task.SetWgId( iEikonEnv->RootWin().Identifier() );
+                    task.SendToBackground();
+                    }
+                }
+            break;
+            }
+        case EEventFocusLost:
+            {
+            // being sent to background, cancel any seek expect local stations scan
+            if ( iCurrentRadioState == EFMRadioStateBusySeek )
+                {
+                iRadioEngine->CancelScan();
+                HandleStopSeekCallback();
+                }
+            CAknViewAppUi::HandleWsEventL( aEvent, aDestination );
+            break;
+            }
+        case EEventFocusGained:
+            // override default behavior of unfading the ui
+            // can be taken out when auto resume is implemented
+            CAknViewAppUi::HandleWsEventL(aEvent, aDestination);
+            if (iMainView)
+                {
+                iMainView->UpdateDisplayForFocusGained();
+                }
+            if (iChannelListView)
+                {
+                iChannelListView->UpdateDisplayForFocusGained();
+                }
+            if (iScanLocalStationsView)
+                {
+                iScanLocalStationsView->UpdateDisplayForFocusGained();
+                }
+            break;
+        default:
+            CAknViewAppUi::HandleWsEventL(aEvent, aDestination);
+            break;
+        }
+    }
+
+// ----------------------------------------------------------------------------------------------------
+// CFMRadioAppUi::FMRadioSvkChangeVolumeL
+// Handles the change in the Volume that is needed as per the Side Volume Key
+// events.
+// ----------------------------------------------------------------------------------------------------
+//
+void CFMRadioAppUi::FMRadioSvkChangeVolumeL( TInt aVolumeChange )
+    {  
+    FTRACE( FPrint( _L("CFMRadioAppUi::FMRadioSvkRemoveVolumeL() aVolumeChange : %d"), aVolumeChange ) );
+    
+    TBool headsetConnected = iRadioEngine->IsHeadsetConnected();
+    
+    if ( iCurrentRadioState != EFMRadioStateBusyScanLocalStations && IsStartupWizardHandled() &&
+        headsetConnected )
+        {
+        if ( aVolumeChange > 0 ) // up direction
+            {
+            UpdateVolume( EDirectionUp );
+            }
+        else // down direction
+            {
+            UpdateVolume( EDirectionDown );
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------------------------------
+// CFMRadioAppUi::FMRadioSvkRemoveVolumeL
+// Handles the remove Volume option that is needed depending on the duration of the
+// Side Volume Key press
+// ----------------------------------------------------------------------------------------------------
+//
+void CFMRadioAppUi::FMRadioSvkRemoveVolumeL()
+   {
+   FTRACE( FPrint( _L("CFMRadioAppUi::FMRadioSvkRemoveVolumeL( )") ) );
+   }
+
+// ----------------------------------------------------------------------------------------------------
+// CFMRadioAppUi::FMRadioHeadsetEvent
+// Handles the Headset button pressed
+// ----------------------------------------------------------------------------------------------------
+
+void CFMRadioAppUi::FMRadioHeadsetEvent( TAccessoryEvent aEvent )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::FMRadioHeadsetEvent event: %d "), aEvent ) );
+    switch ( aEvent )
+        {
+        case EForward:
+            {
+            if ( ActiveView() == KFMRadioScanLocalStationsViewId &&
+                    iCurrentRadioState != EFMRadioStateBusyScanLocalStations )
+                {
+                // change channels in scan local stations view
+                TRAP_IGNORE( iScanLocalStationsView->HandleScanListRemConEventL( aEvent ) )
+                }
+            else
+                {
+                TRAP_IGNORE( HandleCommandL( EFMRadioCmdNextChannel ) )
+                }
+            break;
+            }
+        case ERewind:
+            {
+            if ( ActiveView() == KFMRadioScanLocalStationsViewId &&
+                    iCurrentRadioState != EFMRadioStateBusyScanLocalStations )
+                {
+                TRAP_IGNORE( iScanLocalStationsView->HandleScanListRemConEventL( aEvent ) )
+                }
+            else
+                {
+                TRAP_IGNORE( HandleCommandL( EFMRadioCmdPrevChannel ) )
+                }
+            break;
+            }
+        case EStop:
+            {
+            if ( iCurrentRadioState != EFMRadioStateBusyScanLocalStations && IsStartupWizardHandled() )
+                {
+                iRadioEngine->SetMuteOn( ETrue );
+                }
+            break;
+            }
+        case EPausePlay:
+            {
+            if ( iCurrentRadioState != EFMRadioStateBusyScanLocalStations && IsStartupWizardHandled() )
+                {
+                HandleMuteCommand();
+                }
+            break;
+            }
+        default:
+            break;
+        }
+    }
+
+// ----------------------------------------------------------------------------------------------------
+// CFMRadioAppUi::HandleResourceChangeL
+// ----------------------------------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleResourceChangeL( TInt aType )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleResourceChangeL type: %d "), aType ) );
+    CAknViewAppUi::HandleResourceChangeL( aType );
+    
+    if ( aType == KEikDynamicLayoutVariantSwitch )
+        {
+        UpdateLandscapeInformation();
+        iLayoutChangeObserver->LayoutChangedL( aType );
+        }
+    else if ( aType == KAknsMessageSkinChange )
+        {
+        iLayoutChangeObserver->LayoutChangedL( aType );
+        }
+    }
+
+// ----------------------------------------------------------------------------------------------------
+// Handles MCoeControl events
+// ----------------------------------------------------------------------------------------------------
+void CFMRadioAppUi::HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleControlEventL - aEventID = %d"), aEventType) );
+    if ( (aEventType == EEventStateChanged) &&
+         ( aControl == iActiveVolumePopupControl ) )
+        {
+        TInt volumeControlLevel = iActiveVolumePopupControl->Value();
+        
+        if ( iRadioEngine->IsMuteOn() && volumeControlLevel == 1 )
+            {
+            // Volume has been muted and volume is changed from
+            // popup. Restore volume to the previous level.
+            volumeControlLevel = iRadioEngine->GetVolume();
+            volumeControlLevel++;
+            if ( volumeControlLevel > KFMRadioMaxVolumeLevel )
+                {
+                volumeControlLevel = KFMRadioMaxVolumeLevel;
+                }
+            iActiveVolumePopupControl->SetValue( volumeControlLevel );
+            }
+            
+        // Set mute
+        if ( volumeControlLevel == KFMRadioMinVolumeLevel )
+            {
+            // Mute status could change from toolbar, svk or pointer event
+            if ( !iRadioEngine->IsMuteOn() )
+                {
+                iRadioEngine->SetMuteOn( ETrue );
+                }
+            }
+        else
+            {
+            iRadioEngine->SetMuteOn( EFalse );	
+            }
+
+        // Make sure volume level is in range
+        if ( volumeControlLevel < KFMRadioMinVolumeLevel )
+            {
+            volumeControlLevel = KFMRadioMinVolumeLevel;
+            }
+        else if ( volumeControlLevel > KFMRadioMaxVolumeLevel )
+            {
+            volumeControlLevel = KFMRadioMaxVolumeLevel;
+            }
+
+        // Set volume. If volume is muted we dont want to set it to iRadioEngine
+        if ( !iRadioEngine->IsMuteOn() )
+            {
+            iRadioEngine->SetVolume( volumeControlLevel );
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------------------------------
+// DialogTerminated
+// ----------------------------------------------------------------------------------------------------
+void CFMRadioAppUi::DialogTerminated()
+    {
+    iInfoNoteOn = EFalse;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::UpdateLandscapeInformation
+// ---------------------------------------------------------------------------
+//    
+void CFMRadioAppUi::UpdateLandscapeInformation()
+    {
+    TSize screenSize;
+    
+    AknLayoutUtils::LayoutMetricsSize( AknLayoutUtils::EScreen, screenSize );
+        
+    // Is it portrait or landscape, compare height and width, since we can't 
+    // be sure if EGraphicsOrientationNormal is portrait or landscape
+    if ( screenSize.iHeight < screenSize.iWidth )
+        {
+        iLandscape = ETrue;    
+        }
+    else
+        {
+        iLandscape = EFalse;
+        }
+    }
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::UpdateChannelsL
+// ---------------------------------------------------------------------------
+//    
+void CFMRadioAppUi::UpdateChannelsL( TMoveoperations aOperation,
+        TInt aIndex, TInt aMovedToNewIndex )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::UpdateChannelsL(%d, %d, %d)"), aOperation, aIndex, aMovedToNewIndex ) );
+    
+    // Move channel operation moves channel from aIndex to aMovedToNewIndex value
+    if ( EMoveChannels == aOperation )
+        {
+        CFMRadioPreset* channelInfo  = iChannels[ aIndex ];
+        iChannels.Remove( aIndex );
+        CleanupStack::PushL( channelInfo );
+        iChannels.InsertL( channelInfo, aMovedToNewIndex );
+        CleanupStack::Pop( channelInfo);
+        }
+    // Delete channel deletes channel from list 
+    else if ( EDeleteChannel == aOperation )
+        {
+        const CFMRadioPreset* channelinfo  = iChannels[ aIndex ];
+        iChannels.Remove( aIndex );
+        delete channelinfo;
+        
+        for ( TInt index = 0; index < iChannels.Count(); index++ )
+            {
+            iRadioEngine->SetPresetNameFrequencyL( 
+                    index,
+                    iChannels[ index ]->PresetName(),
+                    iChannels[ index ]->PresetFrequency() );
+            
+            iRadioEngine->SaveUrlToPresetL( index, iChannels[ index ]->PresetUrl() );
+            }
+        iRadioEngine->DeletePresetL( iChannels.Count() );
+        }
+
+    // Store all channels to repository
+    else if ( EStoreAllToRepository == aOperation )
+        {
+        for ( TInt index = 0; index < iChannels.Count(); index++ )
+            {
+            iRadioEngine->SetPresetNameFrequencyL( 
+                    index, 
+                    iChannels[ index ]->PresetName(), 
+                    iChannels[ index ]->PresetFrequency() );
+            
+            iRadioEngine->SaveUrlToPresetL( index, iChannels[ index ]->PresetUrl() );
+            }
+        }
+
+    // Store specified index to repository and same index 
+    else if ( EStoreIndexToRepository == aOperation )
+        {
+        iRadioEngine->SetPresetNameFrequencyL( 
+             aIndex, 
+             iChannels[ aIndex ]->PresetName(), 
+             iChannels[ aIndex ]->PresetFrequency() );
+        
+        iRadioEngine->SaveUrlToPresetL( aIndex, iChannels[ aIndex ]->PresetUrl() );
+        }
+    else if ( ERemoveAllFromRepository == aOperation )
+        {
+        iRadioEngine->DeletePresetL( -1 ); // reset all presets
+        iChannels.ResetAndDestroy();
+        }
+    
+    iRadioEngine->PubSubL().PublishPresetCountL( iChannels.Count() );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::AddChannelToListL
+// ---------------------------------------------------------------------------
+// 
+void CFMRadioAppUi::AddChannelToListL( const TDesC& aChannelName, TInt aChannelFreq )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::AddChannelToListL(%S, %d)"), &aChannelName, aChannelFreq ) );
+    CFMRadioPreset* preset = CFMRadioPreset::NewL();
+    CleanupStack::PushL( preset );
+    preset->SetPresetNameL( aChannelName );
+    preset->SetPresetFrequency( aChannelFreq );
+    iChannels.AppendL( preset );
+    CleanupStack::Pop( preset );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::IsLandscapeOrientation
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioAppUi::IsLandscapeOrientation() const
+    {
+    return iLandscape;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::ChooseLayoutResource
+// ---------------------------------------------------------------------------
+//
+TInt CFMRadioAppUi::ChooseLayoutResource( TInt aNormalPortraitRes, 
+        TInt aMirroredPortraitRes, TInt aNormalLandscapeRes, 
+        TInt aMirroredLandscapeRes ) const
+    {
+    TInt resId = 0;
+    
+    if ( IsLandscapeOrientation() )
+        {
+        if ( AknLayoutUtils::LayoutMirrored() )
+            {
+            resId = aMirroredLandscapeRes;
+            }
+        else
+            {
+            resId = aNormalLandscapeRes;
+            }
+        }
+    else
+        {
+        if ( AknLayoutUtils::LayoutMirrored() )
+            {
+            resId = aMirroredPortraitRes;
+            }
+        else
+            {
+            resId = aNormalPortraitRes;
+            }
+        }
+    return resId;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::IsLayoutMirrored
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioAppUi::IsLayoutMirrored() const
+    {
+    return AknLayoutUtils::LayoutMirrored();
+    }
+    
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleFlightModeEnabledCallbackL
+// Displays continue offline query.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleFlightModeEnabledCallbackL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleFlightModeEnabledCallbackL" ) ) );
+
+    // If off-line profile is activated when no other app
+    // (that would disable auto resume) is playing (or has played)
+    // audio, a global confirmation query is displayed.
+    if ( iAudioResourceAvailable )
+        {
+        iRadioEngine->RadioOff();
+        
+        if ( !iGlobalOfflineQuery )
+            {
+            iGlobalOfflineQuery = CFMRadioGlobalConfirmationQuery::NewL( this );                                
+            }
+        
+        HBufC* text = StringLoader::LoadLC( R_QTN_FMRADIO_QUERY_OFFLINE_USE, iCoeEnv );
+        
+        iOfflineQueryDialogActivated = ETrue;
+        iGlobalOfflineQuery->ShowQueryL( *text, R_AVKON_SOFTKEYS_YES_NO, R_QGN_NOTE_QUERY_ANIM ); 
+        
+        CleanupStack::PopAndDestroy( text );
+        }
+            
+    // Do the next when offline query wasn't already on the screen.
+    // That could happen when user changes profiles without
+    // answering to the query.
+    else if (!iGlobalOfflineQuery || !iGlobalOfflineQuery->IsActive())
+        {
+        iOfflineProfileActivatedWhenRadioAudioDisabled = ETrue;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleFlightModeDisabledCallback
+// Close query dialog.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleFlightModeDisabledCallback()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleFlightModeDisabledCallback" ) ) );
+    iOfflineProfileActivatedWhenRadioAudioDisabled = EFalse;
+    
+    // Close continue offline query
+    if ( iLocalContinueOfflineQuery && iLocalContinueOfflineQuery->IsVisible() )
+        {
+        TRAP_IGNORE( iLocalContinueOfflineQuery->DismissQueryL() );
+        }
+    // Close activate offline query
+    if ( iLocalActivateOfflineQuery && iLocalActivateOfflineQuery->IsVisible() )
+        {
+        TRAP_IGNORE( iLocalActivateOfflineQuery->DismissQueryL() );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::StaticStartupForegroundCallback
+// takes care of some delayed initialisation
+// ---------------------------------------------------------------------------
+//
+TInt CFMRadioAppUi::StaticStartupForegroundCallback( TAny* aSelfPtr )
+    {
+    CFMRadioAppUi* self = reinterpret_cast<CFMRadioAppUi*>( aSelfPtr );
+    if ( self )
+        {
+        delete self->iStartupForegroundCallback;
+        self->iStartupForegroundCallback = NULL;
+
+        TRAPD( err, self->HandleStartupForegroundEventL() )
+        if ( err )
+            {
+            // Shutdown the application
+            CEikonEnv* eikonEnv = CEikonEnv::Static();
+            TApaTask task( eikonEnv->WsSession() );
+            task.SetWgId( eikonEnv->RootWin().Identifier() );
+            task.EndTask();
+            }
+        }
+    
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleStartupForegroundEventL
+// Note that leaving from this fuction will cause exit of
+// FM Radio (on purpose)!
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleStartupForegroundEventL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleStartupForegroundEventL" ) ) );
+    HandleOfflineModeAtStartUpL();
+    TFMRadioRegionSetting region = HandleRegionsAtStartUpL();
+    iRadioEngine->SetRegionIdL( region );
+    HandlePendingViewActivationL();
+    iRadioEngine->RequestTunerControl();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleOfflineModeAtStartUpL
+// Handles offline mode at startup.
+// ---------------------------------------------------------------------------
+//	
+void CFMRadioAppUi::HandleOfflineModeAtStartUpL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleOfflineModeAtStartUpL" ) ) );
+    if ( iRadioEngine->IsOfflineProfileL() )
+        {
+        iOfflineQueryDialogActivated = ETrue;
+        
+        if ( AknLayoutUtils::PenEnabled() )
+            {
+            // We must hide toolbar, otherwise query dialog softkeys doesn't work 
+            ShowToolbar( EFalse );
+            }
+        
+        iLocalActivateOfflineQuery = CAknQueryDialog::NewL();
+        TInt result = iLocalActivateOfflineQuery->ExecuteLD( R_FMRADIO_ACTIVATE_IN_OFFLINE_QUERY );
+        iLocalActivateOfflineQuery = NULL;
+        
+        iOfflineQueryDialogActivated = EFalse;
+       
+        if ( result )
+            {
+            if ( AknLayoutUtils::PenEnabled() )
+                {
+                ShowToolbar( ETrue );
+                }
+            }
+        else
+            {
+            Exit();
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::ShowToolbar
+// Sets toolbar visibility. This function is used to hide toolbar component
+// while query dialog is shown.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::ShowToolbar( TBool aVisible )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::ShowToolbar(%d)"), aVisible ) );
+    if ( iLayoutChangeObserver == iMainView )
+        {
+        iMainView->ShowToolbar( aVisible );	
+        }
+    else if ( iLayoutChangeObserver == iScanLocalStationsView )
+        {
+        iScanLocalStationsView->ShowToolbar( aVisible );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::IsOfflineProfileActivatedWhenRadioAudioDisabled
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioAppUi::IsOfflineProfileActivatedWhenRadioAudioDisabled() const
+    {
+    return iOfflineProfileActivatedWhenRadioAudioDisabled;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleFMTransmitterOnCallback
+// Displays note about transmitter being activated and
+// fade the UI.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleFMTransmitterOnCallbackL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleFMTransmitterOnCallbackL()") ) );
+    iCurrentRadioState = EFMRadioStateOff;
+    
+    CAknGlobalNote* fmTransmitterGlobalNote = CAknGlobalNote::NewLC();
+    
+    if ( IsStartupWizardHandled() )
+        {
+        // Wizard is allready handled so this callback is not coming
+        // in startup phase
+        HBufC* closeAppText = StringLoader::LoadLC( R_QTN_FMRADIO_NOTE_FMTX_CLOSE_APPLICATION, iCoeEnv  );
+        fmTransmitterGlobalNote->ShowNoteL( EAknGlobalInformationNote, *closeAppText );
+        CleanupStack::PopAndDestroy( closeAppText );
+        }
+    else
+        {
+        HBufC* unableToStartText = StringLoader::LoadLC( R_QTN_FMRADIO_NOTE_FMTX_UNABLE_TO_START, iCoeEnv );
+        fmTransmitterGlobalNote->ShowNoteL( EAknGlobalInformationNote, *unableToStartText );
+        CleanupStack::PopAndDestroy( unableToStartText );
+        }
+    CleanupStack::PopAndDestroy( fmTransmitterGlobalNote );
+    // check if we have any dialogs open and close them manually
+    if ( IsDisplayingDialog() )
+        {
+        TKeyEvent key;
+        key.iRepeats = 0;
+        key.iCode = EKeyEscape;
+        key.iModifiers = 0;
+        
+        iCoeEnv->SimulateKeyEventL( key, EEventKey );
+        // in case there is still dialog on the screen 
+        if ( IsDisplayingDialog() )
+            {
+            iCoeEnv->SimulateKeyEventL( key, EEventKey );
+            }
+        }
+    // Shutdown the application
+    TApaTask task( iCoeEnv->WsSession() );
+    task.SetWgId( iCoeEnv->RootWin().Identifier() );
+    task.EndTask();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleFreqRangeChangedCallback
+// Frequency range changed.
+// Current handling is to exit the application since
+// the UI specification doesn't specify how this should
+// be handled.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleFreqRangeChangedCallback()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleFreqRangeChangedCallback()") ) );
+    iCurrentRadioState = EFMRadioStateOff;
+    Exit();
+    } 
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleMuteCommand
+// Handles mute keypress from main view
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleMuteCommand()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleMuteCommand" ) ) );
+    if ( iRadioEngine->IsMuteOn() )
+        {
+        iRadioEngine->SetMuteOn( EFalse );
+        }
+    else
+        {
+        iRadioEngine->SetMuteOn( ETrue );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleRegionsAtStartUpL
+// get region automatically from network or manually by user choice if network
+// is not available
+// ---------------------------------------------------------------------------
+//
+TFMRadioRegionSetting CFMRadioAppUi::HandleRegionsAtStartUpL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleRegionsAtStartUpL()")) );
+    TFMRadioRegionSetting region = iRadioEngine->GetRegionL();
+    
+    if ( region == EFMRadioRegionNone )
+        {
+        ShowToolbar( EFalse );
+        TInt index = 0;
+        
+        CDesCArraySeg* regionList = new( ELeave ) CDesCArraySeg( KDefaultRegionArrayGranularity );
+        CleanupStack::PushL( regionList );
+        
+        iRadioEngine->FillListWithRegionDataL( *regionList );
+        
+        CAknListQueryDialog* dlg = new ( ELeave ) CAknListQueryDialog( &index );
+        
+        dlg->PrepareLC( R_FMRADIO_SELECT_REGION_QUERY );
+        CTextListBoxModel* model = 
+        static_cast<CAknListQueryControl*>( dlg->ListControl() )->listbox()->Model();
+        model->SetItemTextArray( regionList );
+        model->SetOwnershipType( ELbmDoesNotOwnItemArray ); // Array won't be deleted here
+            	
+        TInt ret = dlg->RunLD();
+        CleanupStack::PopAndDestroy( regionList );
+        
+        if ( ret != EAknSoftkeyExit )
+            {
+            // We should have a proper region selected by user
+            region = iRadioEngine->RegionIdAtIndex( index );
+            }
+        
+        if ( region == EFMRadioRegionNone )
+            {
+            Exit();// This will eventually exit FMRadio.
+            }
+        else
+            {
+            HBufC* bandSetText = StringLoader::LoadLC( R_QTN_FMRADIO_CONF_FREQ_BAND_SET_MANUAL, iCoeEnv );
+            CAknInformationNote* note = new( ELeave ) CAknInformationNote( ETrue );
+            note->ExecuteLD( *bandSetText );
+            CleanupStack::PopAndDestroy( bandSetText );
+            if ( AknLayoutUtils::PenEnabled() )
+                {
+                ShowToolbar( ETrue );
+                }
+            }
+        }
+    else
+        {
+        // Region is known        
+        if ( region != iRadioEngine->RegionId() )
+            {
+            TInt previousRegion = iRadioEngine->RegionId();
+            
+           if ( previousRegion != EFMRadioRegionNone )
+                {
+                // Show note only if the region has changed from a concrete 
+                // one to another concrete one. EFMRadioRegionNone is not 
+                // a concrete one (first startup case) -- don't show note.
+                iRegionChanged = ETrue;
+                HBufC* bandSetText = StringLoader::LoadLC( R_QTN_FMRADIO_CONF_FREQ_BAND_SET_AUTOM, iCoeEnv );
+                CAknInformationNote* note = new ( ELeave ) CAknInformationNote( ETrue );			    
+                note->ExecuteLD( *bandSetText );
+                CleanupStack::PopAndDestroy( bandSetText );
+                }
+            }
+        }
+    return region;
+    }
+
+// ---------------------------------------------------------------------------
+// From class MFMRadioGlobalConfirmationQueryObserver. Callback function 
+// that is called when global confirmation query is dismissed.
+// CFMRadioAppUi::GlobalConfirmationQueryDismissedL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::GlobalConfirmationQueryDismissedL(TInt aSoftKey)
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::GlobalConfirmationQueryDismissedL()")) );
+    iOfflineQueryDialogActivated = EFalse;
+    
+    if ( aSoftKey == EAknSoftkeyYes )
+        {
+        iOfflineProfileActivatedWhenRadioAudioDisabled = EFalse;
+        iRadioEngine->RadioOn();
+        HandlePendingViewActivationL();
+        }    
+    else
+        {
+        // Shutdown the application
+        TApaTask task( iCoeEnv->WsSession() );
+        task.SetWgId( iCoeEnv->RootWin().Identifier() );
+        task.EndTask();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::NumberOfChannelsStored
+// return number of channels saved to the presets
+// ---------------------------------------------------------------------------
+//    
+TInt CFMRadioAppUi::NumberOfChannelsStored() const
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::NumberOfChannelsStored()")) );
+    return iChannels.Count();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleStartupWizard
+// Determine if "Scan all channels" in scan local stations view should be started.
+// ---------------------------------------------------------------------------
+// 
+void CFMRadioAppUi::HandleStartupWizardL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleStartupWizardL()")) );
+    if ( !IsStartupWizardHandled() || iRegionChanged )
+        {
+        // Call to iRadioEngine->UpdatedStartupCount()
+        // increases startup count by one and returns amount of app startups.
+        TInt startupCount = iRadioEngine->UpdatedStartupCount();
+        if ( startupCount <= KMaxStartupTimesToAskSaveWizard &&
+                NumberOfChannelsStored() == 0 )
+            {
+            SetStartupWizardRunning( ETrue );
+            ActivateLocalViewL( iScanLocalStationsView->Id() );
+            }
+        else if ( iRegionChanged ) //force rescan
+            {
+            iRegionChanged = EFalse;
+            UpdateChannelsL( ERemoveAllFromRepository, 0, 0 );
+            SetStartupWizardRunning( ETrue );
+            ActivateLocalViewL( iScanLocalStationsView->Id() );
+            }
+        else // check IAD update here
+            {
+            HandleIADUpdateCheckL();
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------
+// CFMRadioAppUi::IsStartupWizardRunning
+// Return startup scanning wizard status.
+// ---------------------------------------------------------------------------
+// 	
+TBool CFMRadioAppUi::IsStartupWizardRunning() const
+    {
+    return iStartupWizardRunning;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::SetStartupWizardRunning
+// Set startup scanning wizard status.
+// ---------------------------------------------------------------------------
+// 
+void CFMRadioAppUi::SetStartupWizardRunning( const TBool aRunningState )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::SetStartupWizardRunning() - state = %d"), aRunningState) );
+    iStartupWizardRunning = aRunningState;	
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::StartLocalStationsSeekL
+// Start local stations scan
+// ---------------------------------------------------------------------------
+// 
+void CFMRadioAppUi::StartLocalStationsSeekL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::StartLocalStationsSeekL()")) );
+    iCurrentRadioState = EFMRadioStateBusyScanLocalStations;
+    iRadioEngine->ScanUp();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::TryToResumeAudioL
+// Show Audio Preempted query
+// ---------------------------------------------------------------------------
+// 
+void CFMRadioAppUi::TryToResumeAudioL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::TryToResumeAudioL" ) ) );
+    TFMRadioRegionSetting region = iRadioEngine->GetRegionL();
+    if ( iAudioLost && 
+         IsForeground() &&
+         !iOfflineQueryDialogActivated && 
+         region != EFMRadioRegionNone )
+        {
+        iAudioLost = EFalse;
+        TurnRadioOn();
+        }
+    }
+    
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::ShowConnectHeadsetDialogL
+// Show connect headset query with only exit softkey
+// ---------------------------------------------------------------------------
+// 	
+void CFMRadioAppUi::ShowConnectHeadsetDialogL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::ShowConnectHeadsetDialogL" ) ) );
+    if ( !iConnectHeadsetQuery && !iConnectHeadsetGlobalNote )
+        {
+        HBufC* noteTxt = StringLoader::LoadLC( R_QTN_FMRADIO_ERROR_CON_HEADSET, iCoeEnv  );
+        
+        // if radio is in background, show also global note	
+        if ( !IsForeground() )
+            {
+            iConnectHeadsetGlobalNote = CAknGlobalNote::NewL();
+            iConnectHeadsetGlobalNote->ShowNoteL( EAknGlobalInformationNote, *noteTxt );
+            delete iConnectHeadsetGlobalNote;
+            iConnectHeadsetGlobalNote = NULL;
+            }
+        
+        iConnectHeadsetQuery = CAknQueryDialog::NewL( CAknQueryDialog::EErrorTone );									
+        TInt ret = iConnectHeadsetQuery->ExecuteLD( R_FMRADIO_CONNECT_HEADSET_NOTE, *noteTxt );
+            
+        CleanupStack::PopAndDestroy( noteTxt );
+        FTRACE( FPrint( _L("CFMRadioAppUi::ShowConnectHeadsetDialogL() return value from dialog: %d"), ret ) );
+        if ( iConnectHeadsetQuery )
+            {
+            iConnectHeadsetQuery = NULL;
+            if ( ret == EAknSoftkeyExit || ret == EAknSoftkeyOk )
+                {
+                TApaTask task( iCoeEnv->WsSession() );
+                task.SetWgId( iCoeEnv->RootWin().Identifier() );
+                task.EndTask();
+                }
+            else
+                {
+                HandlePendingViewActivationL();
+                }
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::ShowVolumePopupL
+// Show currently active volume popup
+// ---------------------------------------------------------------------------
+// 
+void CFMRadioAppUi::ShowVolumePopupL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::ShowVolumePopupL" ) ) );
+    if ( !iRadioEngine->IsInCall() )
+        {
+        if ( iActiveVolumePopupControl )
+            {
+            if ( IsForeground() || ( IsActiveIdleEnabled() && IsIdleAppForeground() ) )
+                {
+                iActiveVolumePopupControl->ShowVolumePopupL();
+                }
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::GetCurrentHelpContext
+// get help context based on currently active view
+// ---------------------------------------------------------------------------
+//	
+CArrayFix<TCoeHelpContext>* CFMRadioAppUi::GetCurrentHelpContextL() const
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::GetCurrentHelpContextL" ) ) );
+#if defined __SERIES60_HELP || defined FF_S60_HELPS_IN_USE
+    // currently main container and manual tuning container are derived from CBase
+    // so lets create help array manually for them
+        CArrayFixFlat<TCoeHelpContext>* helpArray = new( ELeave )
+        CArrayFixFlat<TCoeHelpContext>( 1 );
+        CleanupStack::PushL( helpArray );
+        helpArray->AppendL( TCoeHelpContext( TUid::Uid( KUidFMRadioApplication ), KFMRADIO_HLP_MAIN ) );
+        CleanupStack::Pop( helpArray );
+        return helpArray;
+#else
+    return AppHelpContextL();
+#endif
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::GetChannelsArrayL
+// Get channels array list from radio engine
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::GetChannelsArrayL()
+    {
+    FTRACE( FPrint( _L("CFMRadioChannelListView::GetChannelsArrayL  Start") ) );
+    
+    // Note: KMaxNumberOfChannelListItems can be setted to any supported max value
+    for ( TInt index = 0; index < KMaxNumberOfChannelListItems; index++ )
+        {
+        TBuf<KPresetNameLength> chName;
+        TInt chFrequency;
+        
+        iRadioEngine->GetPresetNameAndFrequencyL( index,
+                                                  chName, 
+                                                  chFrequency );
+
+        if ( chFrequency != KErrNotFound )
+            {
+            FTRACE( FPrint( _L("CFMRadioChannelListView::ChannelInUse  inside if") ) );
+            CFMRadioPreset* preset = CFMRadioPreset::NewL();
+            CleanupStack::PushL( preset );
+            preset->SetPresetNameL( chName );
+            preset->SetPresetFrequency( chFrequency );
+            
+            RBuf url;
+            url.CleanupClosePushL();
+            url.CreateL( KFMRadioWebLinkMaxLength );
+            TInt err = iRadioEngine->PresetUrlL( index, url );
+            if ( !err )
+                {
+                preset->SetPresetUrlL( url );
+                }
+            
+            iChannels.AppendL( preset );
+            CleanupStack::PopAndDestroy( &url );
+            CleanupStack::Pop( preset );
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// From class CEikAppUi.
+// Handles window server messages.
+// ---------------------------------------------------------------------------
+//
+MCoeMessageObserver::TMessageResponse CFMRadioAppUi::HandleMessageL( 
+        TUint32 aClientHandleOfTargetWindowGroup, TUid aMessageUid, 
+        const TDesC8& aMessageParameters )
+    {
+    FTRACE(FPrint(_L(" *** S60 FMRadio-- CFMRadioAppUi::HandleMessageL" )));
+
+    TMessageResponse resp = CAknViewAppUi::HandleMessageL( 
+        aClientHandleOfTargetWindowGroup, aMessageUid, aMessageParameters );
+        
+    if ( resp == EMessageNotHandled && aMessageUid == TUid::Uid( KUidFMRadioApplication ) )
+        {
+        ProcessCommandTailL( aMessageParameters );
+        resp = EMessageHandled;
+        }
+
+    return resp;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::ProcessCommandParametersL
+// Processes the shell commands
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioAppUi::ProcessCommandParametersL( TApaCommand aCommand, 
+                                                TFileName& aDocumentName, 
+                                                const TDesC8& aTail )
+    {
+    FTRACE(FPrint(_L("CFMRadioAppUi::ProcessCommandParametersL(%d, %S)" ), aCommand, &aTail ));
+    SecondaryConstructL();
+    
+    TBool ret = CAknViewAppUi::ProcessCommandParametersL( aCommand, aDocumentName, aTail );
+    ProcessCommandTailL( aTail );
+
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::ProcessCommandParametersL
+// Processes the command tail in any situation
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::ProcessCommandTailL( const TDesC8& aTail )
+    {
+    TLex8 tailLex( aTail );
+    if ( tailLex.Peek() != 0 )
+        {
+        TPtrC8 command = tailLex.NextToken();
+        if ( command == KFMRadioCommandFrequency )
+            {
+            // tune to frequency
+            TLex8 frequencyLex( tailLex.NextToken() );
+            TInt32 frequency = 0;
+            TInt min = 0;
+            TInt max = 0;
+            iRadioEngine->GetFrequencyBandRange( min, max );
+            TInt ret = frequencyLex.BoundedVal( frequency, max );
+            if ( ret == KErrNone && frequency >= min )
+                {
+                iRadioEngine->CancelScan();
+                TuneL( frequency );
+                }
+            }
+        else if ( command == KFMRadioCommandStationIndex )
+            {
+            // tune to station index
+            TLex8 indexLex( tailLex.NextToken() );
+            TInt32 index = 0;
+            TInt ret = indexLex.BoundedVal( index, iChannels.Count() - 1 );
+            if ( ret == KErrNone && index >= 0 )
+                {
+                iRadioEngine->CancelScan();
+                PlayChannel( index );
+                }
+            }
+        else if( command == KFMRadioCommandActivateView )
+            {
+            TLex8 viewIdLex( tailLex.NextToken() );
+            TInt viewId = 0;
+            TInt ret = viewIdLex.Val( viewId );
+            if ( ret == KErrNone )
+                {
+                TUid uid = TUid::Uid( viewId );
+                CAknView* view = View( uid );
+                // Currently this API supports only activating main view or channel list view
+                if ( view && ( uid == KFMRadioMainViewId || uid == KFMRadioChannelListViewId ) )
+                    {
+                    if ( iStartUp )
+                        {
+                        SetDefaultViewL( *view );
+                        }
+                    else
+                        {
+                        TFMRadioRegionSetting region = iRadioEngine->GetRegionL();  
+                        
+                        if ( iOfflineQueryDialogActivated || 
+                             iConnectHeadsetQuery || 
+                             region == EFMRadioRegionNone )
+                            {
+                            iPendingViewId = view->Id(); 
+                            }
+                        else
+                            {
+                            iChannelListView->CancelMoveL();
+                            ActivateLocalViewL( view->Id() );
+                            }
+                        TApaTask task( iCoeEnv->WsSession() );
+                        task.SetWgId( iCoeEnv->RootWin().Identifier() );
+                        task.BringToForeground();
+                        }
+                    }
+                }
+            }
+        else
+            {
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::Channels
+// Returns channels array
+// ---------------------------------------------------------------------------
+//
+RPointerArray<CFMRadioPreset>& CFMRadioAppUi::Channels()
+	{
+	return iChannels;
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::HandleIADUpdateCheckL
+// Initialize software update check using IAD api
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::HandleIADUpdateCheckL()
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::HandleIADUpdateCheckL") ) );
+    if ( FeatureManager::FeatureSupported( KFeatureIdIAUpdate ) )
+        {
+        FTRACE( FPrint( _L("CFMRadioAppUi::HandleIADUpdateCheckL - KFeatureIdIAUpdate supported") ) );
+        TRAPD( err, iUpdate = CIAUpdate::NewL( *this ) )
+        if ( err && err != KErrNotSupported )
+            {
+            User::Leave( err );
+            }
+        if ( !err )
+            {
+            iParameters = CIAUpdateParameters::NewL();
+            // Use SIS package UID
+            iParameters->SetUid( TUid::Uid( KUidFMRadioApplication ) );
+            iUpdate->CheckUpdates( *iParameters );
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::CheckUpdatesComplete
+// from base class MIAUpdateObserver
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::CheckUpdatesComplete( TInt aErrorCode, TInt aAvailableUpdates )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::CheckUpdatesComplete(%d, %d)"), aErrorCode, aAvailableUpdates ) );
+    if ( aErrorCode == KErrNone )
+        {
+        if ( aAvailableUpdates > 0 )
+            {
+            // There were some updates available. Let's ask if the user wants to update them.
+            iUpdate->UpdateQuery();
+            }
+        else
+            {
+            // No updates available. CIAUpdate object could be deleted already now, since we are not
+            // going to call anything else from the API. This will also close down the IAUpdate server.
+            delete iUpdate;
+            iUpdate = NULL;
+            delete iParameters;
+            iParameters = NULL;
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::UpdateComplete
+// from base class MIAUpdateObserver
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAppUi::UpdateComplete( TInt FDEBUGVAR( aErrorCode ), CIAUpdateResult* aResultDetails )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::UpdateComplete(%d)"), aErrorCode ) );
+    // The update process that the user started from IAUpdate UI is now completed.
+    // If the client application itself was updated in the update process, this callback
+    // is never called, since the client is not running anymore.
+
+    delete aResultDetails; // Ownership was transferred, so this must be deleted by the client
+
+    // We do not need the client-server session anymore, let's delete the object to close the session
+    delete iUpdate;
+    iUpdate = NULL;
+    delete iParameters;
+    iParameters = NULL;	
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::UpdateQueryComplete
+// from base class MIAUpdateObserver
+// ---------------------------------------------------------------------------
+//	
+void CFMRadioAppUi::UpdateQueryComplete( TInt aErrorCode, TBool aUpdateNow )			
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::UpdateQueryComplete(%d, %d)"), aErrorCode, aUpdateNow ) );
+    if ( aErrorCode == KErrNone )
+        {
+        if ( aUpdateNow )
+            {
+            // User choosed to update now, so let's launch the IAUpdate UI.
+            iUpdate->ShowUpdates( *iParameters );
+            }
+        else
+            {
+            // The answer was 'Later'. CIAUpdate object could be deleted already now, since we are not
+            // going to call anything else from the API. This will also close down the IAUpdate server.
+            delete iUpdate;
+            iUpdate = NULL;
+            delete iParameters;
+            iParameters = NULL;
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::AutoTuneInMainView
+// Set autotune true, if scan is interrupted
+// ---------------------------------------------------------------------------
+//	
+void CFMRadioAppUi::AutoTuneInMainView ( TBool /*aTune*/ )
+    {
+    FTRACE( FPrint( _L("CFMRadioAppUi::AutoTuneInMainView()")));
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAppUi::IsStartupWizardHandled
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioAppUi::IsStartupWizardHandled() const
+    {
+    return iStartupWizardHandled;
+    }
+
+// -----------------------------------------------------------------------------
+// Check if Active Idle app is on foreground
+// -----------------------------------------------------------------------------
+//
+TBool CFMRadioAppUi::IsIdleAppForeground()
+    {
+    FTRACE( FPrint( _L( "CFMRadioAppUi::IsIdleAppForeground" ) ) );
+    TBool isIdleActive( EFalse );
+    // Gets the window group id of the app in foreground
+    RWsSession& wsSession = iCoeEnv->Static()->WsSession();
+    TInt windowGroupId = wsSession.GetFocusWindowGroup();
+    if ( windowGroupId >= 0 )
+        {
+        TRAP_IGNORE(
+            {
+            CApaWindowGroupName* wgName = CApaWindowGroupName::NewL(
+                wsSession, windowGroupId );
+            
+            isIdleActive = ( wgName->AppUid() == KFMRadioUidIdleApp );
+            delete wgName;
+            } );
+        }
+    return isIdleActive;
+    }
+
+// -----------------------------------------------------------------------------
+// Check if Active Idle is enabled
+// -----------------------------------------------------------------------------
+//
+TBool CFMRadioAppUi::IsActiveIdleEnabled()
+    {
+    FTRACE( FPrint( _L( "CFMRadioAppUi::IsActiveIdleEnabled" ) ) );
+    TBool res( EFalse );
+
+#ifdef __ACTIVE_IDLE
+    if (! FeatureManager::FeatureSupported( KFeatureIdActiveIdle ) )
+        return EFalse;
+#endif
+    if ( !iSettingsRepository )
+        {
+        TRAP_IGNORE(
+            {
+            iSettingsRepository = CRepository::NewL(
+                KCRUidPersonalizationSettings );
+            } );
+        }
+
+    if ( iSettingsRepository )
+        {
+        TInt value( 0 );
+        TInt err( iSettingsRepository->Get( KSettingsActiveIdleState, value ) );
+        if ( !err && value )
+            {
+            res = ETrue;
+            }
+        }
+    return res;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioAppUi::MatchingChannel
+// Return the index of the first channel that matches the
+// frequency specified.
+// ---------------------------------------------------------
+//
+TInt CFMRadioAppUi::MatchingChannelL( TInt aFrequency )
+    {
+    TInt channelIndex = KErrNotFound;
+    TInt numberOfChannels = iChannels.Count();
+    
+    for ( TInt i = 0; i < numberOfChannels; i++ )
+        {
+        TInt presetFrequency = iChannels[ i ]->PresetFrequency();
+        
+        if ( aFrequency == presetFrequency )
+            {
+            channelIndex = i;
+            break;
+            }
+        }
+    FTRACE(FPrint(_L("CFMRadioAppUi::MatchingChannel i[%d] aFrequency[%d]"), channelIndex, aFrequency));
+    return channelIndex;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioAppUi::HandlePendingViewActivationL
+// Activates the view that is pending
+// ---------------------------------------------------------
+//
+void CFMRadioAppUi::HandlePendingViewActivationL()
+    {
+    if ( iPendingViewId != TUid::Null() )
+        {
+        ActivateLocalViewL( iPendingViewId );
+        iPendingViewId == TUid::Null();
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioAppUi::ActiveVolumePopup
+// ---------------------------------------------------------
+//
+CAknVolumePopup* CFMRadioAppUi::ActiveVolumePopup() const
+    {
+    return iActiveVolumePopupControl;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioAppUi::RadioState
+// ---------------------------------------------------------
+//
+CFMRadioAppUi::TRadioState CFMRadioAppUi::RadioState() const
+    {
+    return iCurrentRadioState;
+    }
+	
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradiobacksteppingservicewrapper.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,275 @@
+/*
+* 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:  Implementation for the Back Stepping Service wrapper
+*
+*/
+
+#include <liwcommon.h>
+#include <liwservicehandler.h>
+#include <mmf/common/mmfcontrollerpluginresolver.h>
+
+#include "fmradiobacksteppingservicewrapper.h"
+
+_LIT8( KFMRadioBackSteppingPrefix, "FMRADIOBS" );
+
+// BS Service implementation UID
+//const TInt KBSServiceImplUid( 0x2000F840 );
+
+// BS Service and Interface ID
+_LIT8( KFMRadioBSServiceID, "Service.BackStepping" );
+_LIT8( KFMRadioBSInterface, "IBackStepping" );
+
+// BS commands
+_LIT8( KFMRadioBSCmdInitialize, "Initialize" );
+_LIT8( KFMRadioBSCmdForwardActivationEvent, "ForwardActivationEvent" );
+_LIT8( KFMRadioBSCmdHandleBackCommand, "HandleBackCommand" );
+
+// BS in param names
+_LIT8( KFMRadioBSInParamAppUid, "AppUid" );
+_LIT8( KFMRadioBSInParamState, "State" );
+_LIT8( KFMRadioBSInParamEnter, "Enter" );
+
+// BS out param names
+_LIT8( KFMRadioBSOutParamStatusInfo, "StatusInfo" );
+
+// ======== MEMBER FUNCTIONS =================================================
+
+// ---------------------------------------------------------------------------
+// CFMRadioBackSteppingServiceWrapper::NewL
+// ---------------------------------------------------------------------------
+//
+CFMRadioBackSteppingServiceWrapper* CFMRadioBackSteppingServiceWrapper::NewL( TUid aUid )
+    {
+    CFMRadioBackSteppingServiceWrapper* self = new( ELeave ) CFMRadioBackSteppingServiceWrapper;
+    CleanupStack::PushL( self );
+    self->ConstructL( aUid );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioBackSteppingServiceWrapper::CFMRadioBackSteppingServiceWrapper
+// ---------------------------------------------------------------------------
+//
+CFMRadioBackSteppingServiceWrapper::CFMRadioBackSteppingServiceWrapper()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioBackSteppingServiceWrapper::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioBackSteppingServiceWrapper::ConstructL( TUid aUid )
+    {
+    // Create Service Handler and keep as long as access to BS Service needed.
+    iServiceHandler = CLiwServiceHandler::NewL();
+    // For convenience keep pointers to Service Handler param lists.
+    iInParamList = &iServiceHandler->InParamListL();
+    iOutParamList = &iServiceHandler->OutParamListL();
+
+    // Create AIW criteria.
+    RCriteriaArray criteriaArray;
+    CleanupResetAndDestroyPushL( criteriaArray );
+    CLiwCriteriaItem* criterion = CLiwCriteriaItem::NewLC(
+        KLiwCmdAsStr,
+        KFMRadioBSInterface,
+        KFMRadioBSServiceID );
+    criterion->SetServiceClass( TUid::Uid( KLiwClassBase ) );
+    criteriaArray.AppendL( criterion );
+    CleanupStack::Pop( criterion );
+
+    // Attach AIW criteria.
+    iServiceHandler->AttachL( criteriaArray );
+    // Get BS Service interface.
+    iServiceHandler->ExecuteServiceCmdL( *criterion, *iInParamList, *iOutParamList );
+    CleanupStack::PopAndDestroy( &criteriaArray );
+
+    // Check if BS interface can be found from output params.
+    TInt pos( 0 );
+    iOutParamList->FindFirst( pos, KFMRadioBSInterface );
+    if( KErrNotFound != pos )
+        {
+        // Extract BS interface from output params.
+        iBsInterface = ( *iOutParamList )[pos].Value().AsInterface();   
+        }
+
+    // Initialize BS Service.
+    InitializeL( aUid );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioBackSteppingServiceWrapper::~CFMRadioBackSteppingServiceWrapper
+// ---------------------------------------------------------------------------
+//
+CFMRadioBackSteppingServiceWrapper::~CFMRadioBackSteppingServiceWrapper()
+    {
+    if ( iBsInterface )
+        {
+        iBsInterface->Close();
+        }
+    if ( iServiceHandler )
+        {
+        delete iServiceHandler;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioBackSteppingServiceWrapper::HandleViewActivationEventL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioBackSteppingServiceWrapper::HandleViewActivationEventL( const TVwsViewId aViewId,
+                                                                     TBool aEnter )
+    {
+    if ( iBsInterface )
+        {
+        // Make Service Handler param lists.
+        iInParamList->Reset();
+        iOutParamList->Reset();
+        
+        RBuf8 buffer;
+        CleanupClosePushL( buffer );
+        buffer.CreateL( KFMRadioBackSteppingPrefix().Length() + KDefaultRealWidth );
+        buffer.Copy( KFMRadioBackSteppingPrefix );
+        // Convert 32-bit signed integer (TInt32) view uid to TInt.
+        TInt64 viewUid = static_cast< TInt64 >( aViewId.iViewUid.iUid );
+        buffer.AppendNum( viewUid );
+            
+        TLiwGenericParam state( KFMRadioBSInParamState, TLiwVariant( buffer ) );
+        iInParamList->AppendL( state );
+        TLiwGenericParam enter( KFMRadioBSInParamEnter, TLiwVariant( aEnter ) );
+        iInParamList->AppendL( enter );
+
+        // Execute view activation event.
+        iBsInterface->ExecuteCmdL( KFMRadioBSCmdForwardActivationEvent, *iInParamList, *iOutParamList );
+        CleanupStack::PopAndDestroy();
+
+        // Check if BS Service consumed the event.
+        HandleResultL();
+
+        iInParamList->Reset();
+        iOutParamList->Reset();
+        }
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioBackSteppingServiceWrapper::HandleBackCommandL
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioBackSteppingServiceWrapper::HandleBackCommandL( const TVwsViewId aViewId )
+    {
+    TBool retVal = EFalse;
+    if ( iBsInterface )
+        {
+        // Make Service Handler param lists.
+        iInParamList->Reset();
+    	iOutParamList->Reset();
+    	
+        // Create message for back stepping wrapper to handle back command event.
+        RBuf8 buffer;
+        CleanupClosePushL( buffer );
+        buffer.CreateL( KFMRadioBackSteppingPrefix().Length() + KDefaultRealWidth );
+        buffer.Copy( KFMRadioBackSteppingPrefix );
+        // Convert 32-bit signed integer (TInt32) view uid to TInt64.
+        TInt64 viewUid = static_cast< TInt64 >( aViewId.iViewUid.iUid );
+        buffer.AppendNum( viewUid );
+        
+    	TLiwGenericParam state( KFMRadioBSInParamState, TLiwVariant( buffer ) );
+    	iInParamList->AppendL( state );
+    
+        // Execute back event.
+    	iBsInterface->ExecuteCmdL( KFMRadioBSCmdHandleBackCommand, *iInParamList, *iOutParamList );
+        CleanupStack::PopAndDestroy();
+    
+        // Check if BS Service consumes the event.
+        retVal = HandleResultL();
+    
+    	iInParamList->Reset();
+    	iOutParamList->Reset();
+        }
+    
+	return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioBackSteppingServiceWrapper::InitializeL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioBackSteppingServiceWrapper::InitializeL( const TUid aUid )
+    {
+    if ( iBsInterface )
+        {
+        // Initialize BS Service.
+        iInParamList->Reset();
+    	iOutParamList->Reset();
+    
+    	TLiwGenericParam appUid( KFMRadioBSInParamAppUid, TLiwVariant( aUid.iUid ) );
+    	iInParamList->AppendL( appUid );
+    	
+    	iBsInterface->ExecuteCmdL( KFMRadioBSCmdInitialize, *iInParamList, *iOutParamList );
+    
+        if ( !HandleResultL() )
+            {
+            // Initialize command was not consumed.
+            User::Leave( KErrArgument );
+            }
+    
+    	iInParamList->Reset();
+    	iOutParamList->Reset();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioBackSteppingServiceWrapper::HandleResultL
+// ---------------------------------------------------------------------------
+//
+TInt CFMRadioBackSteppingServiceWrapper::HandleResultL()
+    {
+    TBool retVal( EFalse );
+    // Check if error can be found from outparams.
+    TInt posErr( 0 );
+	iOutParamList->FindFirst( posErr, LIW::EGenericParamError );
+	if( KErrNotFound != posErr )
+		{
+		// Error code found - extract and handle
+		TInt errorCode( KErrNone );
+		( *iOutParamList )[posErr].Value().Get( errorCode );
+		User::LeaveIfError( errorCode );
+		}
+    // No errors found. Check if status info can be found from outparams.
+    TInt posStat( 0 );
+    iOutParamList->FindFirst( posStat, KFMRadioBSOutParamStatusInfo );
+    if( KErrNotFound != posStat )
+		{
+		// Status info present - extract.
+		( *iOutParamList )[posStat].Value().Get( retVal );
+		}
+	else
+	    {
+	    // No status info found.
+	    User::Leave( KErrNotFound );
+	    }
+    return retVal;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioBackSteppingServiceWrapper::HandleViewActivation
+// ---------------------------------------------------------------------------
+//
+void CFMRadioBackSteppingServiceWrapper::HandleViewActivation( const TVwsViewId& aNewlyActivatedViewId, 
+                                                               const TVwsViewId& /*aViewIdToBeDeactivated*/ )
+    {
+    TRAP_IGNORE( HandleViewActivationEventL( aNewlyActivatedViewId, ETrue ) )
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradiochannellistcontainer.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,1076 @@
+/*
+* 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:  Implementation of the class CFMRadioChannelListContainer
+*
+*/
+
+
+// INCLUDE FILES
+#include <e32math.h>
+#include <AknsSkinInstance.h>
+#include <AknsUtils.h>
+#include <AknsDrawUtils.h>
+#include <AknsBasicBackgroundControlContext.h>
+#include <gulutil.h> 
+#include <w32std.h>
+#include <fmradio.rsg>
+#if defined __SERIES60_HELP || defined FF_S60_HELPS_IN_USE
+#include "radio.hlp.hrh"
+#endif
+#include <StringLoader.h>
+#include <eiklabel.h>
+#include <AknIconArray.h>
+#include <gulicon.h>
+#include <fmradiouids.h>
+#include <aknconsts.h>
+#include <avkon.mbg>
+
+
+#include "fmradioappui.h"
+#include "fmradiochannellistcontainer.h"
+#include "fmradiochannellistview.h"
+
+// CONSTANTS
+
+// ================= MEMBER FUNCTIONS =======================
+
+
+// ----------------------------------------------------------------------------
+// CFMRadioChannelListContainer::CFMRadioChannelListContainer
+// Default constructor
+// ----------------------------------------------------------------------------
+//
+CFMRadioChannelListContainer::CFMRadioChannelListContainer( 
+	CRadioEngine& aRadioEngine,
+	MChannelListHandler& aObserver ) :
+	iRadioEngine( aRadioEngine ),
+	iObserver( aObserver )
+	
+	{	
+	}
+
+// ---------------------------------------------------------
+// CFMRadioChannelListContainer::NewL
+// Two-phase constructor of CFMRadioChannelListContainer
+// ---------------------------------------------------------
+//
+CFMRadioChannelListContainer* CFMRadioChannelListContainer::NewL( const TRect& aRect, 
+		CRadioEngine& aRadioEngine, MChannelListHandler& aObserver  )
+    {
+    CFMRadioChannelListContainer* self = new (ELeave) CFMRadioChannelListContainer( aRadioEngine,
+    		aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL( aRect );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+//
+// ----------------------------------------------------
+// CFMRadioChannelListContainer::ConstructL
+// EPOC two phased constructor
+// ----------------------------------------------------
+//
+void CFMRadioChannelListContainer::ConstructL( const TRect& aRect )
+    {
+    CreateWindowL();
+
+    // Instantiate a listbox for the channel list
+    iChannelList = new ( ELeave ) CAknDoubleNumberStyleListBox();
+    iChannelList->SetContainerWindowL( *this );
+    iChannelList->SetListBoxObserver( this );
+    iChannelList->ConstructL( this, CEikListBox::ELoopScrolling | EAknListBoxSelectionList ); // Looped list
+    iChannelList->SetRect( aRect ); // Set boundaries for listbox
+    // Create scrollbars
+    iChannelList->CreateScrollBarFrameL( ETrue );
+    iChannelList->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto );
+    HBufC* emptyString = NULL;
+    emptyString = StringLoader::LoadLC( R_QTN_FMRADIO_LIST_NO_STATIONS, iEikonEnv );
+    
+    iChannelList->View()->SetListEmptyTextL( *emptyString );
+    CleanupStack::PopAndDestroy( emptyString );
+
+    CAknIconArray* listIconArray = new ( ELeave ) CAknIconArray( 2 );
+    CleanupStack::PushL( listIconArray );
+    CreateListIconsL( *listIconArray );
+    iChannelList->ItemDrawer()->FormattedCellData()->SetIconArrayL( listIconArray );
+    CleanupStack::Pop( listIconArray );
+    
+    // Array for channels
+    iChannelItemArray = new( ELeave ) CDesCArrayFlat( KMaxNumberOfChannelListItems );
+    InitializeChannelListL();
+    SetRect( aRect );             // Set its rectangle
+
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+    iChannelView = static_cast<CFMRadioChannelListView*> ( appUi->View( KFMRadioChannelListViewId ) );
+    ActivateL();
+    }
+
+// ----------------------------------------------------
+// CFMRadioChannelListContainer::~CFMRadioChannelListContainer
+// Class destructor
+// ----------------------------------------------------
+//
+CFMRadioChannelListContainer::~CFMRadioChannelListContainer()
+    {
+    delete iChannelList;
+    iBitMaps.ResetAndDestroy();
+    iBitMaps.Close();
+    delete iChannelItemArray;
+    }
+
+// ----------------------------------------------------
+// CFMRadioChannelListContainer::CreateListIconsL
+// ----------------------------------------------------
+//
+void CFMRadioChannelListContainer::CreateListIconsL( CArrayPtr<CGulIcon>& aArray )
+    {
+    if ( iBitMaps.Count() )
+        {
+        // release any previously created bitmaps
+        iBitMaps.ResetAndDestroy();
+        }
+    
+    TRgb defaultColor = iEikonEnv->Color( EColorControlText );
+    MAknsSkinInstance* skinInstance = AknsUtils::SkinInstance();
+
+    // speaker icon
+    CFbsBitmap* playingIconBitmap = NULL;
+    CFbsBitmap* playingIconBitmapMask = NULL;
+        
+    AknsUtils::CreateColorIconLC( skinInstance,
+                KAknsIIDQgnIndiSpeaker,
+                KAknsIIDQsnIconColors,
+                EAknsCIQsnIconColorsCG13,
+                playingIconBitmap,
+                playingIconBitmapMask,
+                KAvkonBitmapFile,
+                EMbmAvkonQgn_indi_speaker,
+                EMbmAvkonQgn_indi_speaker_mask,
+                defaultColor
+                );
+    iBitMaps.AppendL( playingIconBitmap );
+    iBitMaps.AppendL( playingIconBitmapMask );
+    CleanupStack::Pop( 2 ); // playingIconBitmap, playingIconBitmapMask
+         
+    CGulIcon* playingIcon = CGulIcon::NewLC();
+    playingIcon->SetBitmapsOwnedExternally( ETrue );
+    playingIcon->SetBitmap( playingIconBitmap );
+    playingIcon->SetMask( playingIconBitmap );
+    aArray.AppendL( playingIcon );
+    CleanupStack::Pop( playingIcon );
+   
+    // marked icon
+    CFbsBitmap* markedIconBitmap = NULL;
+    CFbsBitmap* markedIconBitmapMask = NULL;
+    
+    AknsUtils::CreateColorIconLC( skinInstance,
+                KAknsIIDQgnIndiMarkedAdd,
+                KAknsIIDQsnIconColors,
+                EAknsCIQsnIconColorsCG13,
+                markedIconBitmap,
+                markedIconBitmapMask,
+                KAvkonBitmapFile,
+                EMbmAvkonQgn_indi_marked_add,
+                EMbmAvkonQgn_indi_marked_add_mask,
+                defaultColor
+                );    
+    iBitMaps.AppendL( markedIconBitmap );
+    iBitMaps.AppendL( markedIconBitmapMask );
+    CleanupStack::Pop( 2 ); // markedIconBitmap, markedIconBitmapMask
+    
+    CGulIcon* markedIcon = CGulIcon::NewLC();
+    markedIcon->SetBitmapsOwnedExternally( ETrue );
+    markedIcon->SetBitmap( markedIconBitmap );
+    markedIcon->SetMask( markedIconBitmapMask );
+    aArray.AppendL( markedIcon );
+    CleanupStack::Pop( markedIcon );
+    }
+
+// ----------------------------------------------------
+// CFMRadioChannelListContainer::InitializeChannelListL
+// Create the channel list (initially all spots are set as empty)
+// ----------------------------------------------------
+//
+void CFMRadioChannelListContainer::InitializeChannelListL()
+	{
+    TBuf<KLengthOfChannelItemString> textChannelItem;
+    textChannelItem.SetLength( 0 );
+
+    // Pass the array to the listbox model and set the ownership type
+    iChannelList->Model()->SetItemTextArray( (MDesCArray*)iChannelItemArray );
+    iChannelList->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray );
+    iChannelList->HandleItemAdditionL();
+	DrawDeferred();
+	}
+
+// ----------------------------------------------------
+// CFMRadioChannelListContainer::UpdateChannelListContentL
+// Update the content of the channel at aIndex with the
+// values specified
+// ----------------------------------------------------
+//
+void CFMRadioChannelListContainer::UpdateChannelListContentL( TInt aIndex,
+        const TDesC& aChannelName,
+        TInt aChannelFrequency )
+    {
+    TBuf<KLengthOfChannelItemString> textChannelItem;
+    TBuf<KLengthOfChIndexStringChList> textChIndex;
+    TBuf<KLengthOfChannelItemIconIndexString> textChIconIndex;
+    
+    textChIndex.Format( KChIndexFormatChList, aIndex+1 ); // One over index
+    
+    textChIconIndex.Format( KChIconIndexFormatChList, KNowPlayingIconIndexChList );
+    
+    //Update to display Devnagari numbers for Text Index.
+    AknTextUtils::LanguageSpecificNumberConversion( textChIndex );
+
+    textChannelItem.Append( textChIndex );
+    textChannelItem.Append( KColumnListSeparator );
+    textChannelItem.Append( aChannelName );
+    textChannelItem.Append( KColumnListSeparator );
+    
+    if ( aChannelFrequency )
+        {
+        TReal frequency = static_cast<TReal>( aChannelFrequency / static_cast<TReal>( KHzConversionFactor ));
+        // Gets locale decimal separator automatically
+        TRealFormat format(KFrequencyMaxLength, iRadioEngine.DecimalCount() );
+        TBuf<30> frequencyString;
+        frequencyString.Num( frequency, format );
+    
+        HBufC* stringHolder = StringLoader::LoadLC( R_QTN_FMRADIO_DOUBLE2_FREQ, frequencyString, iEikonEnv );
+        //Update for display of Hindi Devnagari Numbers
+        TPtr textItem2 = stringHolder->Des();
+        AknTextUtils::LanguageSpecificNumberConversion(textItem2);
+        textChannelItem.Append( textItem2 );
+        CleanupStack::PopAndDestroy( stringHolder );
+        }
+        
+    // Set 'Now Playing' icon to the channel item
+    textChannelItem.Append( KColumnListSeparator );
+                 
+    if ( iRadioEngine.GetPresetIndex() == aIndex )
+        {
+        textChannelItem.Append( textChIconIndex );
+        }
+    
+    if ( aIndex < iChannelItemArray->Count() && aIndex >= 0 )
+        {
+        iChannelItemArray->Delete( aIndex );
+        iChannelItemArray->InsertL( aIndex, textChannelItem );
+        iChannelList->DrawDeferred();
+        }
+    }
+
+// ----------------------------------------------------
+// CFMRadioChannelListContainer::RemoveChannelL
+// Removes channel from container list
+// ----------------------------------------------------
+//
+void CFMRadioChannelListContainer::RemoveChannelL( TInt aIndex )
+    {
+    if ( iChannelItemArray->Count() > 0 )
+        {
+        TInt presetIndex = iRadioEngine.GetPresetIndex();
+        
+        iChannelItemArray->Delete( aIndex );
+        iChannelList->HandleItemRemovalL();
+        iChannelList->UpdateScrollBarsL();
+
+        if ( iChannelItemArray->Count() > 0 )
+            {
+            ReIndexAllL();
+            
+            if ( presetIndex > aIndex )			    
+                {
+                // update engine settings also
+                iRadioEngine.SetCurrentPresetIndex( presetIndex - 1 );
+                UpdateItemIconL( presetIndex - 1, KNowPlayingIconIndexChList );
+                }
+            else if ( presetIndex == aIndex  )
+                {
+                iRadioEngine.TunePresetL( 0 );	
+                UpdateItemIconL( 0, KNowPlayingIconIndexChList );
+                }
+            else
+                {
+                // NOP
+                }               
+            iChannelList->SetCurrentItemIndex( 0 );
+            
+            }
+        else
+            {
+            // The last item was deleted, tune to current frequency, out of preset mode
+            iRadioEngine.Tune( iRadioEngine.GetTunedFrequency(), CRadioEngine::ERadioTunerMode );
+            }
+        iChannelList->DrawDeferred();
+        }
+    }
+
+// ----------------------------------------------------
+// CFMRadioChannelListContainer::AddChannel
+// Adds channels to container list
+// ----------------------------------------------------
+//
+void CFMRadioChannelListContainer::AddChannelL( 
+			const TDesC& aChannelName, TInt aChannelFrequency, TBool aNowPlaying  )
+	{
+	TBuf<KLengthOfChannelItemString> textChannelItem;
+	TBuf<KLengthOfChIndexStringChList> textChIndex;
+	TBuf<KLengthOfChannelItemIconIndexString> textChIconIndex;
+	
+	textChIndex.Format( KChIndexFormatChList, iChannelItemArray->Count()+1 ); // One over index
+ 
+   	if ( !AknLayoutUtils::PenEnabled() )
+		{
+    	textChIconIndex.Format( KChIconIndexFormatChList, KNowPlayingIconIndexChList ) ;
+		}    
+	
+	//Update to display Devnagari numbers for Text Index.
+	AknTextUtils::LanguageSpecificNumberConversion(textChIndex);
+	//
+	textChannelItem.Append( textChIndex );
+	textChannelItem.Append( KColumnListSeparator );
+	
+    TReal frequency = static_cast<TReal>( aChannelFrequency / static_cast<TReal>( KHzConversionFactor ));
+    // Gets locale decimal separator automatically
+    TRealFormat format(KFrequencyMaxLength, iRadioEngine.DecimalCount() );
+    TBuf<30> frequencyString;
+    frequencyString.Num(frequency,format);	
+	
+	TBool channelHasName = EFalse;
+	TInt resId = 0;
+	// if name exists, place it on the first line
+	if ( aChannelName.Length() > 0 )
+	    {
+	    textChannelItem.Append( aChannelName );
+	    textChannelItem.Append( KColumnListSeparator );
+	    channelHasName = ETrue;
+	    resId = R_QTN_FMRADIO_DOUBLE2_FREQ;
+	    }
+	else // frequency goes to first line
+	    {
+	    resId = R_QTN_FMRADIO_DOUBLE1_FREQ;
+	    }
+
+	HBufC* stringHolder = StringLoader::LoadLC( resId, frequencyString, iEikonEnv );    
+    //Update for display of Hindi Devnagari Numbers
+    TPtr textItem2 = stringHolder->Des();
+    AknTextUtils::LanguageSpecificNumberConversion(textItem2);
+    textChannelItem.Append( textItem2 );
+    CleanupStack::PopAndDestroy( stringHolder );
+        
+    if ( !channelHasName )
+        {
+        // add placeholder for second line
+        textChannelItem.Append( KColumnListSeparator ); 
+        }
+        
+	// Set 'Now Playing' icon to the channel item
+    textChannelItem.Append( KColumnListSeparator );
+	    		 
+	if( !AknLayoutUtils::PenEnabled() && aNowPlaying )
+	    {	    
+		textChannelItem.Append( textChIconIndex );	
+	    }
+	
+	iChannelItemArray->AppendL(  textChannelItem );
+	
+	iChannelList->HandleItemAdditionL(); // Update list
+	iChannelList->UpdateScrollBarsL();
+	iChannelList->DrawDeferred();
+	
+	}
+// ----------------------------------------------------
+// CFMRadioChannelListContainer::UpdateItemIconL
+// Adds icon to a list item
+// ----------------------------------------------------
+//
+void CFMRadioChannelListContainer::UpdateItemIconL( TInt aIndex, TInt aIconIndex )
+    {
+    HideIconsL();
+
+    if ( aIndex >= 0 && aIndex < iChannelItemArray->Count() ) 
+        {
+        TBuf<KLengthOfChannelItemIconIndexString> textChIconIndex;
+        textChIconIndex.Format( KChIconIndexFormatChList, aIconIndex );
+        HBufC* channelItem = HBufC::NewLC( KLengthOfChannelItemString );
+        channelItem->Des().Copy( iChannelItemArray->MdcaPoint( aIndex ) );
+        TPtr ptr( channelItem->Des() );
+        ptr.Append( textChIconIndex ); // Add icon index
+        
+        iChannelItemArray->Delete( aIndex );
+        iChannelItemArray->InsertL( aIndex, *channelItem );
+        CleanupStack::PopAndDestroy( channelItem );
+        }
+    // use draw now so that view is up to date during fast channel switching
+    iChannelList->DrawNow();
+    }
+
+// ----------------------------------------------------
+// CFMRadioChannelListContainer::HideIconsL
+// hide all icons from the list
+// ----------------------------------------------------
+//
+void CFMRadioChannelListContainer::HideIconsL()
+    {
+    for ( TInt index = 0 ; index < iChannelItemArray->Count(); index++ ) 
+        {
+        HBufC* channelItem = HBufC::NewLC( KLengthOfChannelItemString );
+        channelItem->Des().Copy( iChannelItemArray->MdcaPoint( index ) );
+        TPtr ptr( channelItem->Des() );	
+        
+        TBuf<KLengthOfChannelItemIconIndexString> textChIconIndex;
+        TPtrC iconIndexPtr( textChIconIndex );
+        TInt err = TextUtils::ColumnText( iconIndexPtr, 3, &ptr );
+        
+        if ( iconIndexPtr.Length() > 0 )
+            {
+            ptr.Delete( ptr.Length() - iconIndexPtr.Length(), iconIndexPtr.Length() ); // Remove icon index		
+            iChannelItemArray->Delete( index );
+            iChannelItemArray->InsertL( index, *channelItem );
+            }
+        CleanupStack::PopAndDestroy( channelItem );
+        }
+    }
+
+// ----------------------------------------------------
+// CFMRadioChannelListContainer::SetFaded
+// Fades the entire window and controls in the window owned
+// by this container control.
+// ----------------------------------------------------
+//
+void CFMRadioChannelListContainer::SetFaded( TBool aFaded )
+	{
+    iFadeStatus = aFaded;
+    Window().SetFaded( aFaded, RWindowTreeNode::EFadeIncludeChildren );
+	}
+
+// ----------------------------------------------------
+// CFMRadioChannelListContainer::UpdateLastListenedChannel
+// Updates channel index - the highlighted channel in the list.
+// ----------------------------------------------------
+//
+void CFMRadioChannelListContainer::UpdateLastListenedChannel( TInt aIndex )
+	{
+    iLastChIndex = aIndex;
+	iChannelList->SetCurrentItemIndex( iLastChIndex );
+	iChannelList->ScrollToMakeItemVisible( iLastChIndex );
+	iChannelList->DrawDeferred();
+	}
+
+// ----------------------------------------------------
+// CFMRadioChannelListContainer::CurrentlySelectedChannel
+// Returns the index of the selected channel item from the
+// channel list.
+// ----------------------------------------------------
+//
+TInt CFMRadioChannelListContainer::CurrentlySelectedChannel() const
+	{
+    return iChannelList->CurrentItemIndex(); // Index of selected channel
+	}
+
+// ----------------------------------------------------
+// CFMRadioChannelListContainer::HandleListBoxEventL
+// For handling listbox-, in this case, channel list events.
+// The event equals to selecting a channel item from the list.
+// ----------------------------------------------------
+//
+void CFMRadioChannelListContainer::HandleListBoxEventL( CEikListBox* /*aListBox*/,
+                                                      TListBoxEvent aEventType )
+    {
+    // Check the event generated by keypress and report the event,
+    // Also check for Pen Enabled touch screen event
+
+    switch ( aEventType )
+        {
+        case EEventEnterKeyPressed:
+            {
+            ReportEventL( MCoeControlObserver::EEventStateChanged );
+            break;
+            }
+        case EEventItemSingleClicked:
+            {
+            if ( iMoveAction )
+                {
+                TouchMoveEventL( CurrentlySelectedChannel() ); 
+                }
+            else
+                {
+                ReportEventL( MCoeControlObserver::EEventStateChanged );
+                }
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CFMRadioChannelListContainer::HandleResourceChange
+// -----------------------------------------------------------------------------
+//
+void CFMRadioChannelListContainer::HandleResourceChange(TInt aType)
+    {
+    CCoeControl::HandleResourceChange(aType);
+    if ( aType ==  KEikDynamicLayoutVariantSwitch  )
+        {
+        SizeChanged();
+        }
+    else if ( aType == KAknsMessageSkinChange )
+        {
+        CArrayPtr<CGulIcon>* iconArray = iChannelList->ItemDrawer()->FormattedCellData()->IconArray();
+        // update icons with new skin
+        iconArray->ResetAndDestroy();
+        TRAP_IGNORE( CreateListIconsL( *iconArray ) )
+        }
+    }
+// ---------------------------------------------------------
+// CFMRadioChannelListContainer::SizeChanged
+// Called by framework when the view size is changed
+// ---------------------------------------------------------
+//
+void CFMRadioChannelListContainer::SizeChanged()
+    {
+    // The channel list fills the whole view
+    iChannelList->SetRect( Rect() );
+    DrawDeferred();
+    }
+
+// ---------------------------------------------------------
+// CFMRadioChannelListContainer::CountComponentControls
+// Return the number of controls in the window owned by this container
+// ---------------------------------------------------------
+//
+TInt CFMRadioChannelListContainer::CountComponentControls() const
+    {
+    return 1;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioChannelListContainer::ComponentControl
+// Return the control corresponding to the specified index
+// ---------------------------------------------------------
+//
+CCoeControl* CFMRadioChannelListContainer::ComponentControl( TInt aIndex ) const
+    {
+    CCoeControl* control = NULL;
+    
+    switch ( aIndex )
+        {
+        case 0:
+            {
+            control = iChannelList;
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    
+    return control;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioChannelListContainer::OfferKeyEventL
+// Allow the channel list to process key events
+// ---------------------------------------------------------
+//
+TKeyResponse CFMRadioChannelListContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent,
+                                                           TEventCode aType )
+    {
+    TKeyResponse response = EKeyWasNotConsumed;
+    
+    if ( iFadeStatus )
+        {
+        // don't handle any keys if the view is faded
+        return response;
+        }
+
+    switch ( aKeyEvent.iCode )
+        {
+        case EKeyBackspace:
+            {
+            if ( iChannelList->IsHighlightEnabled() && !iMoveAction )
+                {
+                iChannelView->HandleCommandL( EFMRadioCmdErase );
+                return EKeyWasConsumed;
+                }
+            break;
+            }
+        case EKeyOK: // accept both
+        case EKeyEnter:
+            {
+            // used to accept move action
+            if ( iMoveAction )
+                {
+                iChannelView->MoveActionDoneL();
+                return EKeyWasConsumed;
+                }
+            else if ( iChannelList->IsHighlightEnabled() ) // change to main view
+                {
+                if ( iChannelView->CurrentlyPlayingChannel() ==
+                        CurrentlySelectedChannel() )
+                    {
+                    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+                    appUi->ActivateLocalViewL( KFMRadioMainViewId );
+                    return EKeyWasConsumed;
+                    }
+                }
+            break;
+            }
+        case EKeyLeftArrow:
+        case EKeyRightArrow:
+            {
+            return EKeyWasNotConsumed;
+            }
+        case EKeyUpArrow:
+            if ( iMoveAction )	
+                {
+                iKeyMoveActivated = ETrue;
+                MoveUpL();
+                response = EKeyWasConsumed;
+                }
+            else
+                {
+                response = iChannelList->OfferKeyEventL(aKeyEvent, aType);
+                if (response == EKeyWasConsumed)
+                    {
+                    ReportEventL( MCoeControlObserver::EEventRequestFocus );
+                    }
+                }
+            return response;
+        case EKeyDownArrow:
+            if ( iMoveAction )	
+                {
+                iKeyMoveActivated = ETrue;
+                MoveDownL();
+                response = EKeyWasConsumed;
+                }
+            else
+                {
+                response = iChannelList->OfferKeyEventL(aKeyEvent, aType);
+                if (response == EKeyWasConsumed)
+                    {
+                    ReportEventL( MCoeControlObserver::EEventRequestFocus );
+                    }
+                }
+            return response;
+        default:
+            switch ( aKeyEvent.iScanCode ) //we need to use the scan code, because we need to process the event wrt the keyUp and keyDown action
+                {
+                case EKeyboardKey1: // Timed key
+                case EKeyboardKey2: // Normal keys
+                case EKeyboardKey3:
+                case EKeyboardKey4:
+                case EKeyboardKey5:
+                case EKeyboardKey6:
+                case EKeyboardKey7:
+                case EKeyboardKey8:
+                case EKeyboardKey9:
+                case EKeyboardKey0:
+                    return EKeyWasNotConsumed;
+                default:
+                    break;
+                }
+            break;
+        }
+    return iChannelList->OfferKeyEventL(aKeyEvent, aType);
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListContainer::GetHelpContext
+// Gets Help
+//
+// ---------------------------------------------------------------------------
+//
+void CFMRadioChannelListContainer::GetHelpContext(TCoeHelpContext& aContext) const
+    {
+#if defined __SERIES60_HELP || defined FF_S60_HELPS_IN_USE
+    aContext.iMajor = TUid::Uid( KUidFMRadioApplication );
+    aContext.iContext = KFMRADIO_HLP_LIST;
+#endif
+    }
+
+// ---------------------------------------------------------
+// CFMRadioChannelListContainer::FocusChanged(TDrawNow aDrawNow)
+//
+// ---------------------------------------------------------
+//
+void CFMRadioChannelListContainer::FocusChanged(TDrawNow aDrawNow)
+    {
+    CCoeControl::FocusChanged(aDrawNow);
+    if ( iChannelList )
+        {
+        iChannelList->SetFocus(IsFocused(), aDrawNow);
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioChannelListContainer::HandlePointerEventL
+// ---------------------------------------------------------
+//
+void CFMRadioChannelListContainer::HandlePointerEventL( const TPointerEvent& aPointerEvent )
+    {
+    // don't handle any pointer events if view is faded
+    if ( !iFadeStatus )
+        {
+        CCoeControl::HandlePointerEventL( aPointerEvent );
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioChannelListContainer::ActivateMove
+// ---------------------------------------------------------
+//
+void CFMRadioChannelListContainer::ActivateMoveL()
+    {
+    iMoveAction = ETrue;
+    iMoveIndex = iChannelList->CurrentItemIndex();
+    iTouchMoveIndex = iMoveIndex;
+    UpdateItemIconL( iMoveIndex, KMoveIconIndexChList );
+    iKeyMoveActivated = EFalse;;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioChannelListContainer::TouchMoveEventL
+// ---------------------------------------------------------
+//
+void CFMRadioChannelListContainer::TouchMoveEventL( TInt aIndex )
+	{
+	HBufC* channelItem = HBufC::NewLC( KLengthOfChannelItemString );
+	channelItem->Des().Copy( iChannelItemArray->MdcaPoint( iTouchMoveIndex ) );
+	TPtr ptr( channelItem->Des() );	
+	
+	TBuf<KLengthOfChannelItemIconIndexString> textChIconIndex;
+	
+	TPtrC iconIndexPtr( textChIconIndex );
+	
+  	TInt err = TextUtils::ColumnText( iconIndexPtr, 3, &ptr );
+	
+	iChannelItemArray->Delete( iTouchMoveIndex );
+    iChannelList->HandleItemRemovalL();    
+    
+    iChannelItemArray->InsertL( aIndex, *channelItem );
+    iChannelList->HandleItemAdditionL(); 
+    iChannelList->UpdateScrollBarsL();
+    iChannelList->SetCurrentItemIndex( aIndex ); 
+	iChannelList->DrawDeferred();
+	
+	iTouchMoveIndex = aIndex;
+	
+	CleanupStack::PopAndDestroy( channelItem );
+	
+    ReIndexAllL();
+    UpdateItemIconL( aIndex, KMoveIconIndexChList );
+    iChannelView->MoveActionDoneL();
+	}
+
+// ---------------------------------------------------------
+// CFMRadioChannelListContainer::MoveDownL
+// ---------------------------------------------------------
+//
+void CFMRadioChannelListContainer::MoveDownL()
+	{		
+	TInt index = iChannelList->CurrentItemIndex();
+	TInt originalindex = index;
+	
+	HBufC* channelItem = HBufC::NewLC( KLengthOfChannelItemString );
+	channelItem->Des().Copy( iChannelItemArray->MdcaPoint( index ) );
+	TPtr ptr( channelItem->Des() );
+	
+	iChannelItemArray->Delete( index );
+    iChannelList->HandleItemRemovalL();
+    
+    if ( index < iChannelItemArray->Count() )
+    	{
+    	index = index+1;
+    	   	
+    	TBuf<KLengthOfChIndexStringChList> channelindex;
+    		    
+	    TPtrC indexPtr( channelindex );
+	    
+	  	TInt errori = TextUtils::ColumnText( indexPtr, 0, &ptr );
+	  	
+	  	ptr.Delete( 0, indexPtr.Length() );
+	  		  	
+	  	channelindex.Format( KChIndexFormatChList, index+1 );
+	
+	   	AknTextUtils::LanguageSpecificNumberConversion( channelindex );
+	   	
+	   	ptr.Insert( 0, channelindex ); 
+	   	
+	    iChannelItemArray->InsertL( index, *channelItem );
+	    iChannelList->HandleItemAdditionL(); // Update list
+	    iChannelList->UpdateScrollBarsL();
+	    iChannelList->SetCurrentItemIndex( index );
+		iChannelList->DrawDeferred();
+		
+		HBufC* origchannelItem = HBufC::NewLC( KLengthOfChannelItemString );
+		origchannelItem->Des().Copy( iChannelItemArray->MdcaPoint( originalindex ) );
+		TPtr origptr( origchannelItem->Des() );	
+		
+		iChannelItemArray->Delete( originalindex );
+		iChannelList->HandleItemRemovalL();
+		TBuf<KLengthOfChIndexStringChList> origchannelindex;
+		    
+		TPtrC origindexPtr( origchannelindex );
+		    
+		TextUtils::ColumnText( origindexPtr, 0, &origptr );	
+		origptr.Delete( 0, origindexPtr.Length() );
+		  		  	
+		origchannelindex.Format( KChIndexFormatChList, originalindex+1 );
+		
+		AknTextUtils::LanguageSpecificNumberConversion( origchannelindex );
+		origptr.Insert( 0, origchannelindex ); 
+		iChannelItemArray->InsertL( originalindex, *origchannelItem );
+		iChannelList->HandleItemAdditionL();
+		iChannelList->UpdateScrollBarsL();
+		iChannelList->DrawDeferred();
+		
+		CleanupStack::PopAndDestroy( origchannelItem );
+    	}
+    else
+    	{
+    	index = 0;
+    	iChannelItemArray->InsertL( index, *channelItem );
+	    iChannelList->HandleItemAdditionL(); // Update list
+	    iChannelList->UpdateScrollBarsL();
+	    iChannelList->SetCurrentItemIndex( index );
+		iChannelList->DrawDeferred();
+		
+        ReIndexAllL();
+        }
+    
+    iChannelList->ScrollToMakeItemVisible( index );
+    
+	CleanupStack::PopAndDestroy( channelItem );
+
+	}
+// ---------------------------------------------------------
+// CFMRadioChannelListContainer::MoveUpL
+// ---------------------------------------------------------
+//
+void CFMRadioChannelListContainer::MoveUpL()
+	{
+	TInt index = iChannelList->CurrentItemIndex();
+	TInt originalindex = index;
+	
+	HBufC* channelItem = HBufC::NewLC( KLengthOfChannelItemString );
+	channelItem->Des().Copy( iChannelItemArray->MdcaPoint( index ) );
+	TPtr ptr( channelItem->Des() );	
+	
+	iChannelItemArray->Delete( index );
+    iChannelList->HandleItemRemovalL();
+    
+    if ( 0 == index )
+    	{
+    	index = iChannelItemArray->Count();
+    	
+    	TBuf<KLengthOfChIndexStringChList> channelindex;
+    	    
+	    TPtrC indexPtr( channelindex );
+	    
+	    iChannelItemArray->InsertL( index, *channelItem );
+	    iChannelList->HandleItemAdditionL();
+	    iChannelList->UpdateScrollBarsL();
+
+	    iChannelList->SetCurrentItemIndex( index );
+	    
+	    iChannelList->DrawItem( index ); 
+	    
+        ReIndexAllL();
+    	}
+    else
+    	{
+    	index = index-1; 
+    
+	    TBuf<KLengthOfChIndexStringChList> channelindex;
+	    
+	    TPtrC indexPtr( channelindex );
+	    
+	  	TInt errori = TextUtils::ColumnText( indexPtr, 0, &ptr );
+	  	
+	  	ptr.Delete( 0, indexPtr.Length() );
+	  		  	
+	  	channelindex.Format( KChIndexFormatChList, index+1 );
+	
+	   	AknTextUtils::LanguageSpecificNumberConversion( channelindex );
+	   	ptr.Insert( 0, channelindex ); // Remove icon index
+	
+		iChannelItemArray->InsertL( index, *channelItem );
+	    iChannelList->SetCurrentItemIndex( index );
+	    iChannelList->HandleItemAdditionL();
+	    iChannelList->UpdateScrollBarsL();
+	    iChannelList->DrawItem( index ); 
+		
+		HBufC* origchannelItem = HBufC::NewLC( KLengthOfChannelItemString );
+		origchannelItem->Des().Copy( iChannelItemArray->MdcaPoint( originalindex ) );
+		TPtr origptr( origchannelItem->Des() );	
+		
+		iChannelItemArray->Delete( originalindex );
+	    iChannelList->HandleItemRemovalL();
+	    TBuf<KLengthOfChIndexStringChList> origchannelindex;
+	        
+	    TPtrC origindexPtr( origchannelindex );
+	        
+		TextUtils::ColumnText( origindexPtr, 0, &origptr );	
+		
+		origptr.Delete( 0, origindexPtr.Length() );
+		  		  	
+		origchannelindex.Format( KChIndexFormatChList, originalindex+1 );
+		
+		AknTextUtils::LanguageSpecificNumberConversion( origchannelindex );
+		origptr.Insert( 0, origchannelindex ); 
+		
+		iChannelItemArray->InsertL( originalindex, *origchannelItem );
+		iChannelList->HandleItemAdditionL();
+		iChannelList->DrawDeferred();
+
+		iChannelList->UpdateScrollBarsL();
+		
+		CleanupStack::PopAndDestroy( origchannelItem );
+    	 }
+    
+    iChannelList->ScrollToMakeItemVisible( index );
+    		
+	CleanupStack::PopAndDestroy( channelItem );
+	}
+
+// ---------------------------------------------------------
+// CFMRadioChannelListContainer::ReIndexAllL
+// ---------------------------------------------------------
+//
+void CFMRadioChannelListContainer::ReIndexAllL()
+	{
+	HBufC* channelItem = HBufC::NewLC( KLengthOfChannelItemString );
+			
+	for ( TInt index = 0; index < iChannelItemArray->Count(); index++ )
+		{
+		channelItem->Des().Copy( iChannelItemArray->MdcaPoint( index ) );
+		TPtr ptr( channelItem->Des() );	
+		
+		iChannelItemArray->Delete( index );
+	    iChannelList->HandleItemRemovalL();
+	    
+	    TBuf<KLengthOfChIndexStringChList> channelindex;
+	    
+	    TPtrC indexPtr( channelindex );
+	    
+	  	TInt errori = TextUtils::ColumnText( indexPtr, 0, &ptr );
+	  	
+	  	ptr.Delete( 0, indexPtr.Length() );
+	  		  	
+	  	channelindex.Format( KChIndexFormatChList, index+1 );
+
+	   	AknTextUtils::LanguageSpecificNumberConversion( channelindex );
+	   	
+	   	ptr.Insert( 0, channelindex ); // Remove icon index
+			    
+	    iChannelItemArray->InsertL( index, *channelItem );
+	    
+        iChannelList->HandleItemAdditionL();
+        iChannelList->DrawDeferred();
+        iChannelList->UpdateScrollBarsL();
+		}
+		
+	CleanupStack::PopAndDestroy( channelItem );
+	}
+
+// ---------------------------------------------------------
+// CFMRadioChannelListContainer::HandleDropL
+// ---------------------------------------------------------
+//
+void CFMRadioChannelListContainer::HandleDropL()
+    {
+    iMoveAction = EFalse;
+    
+    if ( iMoveIndex != iChannelList->CurrentItemIndex() )
+        {
+        iObserver.UpdateChannelsL( EMoveChannels, 
+                iMoveIndex, 
+                iChannelList->CurrentItemIndex() );
+        }
+    HideIconsL();
+    iChannelList->DrawDeferred();
+    }
+// ---------------------------------------------------------
+// CFMRadioChannelListContainer::MoveDoneL
+// ---------------------------------------------------------
+//
+void CFMRadioChannelListContainer::MoveDoneL()
+	{
+	if ( iMoveAction )
+		{
+		iMoveAction = EFalse;
+		}
+	
+    iObserver.UpdateChannelsL( EStoreAllToRepository, 0, 0 );
+	}
+
+// ---------------------------------------------------------
+// CFMRadioChannelListContainer::MoveCanceledL
+// ---------------------------------------------------------
+//
+TBool CFMRadioChannelListContainer::MoveCanceledL()
+    {
+    TBool wasmove = EFalse;
+    
+    if ( iMoveAction )
+        {
+        HideIconsL();
+        iMoveAction = EFalse;
+        
+        if ( iKeyMoveActivated )
+            {
+			TInt index = iChannelList->CurrentItemIndex();
+            HBufC* channelItem = HBufC::NewLC( KLengthOfChannelItemString );
+            channelItem->Des().Copy( iChannelItemArray->MdcaPoint( index ) );
+            TPtr ptr( channelItem->Des() );	
+            
+            TBuf<KLengthOfChannelItemIconIndexString> textChIconIndex;
+            TPtrC iconIndexPtr( textChIconIndex );
+            TInt err = TextUtils::ColumnText( iconIndexPtr, 3, &ptr );
+            iChannelItemArray->Delete( index );
+            iChannelList->HandleItemRemovalL();
+            
+            iChannelItemArray->InsertL( iMoveIndex, *channelItem );
+            iChannelList->HandleItemAdditionL();
+            iChannelList->SetCurrentItemIndex( iMoveIndex );
+            CleanupStack::PopAndDestroy( channelItem );
+            iChannelList->ScrollToMakeItemVisible( index );
+            }
+        iChannelList->UpdateScrollBarsL();
+        iChannelList->DrawDeferred();
+        wasmove = ETrue;
+		}
+	
+	return wasmove;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioChannelListContainer::MoveAction()
+// ---------------------------------------------------------
+//
+TBool CFMRadioChannelListContainer::MoveAction()
+	{
+	return iMoveAction;
+	
+	}
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradiochannellistview.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,1102 @@
+/*
+* 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:  Implementation of the class CFMRadioChannelListView
+*
+*/
+
+
+// INCLUDE FILES
+#include <featmgr.h>
+#include <aknViewAppUi.h>
+#include <akntitle.h>
+#include <avkon.hrh>
+#include <avkon.rsg>
+#include <StringLoader.h>
+#include <eikmenup.h>
+#include <eikbtgpc.h>
+#include <fmradio.rsg>
+#include <fmradio.mbg>
+#include <fmradiouids.h>
+#include <AknQueryDialog.h>
+#include <aknnotewrappers.h>
+#include <data_caging_path_literals.hrh>
+#include <aknbutton.h>
+#include <akntoolbar.h>
+
+#include "fmradioengine.h"
+#include "fmradio.hrh"
+#include "fmradiochannellistview.h"
+#include "fmradiochannellistcontainer.h"
+#include "debug.h"
+#include "fmradiordsreceiverbase.h"
+#include "fmradiopubsub.h"
+#include "fmradiofrequencyquerydialog.h"
+#include "fmradioappui.h"
+
+const TInt KMSKControlID(3);
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::NewL
+// Two-phase constructor of CFMRadioChannelListView
+// ---------------------------------------------------------------------------
+//
+CFMRadioChannelListView* CFMRadioChannelListView::NewL(
+    CRadioEngine* aRadioEngine, MChannelListHandler& aObserver )
+    {
+    CFMRadioChannelListView* self = new ( ELeave ) CFMRadioChannelListView( aObserver );
+    CleanupStack::PushL(self);
+    self->ConstructL(aRadioEngine);
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::CFMRadioChannelListView
+//
+// ---------------------------------------------------------------------------
+//
+CFMRadioChannelListView::CFMRadioChannelListView( MChannelListHandler& aObserver ) :
+    iNowPlayingIndex( KErrNotFound ),
+	iObserver( aObserver )	
+	{
+	}
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::ConstructL
+// EPOC two-phased constructor
+// ---------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::ConstructL(
+    CRadioEngine* aRadioEngine)
+    {    
+    iRadioEngine = aRadioEngine;
+    BaseConstructL( R_FMRADIO_CH_LIST_VIEW );
+    PrepareToolbar();
+    
+    if ( !AknLayoutUtils::PenEnabled() )
+        {
+        iToolbar->SetToolbarVisibility( EFalse );
+        }
+       
+    //called here to ensure that empty channels are named in the way we want them to be.
+    InitializeChannelsL();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::~CFMRadioChannelListView
+// Class destructor
+// ---------------------------------------------------------------------------
+//
+CFMRadioChannelListView::~CFMRadioChannelListView()
+    {
+    if ( iContainer )
+        {
+        AppUi()->RemoveFromViewStack( *this, iContainer );
+        }
+    delete iContainer;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::Id
+// Return the unique identifier corresponding to this view
+// ---------------------------------------------------------------------------
+//
+TUid CFMRadioChannelListView::Id() const
+    {
+    return KFMRadioChannelListViewId;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::DoActivateL
+// Activate the channel list view
+// ---------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::DoActivateL(
+    const TVwsViewId& /*aPrevViewId*/,
+    TUid /*aCustomMessageId*/,
+    const TDesC8& /*aCustomMessage*/ )
+    {
+    FTRACE( FPrint( _L("CFMRadioChannelListView::DoActivateL  Start") ) );
+
+    iRadioEngine->RdsReceiver().AddObserver(this);
+    
+    iFirstMoveDone = ETrue;
+
+    SetTitleL( R_FMRADIO_STATIONS_VIEW_TITLE );
+
+    if ( !iContainer )
+        {
+        FTRACE( FPrint( _L("CFMRadioChannelListView::DoActivateL  inside second, not iContainer if") ) );
+        iContainer = CFMRadioChannelListContainer::NewL( ClientRect(), *iRadioEngine, iObserver );
+        iContainer->SetMopParent( this );
+        iContainer->SetObserver( this );
+        AppUi()->AddToStackL( *this, iContainer );
+        }
+    
+    InitializeChannelsL();
+    
+    FadeAndShowExit( iFaded );
+    
+    AppUi()->HandleCommandL( EFMRadioCmdChannelListViewActive );
+    
+    UpdateMiddleSoftKeyL();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::HandleCommandL
+// Interprets view's menu,softkey and other commands and acts
+// accordingly by calling the appropriate command handler
+// function for further action.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::HandleCommandL( TInt aCommand )
+    {
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( AppUi() );
+    switch ( aCommand )
+        {
+    	case EFMRadioCmdMove:
+        	{
+            MoveCurrentItemIndexL();
+        	break;
+        	}
+    	case EFMRadioCmdDone:
+    		{
+    		iMoveMode = EFalse;
+    		iFirstMoveDone = ETrue;
+    		Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_BACK );
+    		
+    		UpdateMiddleSoftKeyL();
+
+    		iContainer->MoveDoneL();
+            TInt currentIndex = 0;
+            currentIndex = appUi->MatchingChannelL( iRadioEngine->GetTunedFrequency() );
+            if ( currentIndex != KErrNotFound )
+                {
+                iRadioEngine->SetCurrentPresetIndex( currentIndex );
+                SetNowPlayingChannel( currentIndex );
+                }
+            ShowToolbar( ETrue );
+    		break;
+    		}
+    	case EFMRadioCmdDrop:
+    		{
+    		iFirstMoveDone = EFalse;
+    		Cba()->SetCommandSetL( R_FMRADIO_SOFTKEYS_GRAP_DONE );    		    		
+    		iContainer->HandleDropL();
+    		break;
+    		}
+    	case EFMRadioCmdGrap:
+    		{
+        	if ( iFirstMoveDone )
+        		{
+                Cba()->SetCommandSetL( R_FMRADIO_SOFTKEYS_DROP_CANCEL );
+        		}
+        	else
+        		{
+                Cba()->SetCommandSetL( R_FMRADIO_SOFTKEYS_DROP_DONE );
+        		}
+        	iContainer->ActivateMoveL();
+        	break;
+    		}
+        case EAknSoftkeyBack:   // Go back to the main view
+            {
+            appUi->ActivateLocalViewL( KFMRadioMainViewId );
+            break;
+            }
+        case EEikBidCancel:
+            {
+            CancelMoveL();
+            break;
+            }
+        case EAknSoftkeySelect: // Save a channel to the highlighted slot
+            {
+            break;
+            }
+        case EFMRadioCmdTuneManually:
+        	{
+        	// If manual tuning is canceled, return to previously tuned frequency. 	
+			TUint32 prevFreq = iRadioEngine->GetTunedFrequency() / KFMRadioFreqMultiplier;
+			TUint32 retFreq = prevFreq;
+			
+			iManualQueryDialog = CFMRadioFrequencyQueryDialog::NewL( retFreq );            
+            iManualQueryDialog->SetObserver( this );
+			
+			TInt res = iManualQueryDialog->ExecuteLD( R_FMRADIO_MANUAL_TUNING_QUERY );
+
+			if ( res )
+				{				
+                if ( iObserver.Channels().Count() < KMaxNumberOfChannelListItems )
+					{
+					TInt usefreq = static_cast<TInt>( retFreq * KFMRadioFreqMultiplier );
+					iRadioEngine->Tune( usefreq );
+					TBuf<KPresetNameLength> stationName;
+					stationName.SetLength( 0 );
+				
+					iObserver.AddChannelToListL( stationName, usefreq );
+					
+					iObserver.UpdateChannelsL( EStoreAllToRepository, 0, 0 );
+					
+					iContainer->AddChannelL( stationName, usefreq, ETrue );	
+					
+                    iRadioEngine->TunePresetL( iObserver.Channels().Count() - 1 );
+					
+					TInt index = iRadioEngine->GetPresetIndex();
+					
+					iContainer->UpdateItemIconL( index, KNowPlayingIconIndexChList );
+					
+                    iContainer->UpdateLastListenedChannel( index ); // Update index
+					}
+				else
+					{
+					// Show icon, or overwrite last item, or selected item?
+					CAknInformationNote* infonote = new( ELeave ) CAknInformationNote();
+			    	
+				    HBufC* noteText = StringLoader::LoadLC( 
+				    		R_QTN_FMRADIO_LIST_QUERY_LIST_FULL, iCoeEnv );
+				    
+				    
+				    infonote->ExecuteLD( *noteText );
+				    	   
+				    CleanupStack::PopAndDestroy( noteText );					
+					}					
+				}
+			else //cancel pressed, return to previous frequency
+				{
+				iRadioEngine->Tune( static_cast<TInt>( prevFreq * KFMRadioFreqMultiplier ) );				
+				}
+        	break;
+        	}
+        case EFMRadioCmdListenCh:
+            {
+            if ( !AknLayoutUtils::PenEnabled() )
+                {
+                appUi->HandleCommandL( aCommand );
+                // update msk here
+                UpdateMiddleSoftKeyL();
+                }
+            if ( iMoveMode )
+                {
+                MoveActionDoneL();
+                }
+            break;
+            }
+        case EFMRadioToolbarButtonCmdToggleIhf:
+            {
+            if ( iRadioEngine->GetAudioOutput() == CRadioEngine::EFMRadioOutputHeadset )
+                {
+                appUi->HandleCommandL( EFMRadioCmdActivateIhf );
+                }
+            else
+                {
+                appUi->HandleCommandL( EFMRadioCmdDeactivateIhf );
+                }
+            break;
+            }
+        case EFMRadioCmdErase:
+            {
+            if ( iObserver.Channels().Count() > 0 )
+                {
+                TInt selectedIndex = CurrentlySelectedChannel();
+                
+                if ( appUi->EraseChannelL( selectedIndex ) )
+                    {
+                    if ( iContainer )
+                        {
+                        iContainer->RemoveChannelL( selectedIndex );
+                        }
+                    // Dim the rename and delete buttons in case the list is now empty
+                    UpdateToolbar();
+                    }
+                }
+            break;
+            }
+        default: // Send all other commands to AppUi
+        	{        		        	
+        	appUi->HandleCommandL( aCommand );
+            break;
+        	}
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::SetLastListenedChannel
+// Keep track of the last selected channel
+// ---------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::SetLastListenedChannel( TInt aIndex )
+    {
+    iChIndex = aIndex;
+    if ( iContainer && !iMoveMode )
+        {
+        iContainer->UpdateLastListenedChannel( aIndex ); // Update index
+        }
+    }
+    
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::SetNowPlayingChannel
+// Keep track of the current selected channel
+// ---------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::SetNowPlayingChannel( TInt aChannelIndex ) 
+    {
+    iNowPlayingIndex = aChannelIndex;
+    
+    if ( iContainer && !iMoveMode )
+        {
+        TRAP_IGNORE( iContainer->UpdateItemIconL( aChannelIndex, KNowPlayingIconIndexChList ) )
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::CurrentlyPlayingChannel
+// Returns the index of the playing channel item from the channel list.
+// ---------------------------------------------------------------------------
+//
+TInt CFMRadioChannelListView::CurrentlyPlayingChannel()
+	{
+	return iNowPlayingIndex;
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::InitializeChannelsL
+// Initialize the channels with the values currently saved in
+// the radio engine
+// ---------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::InitializeChannelsL()
+    {
+    FTRACE( FPrint( _L("CFMRadioChannelListView::InitializeChannelsL  Start") ) );
+    
+    if ( iContainer )
+        {
+        TBool nowPlaying = EFalse;
+        
+        RPointerArray<CFMRadioPreset>& channels = iObserver.Channels();        
+        TInt channelCount = channels.Count();
+        
+        for ( TInt channelIndex = 0; channelCount > channelIndex; channelIndex++ )
+            {
+            FTRACE( FPrint( _L("CFMRadioChannelListView::InitializeChannelsL  inside Channel in use") ) );
+
+            iContainer->AddChannelL( channels[ channelIndex ]->PresetName(),
+                   channels[ channelIndex ]->PresetFrequency(),
+                   nowPlaying );
+            
+            UpdateMiddleSoftKeyL();
+            FTRACE( FPrint( _L("CFMRadioChannelListView::InitializeChannelsL  inside Channel in use Channel = %d"), iRadioEngine->GetPresetFrequencyL( channelIndex )) );
+            }
+        
+        CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( AppUi() );
+        
+        TInt currentPresetIndex = iRadioEngine->GetPresetIndex();
+        TInt chIndexForTunedFreq = appUi->MatchingChannelL( iRadioEngine->GetTunedFrequency() );
+        
+        if ( iRadioEngine->GetRadioMode() == CRadioEngine::ERadioPresetMode &&
+                currentPresetIndex < channelCount &&
+                currentPresetIndex >= 0 )
+            {
+            SetLastListenedChannel( currentPresetIndex );
+            SetNowPlayingChannel( currentPresetIndex );
+            }
+        else if ( chIndexForTunedFreq != KErrNotFound )
+            {
+            SetLastListenedChannel( chIndexForTunedFreq );
+            SetNowPlayingChannel( chIndexForTunedFreq );
+            }
+        else
+            {
+            SetLastListenedChannel( 0 );
+            }
+        }
+    FTRACE(FPrint(_L("InitializeChannelsL complete")));
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::ChannelInPlay
+// Return true/false to indicate whether the channel specified
+// is in play
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioChannelListView::ChannelInPlay(
+    TInt aChannelIndex ) const
+    {
+    if( aChannelIndex == iNowPlayingIndex )
+    	{
+    	return ETrue;
+    	}
+    else 
+    	{
+    	return EFalse;
+    	}
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::FadeAndShowExit
+// Fade the view and all controls associated with it. Change
+// the soft keys so that "Exit" is displayed
+// ---------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::FadeAndShowExit( TBool aFaded )
+    {
+    iFaded = aFaded;
+    if( iContainer && iToolbar )
+        {
+        if ( aFaded ) // Fade
+            {
+            // In case options menu is open when headset is disconnected
+            StopDisplayingMenuBar();
+            iContainer->SetFaded( aFaded );
+            iToolbar->SetDimmed( ETrue );
+            TRAP_IGNORE( Cba()->SetCommandSetL( R_FMRADIO_SOFTKEYS_EXIT ) );
+            }
+        else
+            {
+            iContainer->SetFaded(aFaded);
+            iToolbar->SetDimmed( EFalse );
+            UpdateToolbar();
+            
+            if ( iMoveMode )
+                {
+                TRAP_IGNORE
+                    (
+                    Cba()->SetCommandSetL( R_FMRADIO_SOFTKEYS_EMPTY_CANCEL );
+                    UpdateMiddleSoftKeyL();
+                    )
+                }
+            else
+                {
+                TRAP_IGNORE( Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_BACK ) );
+                }
+            }
+        Cba()->DrawDeferred();
+        iToolbar->DrawDeferred();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::UpdateDisplayForFocusGained
+// Update the view after a focus gained event.
+// 1. Fade/Unfade view
+// 2. Update MSK label
+// ---------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::UpdateDisplayForFocusGained()
+    {
+    FadeAndShowExit( iFaded );
+    
+    // Don't display MSK if display is faded.
+    if ( !iFaded )
+    	{
+    	TRAP_IGNORE( UpdateMiddleSoftKeyL() );
+    	}
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::UpdateChannelListContentL
+// Make a request to the channel container to update the
+// content of the channel at aIndex with the values specified
+// ---------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::UpdateChannelListContentL(
+    TInt aIndex,
+    const TDesC& aChannelName,
+    TInt aChannelFrequency )
+    {
+    if ( iContainer )
+        {
+        iContainer->UpdateChannelListContentL( aIndex, aChannelName, aChannelFrequency );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::CurrentlySelectedChannel
+// Returns the index of the selected channel item from the
+// channel list. If the container is active get the info from
+// it, because it may have more up-to-date info.
+// ---------------------------------------------------------------------------
+//
+TInt CFMRadioChannelListView::CurrentlySelectedChannel()
+    {
+    if ( iContainer )
+        {
+        iChIndex = iContainer->CurrentlySelectedChannel();
+        }
+    return iChIndex;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::NextChannel
+// Retrieve the index of the next channel that has been set.
+// ---------------------------------------------------------------------------
+//
+TInt CFMRadioChannelListView::NextChannel()
+    {
+    if ( iContainer )
+        {
+        iChIndex = iContainer->CurrentlySelectedChannel();
+        }
+    else
+        {
+        iChIndex = iRadioEngine->GetPresetIndex();
+        }
+
+    iChIndex = iChIndex + 1;
+    
+    if ( iChIndex >= iObserver.Channels().Count() )
+    	{
+    	iChIndex = 0;
+    	}
+    
+    return iChIndex;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::PreviousChannel
+// Retrieve the index of the previous channel that has been set.
+// ---------------------------------------------------------------------------
+//
+TInt CFMRadioChannelListView::PreviousChannel()
+    {
+    if ( iContainer )
+        {
+        iChIndex = iContainer->CurrentlySelectedChannel();
+        }
+    else
+        {
+        iChIndex = iRadioEngine->GetPresetIndex();
+        }
+    
+        
+    if ( iChIndex <= 0 )
+    	{
+    	iChIndex = iObserver.Channels().Count() - 1;
+    	}
+    else
+    	{
+    	iChIndex = iChIndex - 1;
+    	}
+    
+    return iChIndex;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::HandleControlEventL
+// Handles control event observing. In this case the interest
+// is only on the channel selection from the channel list.
+// Other events are not reported by the container,
+// ---------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::HandleControlEventL( CCoeControl* aControl, TCoeEvent aEventType )
+    {
+    if ( aControl == iContainer )
+        {
+        // don't change channels in move mode
+        if ( !iMoveMode )
+            {
+            if ( aEventType == MCoeControlObserver::EEventRequestFocus )
+                {
+                // Don't display MSK when display is faded.
+                if ( !iFaded )
+                    {
+                    if ( !AknLayoutUtils::PenEnabled() )
+                        {
+                        UpdateMiddleSoftKeyL();
+                        }
+                    else
+                        {
+                        AppUi()->HandleCommandL( EFMRadioCmdListenCh );
+                        }
+                     }
+                }
+        
+            else if ( aEventType == MCoeControlObserver::EEventStateChanged )
+                    {
+                    // Send command to Ui
+                    AppUi()->HandleCommandL( EFMRadioCmdListenCh );
+                    }
+            }
+        }
+    
+    else if ( iManualQueryDialog && aControl == iManualQueryDialog && aEventType == MCoeControlObserver::EEventStateChanged )
+        {
+        TUint32 newFreq = static_cast<CFMRadioFrequencyQueryDialog*>( iManualQueryDialog )->Frequency();
+        iRadioEngine->Tune( static_cast<TInt>( newFreq * KFMRadioFreqMultiplier ) );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::DoDeactivate
+// Deactivate the channel list view
+// ---------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::DoDeactivate()
+    {
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>(AppUi());
+    if ( appUi->RadioEngine() )
+        {
+        iRadioEngine->RdsReceiver().RemoveObserver( this );
+        }
+    
+    if ( iContainer )
+        {
+        appUi->RemoveFromViewStack( *this, iContainer );
+        }
+    delete iContainer;
+    iContainer = NULL;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::DynInitMenuPaneL
+// Sets the state of menu items dynamically according to the
+// state of application data.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
+    {
+    if ( aResourceId == R_FMRADIO_CH_LIST_OPTIONS_MENU ) // Main menu
+        {
+        if ( iRadioEngine->IsAudioRoutingPossible() )
+            {
+            if ( iRadioEngine->GetAudioOutput() == CRadioEngine::EFMRadioOutputIHF )
+                {
+                // Delete existing menu option and add a new one
+                aMenuPane->DeleteMenuItem( EFMRadioCmdActivateIhf );
+                if ( iRadioEngine->IsHeadsetConnected() )
+                    {
+                    aMenuPane->SetItemTextL( EFMRadioCmdDeactivateIhf, R_QTN_FMRADIO_OPTIONS_DEACTIVATE );
+                    }
+                }
+            else
+                {
+                // Delete existing menu option and add a new one
+                aMenuPane->DeleteMenuItem( EFMRadioCmdDeactivateIhf );
+                aMenuPane->SetItemTextL( EFMRadioCmdActivateIhf, R_QTN_FMRADIO_OPTIONS_ACTIVATE );
+                }
+            }
+        else
+            {
+            aMenuPane->SetItemDimmed( EFMRadioCmdDeactivateIhf, ETrue );
+            aMenuPane->SetItemDimmed( EFMRadioCmdActivateIhf, ETrue );
+            }
+        
+        // if help is not enabled, disable help option
+        if ( !FeatureManager::FeatureSupported( KFeatureIdHelp ) )
+            {
+            aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue );
+            }
+        
+        TInt channelCount = iObserver.Channels().Count();
+        
+        // don't show stylus pop-up menu during move operation
+        if ( channelCount > 1 && !iMoveMode )
+            {
+            aMenuPane->SetItemDimmed( EFMRadioCmdMove, EFalse );
+            }
+        else
+            {
+            aMenuPane->SetItemDimmed( EFMRadioCmdMove, ETrue );
+            }
+        
+        if ( iMoveMode || channelCount < 1 )
+            {
+            // hide rename and erase 
+            aMenuPane->SetItemDimmed( EFMRadioCmdRename, ETrue );
+            aMenuPane->SetItemDimmed( EFMRadioCmdErase, ETrue );
+            }
+        else
+            {
+            aMenuPane->SetItemDimmed( EFMRadioCmdRename, EFalse );
+            aMenuPane->SetItemDimmed( EFMRadioCmdErase, EFalse );
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioChannelListView::LayoutChangedL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::LayoutChangedL( TInt aType )
+    {
+    if ( iContainer )
+        {
+        iContainer->SetRect( ClientRect() );
+        iContainer->HandleResourceChange( aType );
+        }
+    }
+
+// ---------------------------------------------------------------------------------------------
+// Sets middle softkey label.
+// ---------------------------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::SetMiddleSoftKeyLabelL(
+    TInt aResourceId,
+    TInt aCommandId )
+    {
+
+    CEikButtonGroupContainer* cbaGroup = Cba();
+    if ( cbaGroup )
+        {
+        cbaGroup->RemoveCommandFromStack( KMSKControlID, iCurrentMSKCommandId );
+        HBufC* middleSKText = StringLoader::LoadLC( aResourceId, iCoeEnv );
+        TPtr mskPtr = middleSKText->Des();
+        cbaGroup->AddCommandToStackL(
+            KMSKControlID,
+            aCommandId,
+            mskPtr );
+        CleanupStack::PopAndDestroy( middleSKText );
+        iCurrentMSKCommandId = aCommandId;
+        }
+    }
+
+// ---------------------------------------------------------------------------------------------
+// Updates the middle softkey functionality.
+// ---------------------------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::UpdateMiddleSoftKeyL()
+    {
+    
+    if ( ( iContainer && 
+    		( iContainer->CurrentlySelectedChannel() == iRadioEngine->GetPresetIndex() 
+    		|| iObserver.Channels().Count() == 0 ) ) || 
+    		iMoveMode )
+    	{
+    	SetMiddleSoftKeyLabelL(R_QTN_FMRADIO_NONE, EFMRadioCmdListenCh);
+    	}
+    else
+    	{
+    	SetMiddleSoftKeyLabelL(R_QTN_FMRADIO_MSK_LISTEN, EFMRadioCmdListenCh);
+    	}
+    }
+
+// -----------------------------------------------------------------------------------------------
+// CFMRadioChannelListView::SetEmptyChannelListItem
+// Set empty channel list item when preset is deleted from fmradiopresetutility
+// -----------------------------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::SetEmptyChannelListItemL( const TInt aIndex ) const
+	{
+	FTRACE( FPrint( _L("CFMRadioChannelListView::SetEmptyChannelListItem index = %d"), aIndex ) );
+	
+	if ( iContainer )
+		{					
+	    iContainer->RemoveChannelL( aIndex );	    	    
+	    }
+
+	// Dim the rename and delete buttons in case the list is now empty
+	UpdateToolbar();
+	}
+
+// -----------------------------------------------------------------------------------------------
+// CFMRadioChannelListView::RdsDataProgrammeService
+// 
+// -----------------------------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::RdsDataProgrammeService( const TDesC& /*aProgramService*/ )
+	{
+	}
+
+// --------------------------------------------------------------------------------
+// CFMRadioChannelListView::RdsDataPsNameIsStatic
+// --------------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::RdsDataPsNameIsStatic( TBool aStatic )
+    {
+    const TDesC& programmeService = iRadioEngine->RdsReceiver().ProgrammeService();
+    if ( iContainer && 
+            aStatic && 
+            programmeService.Length() &&
+            !iMoveMode )
+        {
+        TInt currentPresetIx = iRadioEngine->GetPresetIndex();
+        // When we haven't preset name, ps name will save as preset name
+        if ( iRadioEngine->GetRadioMode() == CRadioEngine::ERadioPresetMode &&
+                currentPresetIx != KErrNotFound )
+            {
+            RPointerArray<CFMRadioPreset>& channels = iObserver.Channels();
+            
+            // this checks that index is not out of bound and cause -21 error during update
+            if ( currentPresetIx < channels.Count() )
+                {
+                const TDesC& stationName = channels[ currentPresetIx ]->PresetName();
+                TInt presetFreq = channels[ currentPresetIx ]->PresetFrequency();
+                                
+                if ( stationName.Length() == 0 ) //Set and save PSname only if no name set before
+                    {
+                    TRAP_IGNORE(
+                        {
+                        iContainer->UpdateChannelListContentL( currentPresetIx,
+                                programmeService,
+                                presetFreq );
+
+                        iRadioEngine->SetPresetNameFrequencyL( currentPresetIx, programmeService, presetFreq );
+                        channels[ currentPresetIx ]->SetPresetNameL( programmeService );
+                        } )
+                    }
+                }
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainView::PrepareToolbar
+// Prepare toolbar for displaying basic radio command buttons
+// --------------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::PrepareToolbar()
+    {
+    // get toolbar from view
+    iToolbar = Toolbar();
+    // Set observer
+    iToolbar->SetToolbarObserver( this );
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainView::UpdateToolbar
+// Set the dimmed status of buttons according to list state
+// --------------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::UpdateToolbar() const
+    {
+    if ( iContainer && iToolbar && AknLayoutUtils::PenEnabled() )
+        {
+        if ( iRadioEngine->IsAudioRoutingPossible() )
+            {
+            if ( iRadioEngine->IsHeadsetConnected() )
+                {
+                CAknButton* centerButton = NULL;    
+                centerButton = static_cast<CAknButton*>( iToolbar->ControlOrNull( EFMRadioToolbarButtonCmdToggleIhf ) );
+
+                iToolbar->SetItemDimmed( EFMRadioToolbarButtonCmdToggleIhf, EFalse, ETrue );
+                
+                if ( iRadioEngine->GetAudioOutput() == CRadioEngine::EFMRadioOutputIHF )
+                    {
+                    if ( centerButton )
+                        {
+                        centerButton->SetCurrentState( 1, ETrue );
+                        }
+                    }
+                else
+                    {
+                    if ( centerButton )
+                        {
+                        centerButton->SetCurrentState( 0, ETrue );
+                        }
+                    }
+                }
+            else
+                {
+                iToolbar->SetItemDimmed( EFMRadioToolbarButtonCmdToggleIhf, ETrue, ETrue );
+                }
+            }
+        else
+            {
+            iToolbar->SetItemDimmed( EFMRadioToolbarButtonCmdToggleIhf, ETrue, ETrue );
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioChannelListView::OfferToolbarEventL
+// Handle commands from toolbar.
+// --------------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::OfferToolbarEventL( TInt aCommandId )
+    {
+    HandleCommandL( aCommandId );
+    }
+
+// ---------------------------------------------------------
+// CFMRadioChannelListView::ShowToolbar
+// Sets toolbar visibility.
+// ---------------------------------------------------------
+//
+void CFMRadioChannelListView::ShowToolbar( TBool aVisible )
+    {
+    if ( AknLayoutUtils::PenEnabled() &&
+         iToolbar &&
+         iContainer )
+        {
+        iToolbar->SetToolbarVisibility( aVisible );
+        iToolbar->UpdateBackground();
+        iToolbar->DrawDeferred();
+        // set correct container rect with or without toolbar
+        iContainer->SetRect( ClientRect() );
+        }
+    }
+
+
+// -----------------------------------------------------------------------------------------------
+// CFMRadioChannelListView::RdsDataRadioText
+// From MFMRadioRdsObserver, implementation not needed.
+// -----------------------------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::RdsDataRadioText( const TDesC& /*aRadioText*/ ){}
+
+void CFMRadioChannelListView::RdsDataRadioTextPlus( const TInt aRTPlusClass, const TDesC& aRadioText )
+    {
+    if ( aRTPlusClass == ERTplusProgramHomepage &&
+            iRadioEngine->GetRadioMode() == CRadioEngine::ERadioPresetMode )
+        {
+        TInt currentPresetIx = iRadioEngine->GetPresetIndex();
+        if ( currentPresetIx < iObserver.Channels().Count() )
+            {
+            TRAP_IGNORE
+                (
+                // save permanently
+                iRadioEngine->SaveUrlToPresetL( currentPresetIx, aRadioText );
+                // save to ui list
+                iObserver.Channels()[ currentPresetIx ]->SetPresetUrlL( aRadioText );
+                )
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------------------------
+// CFMRadioChannelListView::RdsAfSearchBegin
+// From MFMRadioRdsObserver, implementation not needed.
+// -----------------------------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::RdsAfSearchBegin(){}
+
+// -----------------------------------------------------------------------------------------------
+// CFMRadioChannelListView::RdsAfSearchEnd
+// From MFMRadioRdsObserver, implementation not needed.
+// -----------------------------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::RdsAfSearchEnd( TUint32 /* aFrequency*/, TInt /*aError*/ ){}
+
+// -----------------------------------------------------------------------------------------------
+// CFMRadioChannelListView::RdsAfSearchStateChange
+// From MFMRadioRdsObserver, implementation not needed.
+// -----------------------------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::RdsAfSearchStateChange( TBool /* aEnabled*/ ){}
+
+// -----------------------------------------------------------------------------------------------
+// CFMRadioChannelListView::RdsAvailable
+// From MFMRadioRdsObserver, implementation not needed.
+// -----------------------------------------------------------------------------------------------
+//
+void CFMRadioChannelListView::RdsAvailable( TBool /*aAvailable*/ ){}
+
+// ---------------------------------------------------------
+// CFMRadioChannelListView::SetTitleL
+// ---------------------------------------------------------
+//
+void CFMRadioChannelListView::SetTitleL( TInt aResourceId )
+    {
+    HBufC* title = StringLoader::LoadLC( aResourceId, iCoeEnv );
+    static_cast<CAknTitlePane*>( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) )->SetTextL( *title, ETrue );
+    CleanupStack::PopAndDestroy( title );
+    }
+
+
+// ---------------------------------------------------------
+// CFMRadioChannelListView::MoveCurrentItemIndexL
+// ---------------------------------------------------------
+//
+void CFMRadioChannelListView::MoveCurrentItemIndexL()
+    {
+    iMoveMode = ETrue;
+    
+    Cba()->SetCommandSetL( R_FMRADIO_SOFTKEYS_EMPTY_CANCEL );
+    UpdateMiddleSoftKeyL();
+    ShowToolbar( EFalse );
+    
+    iContainer->HideIconsL();
+
+    iContainer->ActivateMoveL();
+    }
+
+// ---------------------------------------------------------
+// CFMRadioChannelListView::MoveActionDoneL
+// ---------------------------------------------------------
+//
+void CFMRadioChannelListView::MoveActionDoneL()
+    {
+    iMoveMode = EFalse;
+    iFirstMoveDone = ETrue;
+    Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_BACK );
+    
+    UpdateMiddleSoftKeyL();
+    iContainer->HandleDropL();
+    iContainer->MoveDoneL();
+    
+    TInt currentIndex = 0;    
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( AppUi() );
+    currentIndex = appUi->MatchingChannelL( iRadioEngine->GetTunedFrequency() );
+    
+    if ( currentIndex != KErrNotFound )
+        {
+        iRadioEngine->SetCurrentPresetIndex( currentIndex );
+        SetNowPlayingChannel( currentIndex );
+        }
+    ShowToolbar( ETrue );
+    }
+
+// ---------------------------------------------------------
+// CFMRadioChannelListView::CancelMoveL
+// ---------------------------------------------------------
+//
+void CFMRadioChannelListView::CancelMoveL()
+    {
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( AppUi() );
+    TBool viewActive = appUi->ActiveView() == KFMRadioChannelListViewId && iContainer;
+    if ( viewActive && ( iContainer->MoveCanceledL() || iMoveMode ) )
+        {
+        iMoveMode = EFalse;
+        iFirstMoveDone = ETrue;
+        iContainer->ReIndexAllL();
+        Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_BACK );
+        UpdateMiddleSoftKeyL();
+        TInt currentIndex = 0;
+        currentIndex = appUi->MatchingChannelL( iRadioEngine->GetTunedFrequency() );
+        if ( currentIndex != KErrNotFound )
+            {
+            SetNowPlayingChannel( currentIndex );
+            }
+        ShowToolbar( ETrue );
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioChannelListView::StopSeekL
+// ---------------------------------------------------------
+//
+void CFMRadioChannelListView::StopSeekL()
+    {
+    // update icon if radio is in tuner mode i.e.
+    // "accessory seek up/down" is launched
+    if ( iContainer &&
+            iRadioEngine->GetRadioMode() == CRadioEngine::ERadioTunerMode )
+        {
+        CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( AppUi() );
+        TInt tunedFrequency = iRadioEngine->GetTunedFrequency();
+        const TInt index = appUi->MatchingChannelL( tunedFrequency );
+
+        if ( index == KErrNotFound )
+            {
+            // frequency is not saved, hide now playing icon
+            iContainer->HideIconsL();
+            }
+        else
+            {
+            SetNowPlayingChannel( index );
+            SetLastListenedChannel( index );
+            }
+        }
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradiocontroleventobserverimpl.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,254 @@
+/*
+* 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:  Implementation for the control event observer.
+*
+*/
+
+#include <aknViewAppUi.h>
+#include "fmradiocontroleventobserverimpl.h"
+
+#include "fmradio.hrh"
+// ---------------------------------------------------------------------------
+// C++ default constructor can NOT contain any code, that might leave.
+// ---------------------------------------------------------------------------
+//
+CFMRadioControlEventObserverImpl::CFMRadioControlEventObserverImpl( CFMRadioAppUi& aAppUi )
+        : iAppUi( aAppUi )
+    {
+    
+    }
+
+
+// ---------------------------------------------------------------------------
+// EPOC default constructor can leave.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::ConstructL()
+    {
+    }
+
+
+// ---------------------------------------------------------------------------
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CFMRadioControlEventObserverImpl* CFMRadioControlEventObserverImpl::NewL( 
+        CFMRadioAppUi& aAppUi )
+    {
+    CFMRadioControlEventObserverImpl* self = 
+        new( ELeave ) CFMRadioControlEventObserverImpl( aAppUi );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+    
+// ---------------------------------------------------------------------------
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CFMRadioControlEventObserverImpl::~CFMRadioControlEventObserverImpl()
+    {  
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::StepToChannelL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::StepToChannelL( TFMRadioTuneDirection aDirection )
+	{
+	CAknViewAppUi* appUi = static_cast<CAknViewAppUi*>( CCoeEnv::Static()->AppUi() );
+	if( aDirection == EFMRadioDown )
+	    {
+	    appUi->HandleCommandL( EFMRadioCmdPrevChannel );
+	    }
+	else if( aDirection == EFMRadioUp )
+	    {
+	    appUi->HandleCommandL( EFMRadioCmdNextChannel );
+	    }
+	else
+	    {
+	    }
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::SetChannelL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::SetChannelL( TInt /*aChannelId*/ )
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::SeekL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::SeekL( TFMRadioTuneDirection /*aDirection*/ )
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::StepToFrequencyL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::StepToFrequencyL( TFMRadioTuneDirection /*aDirection*/ )
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::SetFrequencyL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::SetFrequencyL( TUint32 /*aFreq*/ )
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::AdjustVolumeL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::AdjustVolumeL( TFMRadioVolumeSetDirection /*aDirection*/ )
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::MuteL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::MuteL( TBool /*aMute*/ )
+	{
+	CAknViewAppUi* appUi = static_cast<CAknViewAppUi*>( CCoeEnv::Static()->AppUi() );
+	TRAP_IGNORE( appUi->HandleCommandL( EFMRadioCmdMute ) );
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::PlayL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::PlayL( TBool /*aDownPressed*/ )
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::PauseL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::PauseL(TBool /*aDownPressed*/ )
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::PausePlayL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::PausePlayL( TBool /*aDownPressed*/ )
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::StopL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::StopL( TBool /*aDownPressed*/ )
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::ForwardL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::ForwardL( TBool /*aDownPressed*/ )
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::FastForwardL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::FastForwardL( TBool /*aDownPressed*/ )
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::BackwardL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::BackwardL( TBool /*aDownPressed*/ )
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::RewindL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::RewindL( TBool /*aDownPressed*/ )
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::ChannelUpL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::ChannelUpL( TBool /*aDownPressed*/ )
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::ChannelDownL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::ChannelDownL( TBool /*aDownPressed*/ )
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::VolumeUpL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::VolumeUpL( TBool /*aDownPressed*/ )
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::VolumeDownL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::VolumeDownL( TBool /*aDownPressed*/ )
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::ChangeViewL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::ChangeViewL(TUid /*aViewId*/, TBool /*aForceChange*/)
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::SetAudioOutputDestinationL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::SetAudioOutputDestinationL(TFMRadioOutputDestination /*aDestination*/)
+{
+}
+
+// ---------------------------------------------------------------------------
+// CFMRadioControlEventObserverImpl::AnswerEndCallL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioControlEventObserverImpl::AnswerEndCallL()    
+{
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradiodocument.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,67 @@
+/*
+* 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:  Implementation of the CFMRadioDocument class, which
+*                      handles application data serialization. Owns the Ui 
+*                      (controller) and the engine (model)
+*
+*/
+
+
+// INCLUDE FILES
+#include "fmradiodocument.h"
+#include "fmradioappui.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CFMRadioDocument::CFMRadioDocument
+// Constructor
+// ---------------------------------------------------------
+//
+CFMRadioDocument::CFMRadioDocument( CEikApplication& aApp )
+: CAknDocument( aApp )    
+    {
+    }
+
+// ---------------------------------------------------------
+// CFMRadioDocument::~CFMRadioDocument
+// Class destructor
+// ---------------------------------------------------------
+//
+CFMRadioDocument::~CFMRadioDocument()
+    {
+    }
+
+// ---------------------------------------------------------
+// CFMRadioDocument::NewL
+// Two-phase constructor of CFMRadioDelayTimer
+// ---------------------------------------------------------
+//
+CFMRadioDocument* CFMRadioDocument::NewL( CEikApplication& aApp )
+    {
+    CFMRadioDocument* self = new ( ELeave ) CFMRadioDocument( aApp );
+    return self;
+    }
+    
+// ----------------------------------------------------
+// CFMRadioDocument::CreateAppUiL
+// constructs CFMRadioAppUi
+// ----------------------------------------------------
+//
+CEikAppUi* CFMRadioDocument::CreateAppUiL()
+    {
+    return new ( ELeave ) CFMRadioAppUi;
+    }
+
+// End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradiofrequencyeditor.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,869 @@
+/*
+* 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:  Custom editor for editing radio frequencies.
+*
+*/
+
+
+#include <AknUtils.h>
+#include <barsread.h>
+#include <coemain.h>
+#include <e32base.h>
+#include <eikfctry.h>
+
+#include "fmradiofrequencyeditor.h"
+#include "fmradioengineradiosettings.h"
+#include "fmradioappui.h"
+#include "fmradiofrequencynumber.h"
+#include "fmradio.hrh"
+#include "debug.h"
+
+const TInt KNumFields = 3;        // Number of fields.
+const TInt KIntField = 0;        // Index of integer field.
+const TInt KDecField = 2;        // Index of decimal field.
+
+const TInt KFMRadioAbsoluteMinimumIntFieldValue = 0;
+const TInt KFMRadioAbsoluteMinimumDecFieldValue = 0;
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioFrequencyEditor::CFMRadioFrequencyEditor
+// ---------------------------------------------------------------------------
+//
+CFMRadioFrequencyEditor::CFMRadioFrequencyEditor() :
+        iMinFreq( 0 ),
+        iMaxFreq( 0 ),
+        iPreviousField( KErrNotFound ), 
+        iTypedInDecField( EFalse ),
+        iValidToReport( EFalse ),
+        iDecDiv( KFMRadioFreqMultiplier ),
+        iReportEditorState ( ETrue )
+    {
+    }
+
+
+// ---------------------------------------------------------------------------
+// Editor is contructed via this static method by the control framework.
+// ---------------------------------------------------------------------------
+//
+SEikControlInfo CFMRadioFrequencyEditor::StaticCreateCustomEditor( 
+        TInt aIdentifier )
+    {
+    FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyEditor::StaticCreateCustomEditor") ) );
+    SEikControlInfo customInfo;
+    // zero all variables
+    Mem::FillZ( &customInfo, sizeof( SEikControlInfo ) ); 
+    if ( aIdentifier == EFMRadioFrequencyEditor )
+        {
+        customInfo.iControl = new CFMRadioFrequencyEditor;
+        }
+    return customInfo;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioFrequencyEditor::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioFrequencyEditor::ConstructL( const TUint32 aFlags )
+    {
+    // Creates space for the fiels in this MFNE.
+    CreateFieldArrayL( KNumFields );
+
+    // RadioSettings values are so widely used in this class, that it is 
+    // better to read them into member variables.
+    CRadioEngine* radioEngine = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() )->RadioEngine();
+    TInt minFreq = 0;
+    TInt maxFreq = 0;
+    radioEngine->GetFrequencyBandRange( minFreq, maxFreq );
+    iMinFreq = minFreq / KFMRadioFreqMultiplier;
+    iMaxFreq = maxFreq / KFMRadioFreqMultiplier;
+    iStepFreq = radioEngine->FrequencyStepSize();
+    // Maximum values of fields.
+    TInt maxIntFieldValue( 0 );
+    TInt maxIntFreq = iMaxFreq / KFMRadioFreqMultiplier;
+    while ( maxIntFieldValue < maxIntFreq )
+        {
+        maxIntFieldValue = maxIntFieldValue*10 + 9;
+        }
+    TInt maxDecFieldValue( 0 );
+    TInt decimalCounter = radioEngine->DecimalCount();
+    while ( decimalCounter-- )
+        {
+        maxDecFieldValue = maxDecFieldValue*10 + 9;
+        // Calculate also the decimal divider for later use.
+        iDecDiv = iDecDiv / 10;
+        }
+
+    // Integer field. Ownership transfers.
+    CFMRadioFrequencyNumber* field = CFMRadioFrequencyNumber::NewL( *Font(), 
+        KFMRadioAbsoluteMinimumIntFieldValue, maxIntFieldValue, 
+        KFMRadioAbsoluteMinimumIntFieldValue, aFlags );
+    field->SetDigitType( AknTextUtils::NumericEditorDigitType(), *Font() );
+    AddField( field );
+
+    // Decimal separator field. Ownership transfers.
+    HBufC* delim = HBufC::NewLC( 1 );
+    TLocale loc;
+    delim->Des().Append( loc.DecimalSeparator() );
+    AddField( CEikMfneSeparator::NewL( delim ) );
+    CleanupStack::Pop(); // delim
+
+    // Decimal field. Ownership transfers.
+    field = CFMRadioFrequencyNumber::NewL( *Font(), KFMRadioAbsoluteMinimumDecFieldValue, 
+        maxDecFieldValue, KFMRadioAbsoluteMinimumDecFieldValue, 
+        aFlags | CEikMfneNumber::EFillWithLeadingZeros );
+    field->SetDigitType( AknTextUtils::NumericEditorDigitType(), *Font() );
+    AddField( field );
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioFrequencyEditor::~CFMRadioFrequencyEditor
+// ---------------------------------------------------------------------------
+//
+CFMRadioFrequencyEditor::~CFMRadioFrequencyEditor()
+    {    
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioFrequencyEditor::SetFrequency
+// ---------------------------------------------------------------------------
+//
+void CFMRadioFrequencyEditor::SetFrequency( const TUint32 aFreq )
+    {
+    FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyEditor::SetFrequency (aFreq=%d) "), aFreq ) );
+    TUint32 freq = aFreq;
+    if ( ( iMinFreq != 0 ) && ( iMaxFreq != 0 ) )
+        {
+        if ( freq < iMinFreq )
+            {
+            freq = iMinFreq;
+            }
+        else if ( freq > iMaxFreq )
+            {
+            freq = iMaxFreq;
+            }
+        else {}
+        }
+    TInt intVal = freq / KFMRadioFreqMultiplier;
+    TInt decVal = ( freq % KFMRadioFreqMultiplier ) / iDecDiv;
+    static_cast<CFMRadioFrequencyNumber*>( 
+        Field( KIntField ) )->SetValue( intVal, *Font() );
+    static_cast<CFMRadioFrequencyNumber*>( 
+        Field( KDecField ) )->SetValue( decVal, *Font() );
+    UpdateMinimumAndMaximum();
+    ValidateFields();
+    DrawNow();
+    }
+
+
+// ---------------------------------------------------------------------------
+// Calculates the frequency from values of the fields.
+// ---------------------------------------------------------------------------
+//        
+TUint32 CFMRadioFrequencyEditor::Frequency() const
+    {
+    TInt intVal = static_cast<CFMRadioFrequencyNumber*>( 
+        Field( KIntField ) )->Value();
+    TInt decVal = static_cast<CFMRadioFrequencyNumber*>( 
+        Field( KDecField ) )->Value();
+    return ( KFMRadioFreqMultiplier * intVal ) + ( iDecDiv * decVal );
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioFrequencyEditor::SetMinimumAndMaximum
+// ---------------------------------------------------------------------------
+//
+void CFMRadioFrequencyEditor::SetMinimumAndMaximum( 
+        const TUint32 aMinimumFrequency, const TUint32 aMaximumFrequency )
+    {
+    iMinIntValue = aMinimumFrequency / KFMRadioFreqMultiplier;
+    iMaxIntValue = aMaximumFrequency / KFMRadioFreqMultiplier;
+    iMinDecValue = ( aMinimumFrequency % KFMRadioFreqMultiplier ) / iDecDiv;
+    iMaxDecValue = ( aMaximumFrequency % KFMRadioFreqMultiplier ) / iDecDiv;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioFrequencyEditor::GetMinimumAndMaximum
+// ---------------------------------------------------------------------------
+//
+void CFMRadioFrequencyEditor::GetMinimumAndMaximum( TUint32& aMinimumFrequency, 
+        TUint32& aMaximumFrequency ) const
+    {
+    aMinimumFrequency = ( KFMRadioFreqMultiplier * iMinIntValue ) + 
+        ( iDecDiv*iMinDecValue );
+    aMaximumFrequency = ( KFMRadioFreqMultiplier * iMaxIntValue ) + 
+        ( iDecDiv * iMaxDecValue );
+    }
+
+
+// ---------------------------------------------------------------------------
+// From class CCoeControl.
+// CFMRadioFrequencyEditor::ConstructFromResourceL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioFrequencyEditor::ConstructFromResourceL( 
+        TResourceReader& aResourceReader )
+    {
+    TUint32 flags = aResourceReader.ReadUint8();
+    ConstructL( EAknEditorFlagDeliverVirtualKeyEventsToApplication );
+    }
+
+
+// ---------------------------------------------------------------------------
+// From class CEikMfne.
+// Every key press may cause some recalculations and/or validations in 
+// the fields.
+// ---------------------------------------------------------------------------
+//
+TKeyResponse CFMRadioFrequencyEditor::OfferKeyEventL( const TKeyEvent& aKeyEvent, 
+        TEventCode aType )
+    {
+    FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyEditor::OfferKeyEventL ") ) );
+    iPreviousField = CurrentField();
+
+    TKeyResponse resp( EKeyWasNotConsumed );
+    
+    CEikMfneField* currField = Field( CurrentField() );
+
+    // Check only once per key press.
+    if ( aType == EEventKey )
+        {
+        TBool dataAltered = EFalse;
+        TBool error = EFalse;
+        TInt changeField = 0;
+        TInt newCurrentField = CurrentField();
+        
+        switch ( aKeyEvent.iCode )
+            {
+            case '1':
+            case '2':
+            case '3':
+            case '4':
+            case '5':
+            case '6':
+            case '7':
+            case '8':
+            case '9':
+            case '0':
+                {
+                currField->HandleKey( *Font(), aKeyEvent, EFalse, dataAltered, 
+                    changeField );
+
+                // If after number key press we are still on decimal field 
+                // (and were before).
+                if ( ( !changeField ) && ( CurrentField() == KDecField ) )
+                    {
+                    // This can mean only that user has typed one number in 
+                    // the decimal field and system is waiting for the other.
+                    iTypedInDecField = ETrue;
+                    }
+                else
+                    {
+                    iTypedInDecField = EFalse;
+                    }
+                // If after number key press system moved to another field 
+                // (previous field was filled with numbers). 
+                if ( changeField )
+                    {
+                    if ( CurrentField() == KIntField )
+                        {
+                        // First check if the changed value is within limits.
+                        error = ValidateIntField();    
+                        // Calculate new minimums and maximums.
+                        UpdateMinimumAndMaximum();    
+                        // Now have to check also whether the other field is 
+                        // within new limits.
+                        ValidateDecField();            
+                        }
+                    else if ( CurrentField() == KDecField )
+                        {
+                        error = ValidateDecField();
+                        }
+                    else {}
+                    }
+                break;
+                }
+            case EKeyBackspace:        
+                {
+                // Pressing "c"-key in a field will set the field in 
+                // "typed" state.
+                currField->HandleKey( *Font(), aKeyEvent, EFalse, dataAltered, 
+                    changeField );
+                if ( CurrentField() == KDecField )
+                    {
+                    iTypedInDecField = ETrue;
+                    }
+                break;
+                }
+            case EKeyLeftArrow: // fall-through intended here
+            case EKeyRightArrow:
+                {
+                currField->HandleKey( *Font(), aKeyEvent, EFalse, dataAltered, 
+                    changeField );
+                FillDecimalField();
+                ValidateFields();
+                // Minimums and maximums may have to be changed.
+                UpdateMinimumAndMaximum();    
+                // Validate according to new minimums and maximums.
+                ValidateFields();            
+                break;
+                }
+            default:
+                {
+                break;
+                }
+            }
+
+        if ( changeField )
+            {
+            if ( CurrentField() == KIntField )
+                {
+                newCurrentField = KDecField;
+                }
+            else
+                {
+                newCurrentField = KIntField;
+                }
+            }
+        TBuf<3> fieldText;
+        TInt fieldVal = 0;
+        TRAPD( err, fieldVal = static_cast<CFMRadioFrequencyNumber*>( currField )->Value() )
+        if ( !err )
+            {
+            fieldText.Num( static_cast<TInt64>( fieldVal ) );
+            }
+        CEikMfne::HandleInteraction( changeField, newCurrentField,
+                                     Font()->TextWidthInPixels( fieldText ),
+                                     currField->HighlightType(),
+                                     dataAltered,
+                                     error );
+
+        DrawAndReportL( EFalse );
+        }
+
+    return resp;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioFrequencyEditor::FillDecimalField
+// ---------------------------------------------------------------------------
+//
+void CFMRadioFrequencyEditor::FillDecimalField()
+    {
+    FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyEditor::FillDecimalField") ) );
+    if ( iTypedInDecField )
+        {    
+        CFMRadioFrequencyNumber* field = 
+            static_cast<CFMRadioFrequencyNumber*>( Field( KDecField ) );
+        // Multiply value by iDecDiv.
+        field->SetValue( iDecDiv*field->Value(), *Font() );    
+        iTypedInDecField = EFalse;
+        }
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioFrequencyEditor::CanLeaveEditorL
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioFrequencyEditor::CanLeaveEditorL()
+    {
+    FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyEditor::CanLeaveEditorL") ) );
+    TBool ret = ETrue;
+
+    FillDecimalField();
+
+    if ( CurrentField() == KIntField )
+        {
+        // First check if the changed value is within limits.
+        ret = !ValidateIntField();    
+        // Calculate new minimums and maximums.
+        UpdateMinimumAndMaximum();    
+        // Now have to check also whether the other field is within new 
+        // limits.
+        ValidateDecField();            
+        }
+    else if ( CurrentField() == KDecField )
+        {
+        ret = !ValidateDecField();
+        }
+    else {}
+
+    PrepareForFocusLossL();
+
+    // Draw immediately, otherwise a wrong number is displayed in decimal 
+    // field (for example: 03 instead of 30)
+    DrawAndReportL( ETrue ); 
+                           
+    return ret;
+    }
+    
+// ---------------------------------------------------------------------------
+// CFMRadioFrequencyEditor::IncrementCurrentField
+// ---------------------------------------------------------------------------
+//
+void CFMRadioFrequencyEditor::IncrementCurrentField()
+	{
+	CEikMfneField* currField = Field( CurrentField() );
+	 // If user is not in the middle of typing numbers.
+    if ( currField->HighlightType() == 
+            CEikMfneField::EInverseVideo )
+        {
+        if ( CurrentField() == KIntField )
+            {
+            IncrementIntField();
+            }
+        else if ( CurrentField() == KDecField )
+            {
+            IncrementDecField();
+            }
+        else {}
+        // Minimums and maximums may have to be changed.
+        UpdateMinimumAndMaximum();    
+        // Validate according to new minimums and maximums.
+        ValidateFields();            
+        }
+        
+    TRAP_IGNORE( DrawAndReportL( EFalse ) );
+	}
+	
+// ---------------------------------------------------------------------------
+// CFMRadioFrequencyEditor::DecrementCurrentField
+// ---------------------------------------------------------------------------
+//
+void CFMRadioFrequencyEditor::DecrementCurrentField()
+	{
+	CEikMfneField* currField = Field( CurrentField() );
+	 // If user is not in the middle of typing numbers.
+    if ( currField->HighlightType() == 
+            CEikMfneField::EInverseVideo )
+        {
+        if ( CurrentField() == KIntField )
+            {
+            DecrementIntField();
+            }
+        else if ( CurrentField() == KDecField )
+            {
+            DecrementDecField();
+            }
+        else {}
+        // Minimums and maximums may have to be changed.
+        UpdateMinimumAndMaximum();    
+        // Validate according to new minimums and maximums.
+        ValidateFields();            
+        }
+    TRAP_IGNORE( DrawAndReportL( EFalse ) );
+	}
+
+// ---------------------------------------------------------------------------
+// Field decrement step is 1.
+// If field value is already at maximum, it set to minimum.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioFrequencyEditor::IncrementIntField()
+    {
+    FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyEditor::IncrementIntField") ) );
+    CFMRadioFrequencyNumber* field = 
+        static_cast<CFMRadioFrequencyNumber*>( Field( KIntField ) );
+    CFMRadioFrequencyNumber* decField = 
+        static_cast<CFMRadioFrequencyNumber*>( Field( KDecField ) );
+        
+    if ( field->Value() < iMaxIntValue )
+        {
+        field->SetValue( field->Value() + 1, *Font() );
+        }
+    else if ( field->Value() == iMaxIntValue && decField->Value() == iMaxDecValue)
+        {
+        field->SetValue( iMinIntValue, *Font() );
+        }
+    else 
+        {
+        decField->SetValue( iMaxDecValue, *Font() );        
+        }
+    }
+    
+    
+// ---------------------------------------------------------------------------
+// Field decrement step is 1.
+// If field value is already at minimum, it set to maximum.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioFrequencyEditor::DecrementIntField()
+    {
+    FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyEditor::DecrementIntField") ) );
+    CFMRadioFrequencyNumber* field = 
+        static_cast<CFMRadioFrequencyNumber*>( Field( KIntField ) );
+    CFMRadioFrequencyNumber* decField = 
+        static_cast<CFMRadioFrequencyNumber*>( Field( KDecField ) );
+    
+    if ( field->Value() > iMinIntValue )
+        {
+        field->SetValue( field->Value() - 1, *Font() );
+        }
+    else if ( field->Value() == iMinIntValue && decField->Value() == iMinDecValue)
+        {
+        field->SetValue( iMaxIntValue, *Font() );
+        }
+    else 
+        {
+        decField->SetValue( iMinDecValue, *Font() );
+        }
+    }
+    
+    
+// ---------------------------------------------------------------------------
+// Field inrement step is defined in RadioSettings.
+// If field value is already at maximum, integer field
+// has to be incremented and this field set to minimum.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioFrequencyEditor::IncrementDecField()
+    {
+    FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyEditor::IncrementDecField") ) );
+    CFMRadioFrequencyNumber* field = 
+        static_cast<CFMRadioFrequencyNumber*>( Field( KDecField ) );
+    if ( field->Value() < iMaxDecValue )
+        {
+        field->SetValue( field->Value() + iStepFreq/iDecDiv, *Font() );
+        }
+    else if ( field->Value() == iMaxDecValue )
+        {
+        IncrementIntField();
+        // This is done because min of this field may change when integer 
+        // field is set to it's minimum.
+        UpdateMinimumAndMaximum();    
+        field->SetValue( iMinDecValue, *Font() );
+        }
+    else {}
+    }
+    
+    
+// ---------------------------------------------------------------------------
+// Field decrement step is defined in RadioSettings.
+// If field value is already at minimum, integer field
+// has to be decremented and this field set to maximum.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioFrequencyEditor::DecrementDecField()
+    {
+    FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyEditor::DecrementDecField") ) );
+    CFMRadioFrequencyNumber* field = 
+        static_cast<CFMRadioFrequencyNumber*>( Field( KDecField ) );
+    if ( field->Value() > iMinDecValue )
+        {
+        field->SetValue( field->Value() - iStepFreq/iDecDiv, *Font() );
+        }
+    else if ( field->Value() == iMinDecValue )
+        {
+        DecrementIntField();
+        // This is done because max of this field may change when integer 
+        // field is set to it's maximum.
+        UpdateMinimumAndMaximum();    
+        field->SetValue( iMaxDecValue, *Font() );
+        }
+    else {}
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioFrequencyEditor::ValidateFields
+// ---------------------------------------------------------------------------
+//
+void CFMRadioFrequencyEditor::ValidateFields()
+    {
+    FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyEditor::ValidateFields") ) );
+    ValidateIntField();
+    ValidateDecField();
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioFrequencyEditor::ValidateIntField
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioFrequencyEditor::ValidateIntField()
+    {
+    FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyEditor::ValidateIntField") ) );
+    TBool ret = EFalse;
+    
+    // Check if integer field value is within limits.
+    CFMRadioFrequencyNumber* field = 
+        static_cast<CFMRadioFrequencyNumber*>( Field( KIntField ) );
+    if ( field->Value() < iMinIntValue )
+        {
+        field->SetValue( iMinIntValue, *Font() );
+        ret = ETrue;
+        }
+    else if ( field->Value() > iMaxIntValue )
+        {
+        field->SetValue( iMaxIntValue, *Font() );
+        ret = ETrue;
+        }
+    else {}
+
+    return ret;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioFrequencyEditor::ValidateDecField
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioFrequencyEditor::ValidateDecField()
+    {
+    FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyEditor::ValidateDecField") ) );
+    TBool ret = EFalse;
+
+    // Check if decimal field value is within limits.
+    CFMRadioFrequencyNumber* field = 
+        static_cast<CFMRadioFrequencyNumber*>( Field( KDecField ) );
+    if ( field->Value() < iMinDecValue )
+        {
+        field->SetValue( iMinDecValue, *Font() );
+        ret = ETrue;
+        }
+    else if ( field->Value() > iMaxDecValue )
+        {
+        field->SetValue( iMaxDecValue, *Font() );
+        ret = ETrue;
+        }
+    else
+        {
+        // Check if decimal field value is within a step.
+        TInt remainder = static_cast<TUint32>( 
+            ( field->Value()-iMinDecValue ) ) % ( iStepFreq/iDecDiv );
+        if ( remainder != 0 )
+            {
+            field->SetValue( field->Value()-remainder, *Font() );
+            ret = ETrue;
+            }
+        }
+
+    return ret;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioFrequencyEditor::UpdateMinimumAndMaximum
+// ---------------------------------------------------------------------------
+//
+void CFMRadioFrequencyEditor::UpdateMinimumAndMaximum()
+    {
+    FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyEditor::UpdateMinimumAndMaximum") ) );
+    TInt minIntValue( 0 );
+    TInt maxIntValue( 0 );
+    TInt minDecValue( 0 );
+    TInt maxDecValue( 0 );
+    
+    minIntValue = iMinFreq / KFMRadioFreqMultiplier;
+    maxIntValue = iMaxFreq / KFMRadioFreqMultiplier;
+        
+    if ( ( Frequency() / KFMRadioFreqMultiplier > iMinFreq / KFMRadioFreqMultiplier ) && 
+            ( Frequency() / KFMRadioFreqMultiplier < iMaxFreq / KFMRadioFreqMultiplier ) )
+        {    
+        // Remainder of the gap from min freq to next int value.
+        minDecValue = ( ( ( KFMRadioFreqMultiplier * ( minIntValue + 1 ) ) - iMinFreq ) 
+            % iStepFreq ) / iDecDiv;
+        // Same kind of thing vice versa.
+        maxDecValue = ( ( ( iMinFreq - ( KFMRadioFreqMultiplier * ( minIntValue ) ) ) 
+            % iStepFreq ) / iDecDiv ) + KFMRadioFreqMultiplier / iDecDiv 
+            - ( iStepFreq / iDecDiv );    
+        }
+    else if ( Frequency() / KFMRadioFreqMultiplier == iMinFreq / KFMRadioFreqMultiplier )
+        {
+        minDecValue = ( iMinFreq % KFMRadioFreqMultiplier ) / iDecDiv;
+        // Same kind of thing vice versa.
+        maxDecValue = ( ( ( iMinFreq - ( KFMRadioFreqMultiplier * ( minIntValue ) ) ) 
+            % iStepFreq ) / iDecDiv ) + KFMRadioFreqMultiplier / iDecDiv 
+            - ( iStepFreq / iDecDiv );
+        }
+    else if ( Frequency() / KFMRadioFreqMultiplier == iMaxFreq / KFMRadioFreqMultiplier )
+        {
+        // Remainder of the gap from min freq to next int value.
+        minDecValue = ( ( ( KFMRadioFreqMultiplier * ( minIntValue + 1 ) ) - iMinFreq ) 
+            % iStepFreq ) / iDecDiv;    
+        maxDecValue = ( iMaxFreq % KFMRadioFreqMultiplier ) / iDecDiv;
+        }
+    else {}
+
+    SetMinimumAndMaximum( 
+        ( KFMRadioFreqMultiplier * minIntValue ) + ( iDecDiv * minDecValue ), 
+        ( KFMRadioFreqMultiplier * maxIntValue ) + ( iDecDiv * maxDecValue ) );
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioFrequencyEditor::IsValid
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioFrequencyEditor::IsValid() const
+    {
+    return ( Field( CurrentField() )->HighlightType() == 
+        CEikMfneField::EInverseVideo );
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioFrequencyEditor::IsValidToReport
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioFrequencyEditor::IsValidToReport() const
+    {
+    return iValidToReport;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioFrequencyEditor::DrawAndReportL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioFrequencyEditor::DrawAndReportL( TBool /*aForceDrawNow*/ )
+    {
+    //Switched to always do DrawNow() - DrawDeferred() is too slow for rapid
+    //frequency changing (long press accelerates after a while)
+//    if ( !aForceDrawNow && ( DrawableWindow() && !IsBackedUp() ) )
+//        {
+//        // Flicker-free redraw.
+//        DrawDeferred();
+//        }
+//    else
+//        {
+//        DrawNow();
+//        }	
+
+    DrawNow();
+    
+
+	if ( iReportEditorState )
+		{
+		iValidToReport = ETrue;		
+		}
+	else
+		{
+		iValidToReport = EFalse;	
+		}		
+    // Report back finally to main container.
+    ReportEventL( MCoeControlObserver::EEventStateChanged );    
+    iValidToReport = EFalse;
+    }
+
+
+// ---------------------------------------------------------------------------
+// From class CCoeControl.
+// CFMRadioFrequencyEditor::FocusChanged
+// ---------------------------------------------------------------------------
+//
+void CFMRadioFrequencyEditor::FocusChanged( TDrawNow /*aDrawNow*/ )
+    {
+    if ( Field( CurrentField() )->HighlightType() == 
+            CEikMfneField::EInverseVideo )
+        {
+        CFMRadioFrequencyNumber* field = 
+            static_cast<CFMRadioFrequencyNumber*>( Field( KIntField ) );
+        field->SetDigitType( AknTextUtils::NumericEditorDigitType(), 
+            *Font() );
+        field = NULL;
+        field = static_cast<CFMRadioFrequencyNumber*>( Field( KDecField ) );
+        field->SetDigitType( AknTextUtils::NumericEditorDigitType(), 
+            *Font() );
+        }
+
+    if ( DrawableWindow() && !IsBackedUp() )
+        {
+        // Flicker-free redraw.
+        reinterpret_cast<RWindow*>( DrawableWindow() )->Invalidate();
+        }
+    else
+        {
+        DrawNow();
+        }
+    }
+
+void CFMRadioFrequencyEditor::SetEditorReportState( const TBool aReport )
+	{
+	iReportEditorState = aReport;
+	}
+
+// ---------------------------------------------------------------------------
+// From class CCoeControl.
+// CFMRadioFrequencyEditor::HandlePointerEventL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioFrequencyEditor::HandlePointerEventL( const TPointerEvent& aPointerEvent )
+    {
+    if ( aPointerEvent.iType == TPointerEvent::EButton1Down )
+        {
+        TBool dataAltered = EFalse;
+        TInt newCurrentField = CurrentField();
+        TInt error = KErrNone;
+    
+        CEikMfneField* currField = Field( CurrentField() );
+        TInt fieldWidth = iEditorFrameRect.Width() / 2;
+        TRect fieldRect;
+        
+        if ( CurrentField() == KIntField )
+            {
+            newCurrentField = KDecField;
+            TPoint fieldPos( iEditorFrameRect.iTl );
+            fieldPos.iX += iEditorFrameRect.Width() - fieldWidth;
+            fieldRect.SetRect( fieldPos, TSize( fieldWidth , iEditorFrameRect.Height() ) );
+            }
+        else
+            {
+            newCurrentField = KIntField;
+            fieldRect.SetRect( iEditorFrameRect.iTl, TSize( fieldWidth , iEditorFrameRect.Height() ) );
+            }
+
+        if ( fieldRect.Contains( aPointerEvent.iPosition ) )
+            {
+            FillDecimalField();
+            ValidateFields();
+            // Minimums and maximums may have to be changed.
+            UpdateMinimumAndMaximum();
+            // Validate according to new minimums and maximums.
+            ValidateFields();
+
+             TBuf<3> fieldText;
+             TInt fieldVal = 0;
+             TRAPD( err, fieldVal = static_cast<CFMRadioFrequencyNumber*>( currField )->Value() )
+             if ( !err )
+                 {
+                 fieldText.Num( static_cast<TInt64>( fieldVal ) );
+                 }
+             CEikMfne::HandleInteraction( ETrue,
+                                          newCurrentField, 
+                                          Font()->TextWidthInPixels( fieldText ), 
+                                          currField->HighlightType(),
+                                          dataAltered,
+                                          error );
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioFrequencyEditor::SetEditorFrameRect
+// ---------------------------------------------------------------------------
+//
+void CFMRadioFrequencyEditor::SetEditorFrameRect( const TRect& aRect )
+    {
+    iEditorFrameRect = aRect;
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradiofrequencynumber.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,390 @@
+/*
+* Copyright (c) 2000 Nokia Corporation and/or 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: Frequency number handling for manual tuning dialog
+*
+*/
+
+
+// INCLUDE FILES
+
+#include	<aknappui.h>
+#include	<aknsoundsystem.h>
+#include	<AknTextDecorationMetrics.h>
+#include	<numberconversion.h>
+#include	<EIKCTL.rsg>
+
+#include    "fmradiofrequencynumber.h"
+#include 	"debug.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// C++ default constructor can NOT contain any code, that
+// might leave.
+//
+CFMRadioFrequencyNumber::CFMRadioFrequencyNumber(TInt aMinimumValue, TInt aMaximumValue, TUint32 aFlags)
+	: iMinimumValue(aMinimumValue), iMaximumValue(aMaximumValue), iFlags(aFlags)
+	{
+	// Get maximum number of digits.
+	TBuf<16> maxText;
+	maxText.AppendNum(static_cast<TInt64>(aMaximumValue));
+	iMaxDigits = maxText.Length();
+	}
+
+// EPOC default constructor can leave.
+void CFMRadioFrequencyNumber::ConstructL(const CFont& aFont, TInt aInitialValue)
+    {
+    FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyNumber::ConstructL") ) );
+	// Init text field containing the value.
+	iText = HBufC::NewL(iMaxDigits);
+	SetValue(aInitialValue, aFont);
+    }
+
+// Two-phased constructor.
+CFMRadioFrequencyNumber* CFMRadioFrequencyNumber::NewL(const CFont& aFont, TInt aMinimumValue, TInt aMaximumValue, TInt aInitialValue, TUint32 aFlags)
+    {
+    FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyNumber::NewL") ) );
+    CFMRadioFrequencyNumber* self = new (ELeave) CFMRadioFrequencyNumber(aMinimumValue, aMaximumValue, aFlags);
+    CleanupStack::PushL(self);
+    self->ConstructL(aFont, aInitialValue);
+    CleanupStack::Pop();
+    return self;
+    }
+
+    
+// Destructor
+CFMRadioFrequencyNumber::~CFMRadioFrequencyNumber()
+    {
+    delete iText;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyNumber::MaximumWidthInPixels
+// TInt addedWith is calculated same way than in TInt CEikMfneField::AdditionalWidthForHighlights, 
+// which is public but not exported method.
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TInt CFMRadioFrequencyNumber::MaximumWidthInPixels(const CFont& aFont, TBool /*aShrinkToMinimumSize*/)
+	{
+	FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyNumber::MaximumWidthInPixels") ) );
+	TInt addedWidth = 0;
+    if ( IsEditable() )
+        {
+        TInt rightHighlight = 0;
+        TAknTextDecorationMetrics metrics( &aFont );
+        // Width is increased only by leftHighlight.  This is a compromise in that glyphs already have 
+        // spacing within them to achieve character spacing. This spacing is generally (for numbers) on the right. 
+        metrics.GetLeftAndRightMargins( addedWidth, rightHighlight ); // rightHighlight is not used
+        }
+
+	return (iMaxDigits * TFindWidthOfWidestDigitType(iDigitType).MaximumWidthInPixels(aFont)) + addedWidth;
+	}
+
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyNumber::InputCapabilities
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TCoeInputCapabilities CFMRadioFrequencyNumber::InputCapabilities() const
+	{
+	FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyNumber::InputCapabilities") ) );
+	return TCoeInputCapabilities::EWesternNumericIntegerPositive;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyNumber::Text
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+const TDesC& CFMRadioFrequencyNumber::Text() const
+	{
+	FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyNumber::Text") ) );
+
+	if (iFlags & EIsUninitialised)
+		{
+		return KNullDesC();
+		}
+
+	return *iText;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyNumber::SetValue
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyNumber::SetValue(TInt aValue, const CFont& aFont)
+	{
+	FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyNumber::SetValue") ) );
+	iFlags &= ~EIsUninitialised;
+	TPtr text = iText->Des();
+	text.SetLength(0);
+	TInt firstUnsetCharacter = text.Length();
+	text.SetLength(firstUnsetCharacter + iMaxDigits);
+	TInt lastUnsetCharacter = text.Length() - 1;
+
+	if (aValue == 0)
+		{
+		text[lastUnsetCharacter--] = TText(iDigitType);
+		}
+	else
+		{
+		for (; aValue; aValue/=10)
+			{	
+			text[lastUnsetCharacter--] = (TText)(TText(iDigitType) + (aValue%10));
+			}
+		}
+	
+	if (lastUnsetCharacter >= firstUnsetCharacter)
+		{
+		if (iFlags & EFillWithLeadingZeros)
+			{
+			while (lastUnsetCharacter >= firstUnsetCharacter)
+				{
+				text[lastUnsetCharacter--] = TText(iDigitType);
+				}
+			}
+		else
+			{
+			text.Delete(firstUnsetCharacter, (lastUnsetCharacter + 1) - firstUnsetCharacter);
+			}
+		}
+
+	if (iFlags & EPreserveOldWidthBeforeEditing)
+		{
+		iMinimumWidthInPixels = aFont.TextWidthInPixels(Text());
+		}
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyNumber::Value
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TInt CFMRadioFrequencyNumber::Value() const
+	{
+	FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyNumber::Value") ) );
+    if (iText->Length() == 0)
+        {
+        CAknKeySoundSystem* soundPlayer = (static_cast<CAknAppUi*>(CEikonEnv::Static()->AppUi()))->KeySounds();
+		if (soundPlayer)
+			{
+			soundPlayer->PlaySound(EAvkonSIDWarningTone); 
+			}
+		CBaActiveScheduler::LeaveNoAlert();
+        }
+
+    return ValueFromText();
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyNumber::IsValid
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TBool CFMRadioFrequencyNumber::IsValid() const
+	{
+	FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyNumber::IsValid") ) );
+	return (iText->Length() != 0);
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyNumber::IsEditable
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TBool CFMRadioFrequencyNumber::IsEditable() const
+	{
+	FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyNumber::IsEditable") ) );
+	return ETrue;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyNumber::HighlightType
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+CEikMfneField::THighlightType CFMRadioFrequencyNumber::HighlightType() const
+	{
+	FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyNumber::HighlightType") ) );
+	return (iFlags & EIsBeingEditedWithCursor) ? ECursor : EInverseVideo;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyNumber::HandleKey
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyNumber::HandleKey(const CFont& /*aFont*/, const TKeyEvent& aKeyEvent, TBool /*aInterpretLeftAndRightAsEarEvents*/, TBool& aDataAltered, TInt& aHighlightIncrement)
+	{
+	FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyNumber::HandleKey") ) );
+	TChar ch = aKeyEvent.iCode;
+	TPtr text = iText->Des();
+	TInt textLength = text.Length();
+	
+	switch (ch)
+		{
+		case EKeyLeftArrow:
+		case EKeyRightArrow:
+			{
+			HandleLeftOrRightArrow(ch, aDataAltered, aHighlightIncrement);	
+			break;
+			}
+		case EKeyBackspace:
+			{
+			if (textLength)
+				{
+				iFlags |= EIsBeingEditedWithCursor;
+				text.SetLength(textLength-1);
+				aDataAltered = ETrue;
+				iFlags &= ~EIsUninitialised;
+				}
+			break;
+			}
+		default:
+			{
+			// Number key:
+			if (ch.GetNumericValue() != KErrNotFound)
+				{
+				if (~iFlags & EIsBeingEditedWithCursor)
+					{
+					// If only one number field, do not change to cursor mode.
+					if (iMaxDigits > 1)
+						{
+						iFlags |=  EIsBeingEditedWithCursor;
+						}
+					text.SetLength(0);
+					}
+
+				TBuf<1> normCh;
+				normCh.Append(ch);
+				NumberConversion::ConvertDigits(normCh, iDigitType);
+				text.Append(normCh[0]);
+				aDataAltered = ETrue;
+				iFlags &= ~EIsUninitialised;
+				if (iText->Length() >= iMaxDigits)
+					{
+					aHighlightIncrement = 1;
+					}
+				}
+			break;
+			}
+		}
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyNumber::HandleDeHighlight
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyNumber::HandleDeHighlight(const CFont& aFont, CEikonEnv& aEikonEnv, TBool& aDataAltered, TBool& aError)
+	{
+	FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyNumber::HandleDeHighlight") ) );
+	iFlags &= ~EIsBeingEditedWithCursor;
+
+	if (iText->Length() == 0)
+		{
+		SetValue(iMaximumValue, aFont);
+		aDataAltered = ETrue;
+		aError = ETrue;
+		aEikonEnv.InfoMsg(R_EIK_TBUF_NO_NUMBER_ENTERED);
+		return;
+		}
+
+	TInt value = ValueFromText();
+	TBuf<128> oldText = *iText;
+	TBool unInit = iFlags & EIsUninitialised;
+	SetValue(value, aFont);
+
+	if (oldText != *iText)
+		{
+		aDataAltered = ETrue;
+		}
+	else
+		{
+		if (unInit)
+			{
+			iFlags |= EIsUninitialised;
+			}
+		else
+			{
+			iFlags &= ~EIsUninitialised;
+			}
+		}
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyNumber::ValueFromText
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TInt CFMRadioFrequencyNumber::ValueFromText() const
+	{
+	FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyNumber::ValueFromText") ) );
+	if (!iText->Length())
+		{
+		return iMinimumValue;
+		}
+
+	TInt i = 0;
+	TInt valueFromText = 0;
+	TInt textLength = iText->Length();
+
+	for (; i<textLength; ++i)
+		{
+		TText digit = (*iText)[i];
+		valueFromText = (valueFromText * 10) + (TInt)(digit - TText(iDigitType));
+		}
+
+	return valueFromText;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyNumber::SetDigitType
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyNumber::SetDigitType(TDigitType aDigitType, const CFont& aFont)
+	{
+	FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyNumber::SetDigitType") ) );
+	TInt value = Value();
+	iDigitType = aDigitType;
+	SetValue(value, aFont);
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyNumber::DigitType
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TDigitType CFMRadioFrequencyNumber::DigitType() const
+	{
+	FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyNumber::DigitType") ) );
+	return iDigitType;
+	}
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradiofrequencyquerycontrol.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,1189 @@
+/*
+* Copyright (c) 2000 Nokia Corporation and/or 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: Manual tuning dialog for FMRadio
+*
+*/
+
+
+// INCLUDE FILES
+#include	<aknappui.h>
+#include	<AknsFrameBackgroundControlContext.h>
+#include    <aknbutton.h>
+#include 	<AknLayoutDef.h>
+#include 	<AknLayout2ScalableDef.h>
+#include 	<aknlayoutscalable_avkon.cdl.h>
+#include 	<avkon.mbg>
+#include 	<avkon.rsg>
+#include	<barsread.h>
+#include	<eiklabel.h>
+#include	<skinlayout.cdl.h>
+#include	<AknsDrawUtils.h>
+#include	<StringLoader.h>
+#include 	<aknconsts.h>
+#include	<fmradio.rsg>
+
+#include    "fmradiofrequencyquerycontrol.h"
+#include	"fmradiofrequencyeditor.h"
+#include	"fmradio.hrh"
+#include 	"debug.h"
+
+// CONSTANTS
+
+const TInt KFMRadioButtonLongPressDelay = 450; //microseconds after long press event is reported
+const TInt KFMRadioButtonRepeatDelay = 500;  //microseconds after repeat event is reported
+const TInt KFMRadioButtonRepeatInterval = 200; //microseconds after repeat event is repeated
+const TInt KFMRadioButtonRepeatDelayMicroseconds(KFMRadioButtonRepeatDelay*1000);
+const TInt KFMRadioButtonRepeatIntervalMicrosecondsAccelerated(KFMRadioButtonRepeatInterval*500);
+const TInt KFMRadioButtonRepeatAccelerationDelay(2000000); //Two seconds until accelerate long press repeat
+
+const TInt  KEditorFrameCustomLRMargins = 50;
+const TInt  KEditorFrameCustomAdditionHeight = 30;
+
+const TInt KFMRadioEditorCustomInnerFrameSize = 15;
+const TInt KFMRadioEditorCustomButtonMarginToLeftFrame = 1;
+const TInt KFMRadioEditorCustomButtonSize = 16;
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// C++ default constructor can NOT contain any code, that
+// might leave.
+//
+CFMRadioFrequencyQueryControl::CFMRadioFrequencyQueryControl() : CAknQueryControl()
+    {
+    }
+    
+// Destructor
+CFMRadioFrequencyQueryControl::~CFMRadioFrequencyQueryControl()
+    {
+    if (iFreqEditor)
+        AknsUtils::DeregisterControlPosition(iFreqEditor);
+    delete iFreqEditor;
+	delete iMyPrompt;
+	delete iMyEditorIndicator;
+	delete iEditorContext;
+	
+	if ( iLongPressAccelerationTimer )
+	    {
+    	iLongPressAccelerationTimer->Cancel();
+    	delete iLongPressAccelerationTimer;
+	    }
+	if ( iLongPressTimer) 
+	    {
+	    iLongPressTimer->Cancel();
+	    delete iLongPressTimer;
+	    }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::StaticCreateCustomControl
+// ---------------------------------------------------------
+//
+SEikControlInfo CFMRadioFrequencyQueryControl::StaticCreateCustomControl(TInt aIdentifier)
+{
+	FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyQueryControl::StaticCreateCustomControl -- ENTER") ) );
+	SEikControlInfo customInfo;
+	Mem::FillZ(&customInfo, sizeof(SEikControlInfo)); // zero all variables
+
+	if (aIdentifier == EFMRadioCtFrequencyQuery)
+	{
+		customInfo.iControl = new CFMRadioFrequencyQueryControl;
+	}
+
+	FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyQueryControl::StaticCreateCustomControl -- EXIT") ) );
+	return customInfo;
+}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::ConstructQueryL
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::ConstructQueryL(TResourceReader& aRes)
+	{
+	
+	iFreqEditor = new (ELeave) CFMRadioFrequencyEditor;
+    iFreqEditor->SetContainerWindowL(*this);
+    iFreqEditor->ConstructFromResourceL(aRes);
+    iFreqEditor->SetObserver(this);
+    iFreqEditor->SetSkinTextColorL( EAknsCIQsnTextColorsCG27 );//query text input field
+
+	iMyPrompt = new (ELeave) CEikLabel;
+	iMyPrompt->SetContainerWindowL( *this );
+	HBufC* promptTxt = StringLoader::LoadLC( R_QTN_FMRADIO_MANUAL_TUNE_FREQ );
+	iMyPrompt->SetTextL( *promptTxt );
+	CleanupStack::PopAndDestroy( promptTxt );
+
+	iMyEditorIndicator = CFMRadioManualTuningEditorIndicator::NewL( this );
+	
+	// Construct editor context
+    iEditorContext = CAknsFrameBackgroundControlContext::NewL(
+        KAknsIIDQsnFrInput, TRect(0,0,1,1), TRect(0,0,1,1), EFalse );
+    
+    if ( AknLayoutUtils::PenEnabled() )
+        {
+        // Buttons with correct icons
+          iIncreaseValueButton = 
+                 CAknButton::NewL(KAvkonBitmapFile,
+                 EMbmAvkonQgn_indi_button_increase,
+                 EMbmAvkonQgn_indi_button_increase_mask,
+                 -1,
+                 -1,
+                 EMbmAvkonQgn_indi_button_increase_pressed,
+                 EMbmAvkonQgn_indi_button_increase_pressed_mask,
+                 -1,
+                 -1,
+                 KNullDesC,
+                 KNullDesC,
+                 KAknButtonNoFrame /*| KAknButtonKeyRepeat*/ | KAknButtonReportOnLongPress,
+                 0,
+                 KAknsIIDQgnIndiButtonIncrease,
+                 KAknsIIDNone,
+                 KAknsIIDQgnIndiButtonIncreasePressed,
+                 KAknsIIDNone );         
+        iIncreaseValueButton->SetContainerWindowL(*this);
+        iIncreaseValueButton->SetParent(this);
+        iIncreaseValueButton->SetObserver(this);
+        iIncreaseValueButton->MakeVisible(ETrue);
+        iIncreaseValueButton->SetFocusing(EFalse);
+       	iIncreaseValueButton->SetKeyRepeatInterval( KFMRadioButtonRepeatDelay, KFMRadioButtonRepeatInterval );
+	    iIncreaseValueButton->SetLongPressInterval( KFMRadioButtonLongPressDelay );        
+
+        iDecreaseValueButton = 
+                 CAknButton::NewL(KAvkonBitmapFile,
+                 EMbmAvkonQgn_indi_button_decrease,
+                 EMbmAvkonQgn_indi_button_decrease_mask,
+                 -1,
+                 -1,
+                 EMbmAvkonQgn_indi_button_decrease_pressed,
+                 EMbmAvkonQgn_indi_button_decrease_pressed_mask,
+                 -1,
+                 -1,
+                 KNullDesC,
+                 KNullDesC,
+                 KAknButtonNoFrame /*| KAknButtonKeyRepeat*/ | KAknButtonReportOnLongPress,
+                 0,
+                 KAknsIIDQgnIndiButtonDecrease,
+                 KAknsIIDNone,
+                 KAknsIIDQgnIndiButtonDecreasePressed,
+                 KAknsIIDNone );
+        iDecreaseValueButton->SetContainerWindowL(*this);
+        iDecreaseValueButton->SetParent(this);
+        iDecreaseValueButton->SetObserver(this);
+        iDecreaseValueButton->MakeVisible(ETrue);
+        iDecreaseValueButton->SetFocusing(EFalse);
+		iDecreaseValueButton->SetKeyRepeatInterval( KFMRadioButtonRepeatDelay, KFMRadioButtonRepeatInterval );
+	    iDecreaseValueButton->SetLongPressInterval( KFMRadioButtonLongPressDelay );
+        }   
+  
+    iLongPressAccelerationTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+    iLongPressTimer = CPeriodic::NewL( CActive::EPriorityStandard );      
+  	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::ComponentControl
+// ---------------------------------------------------------
+//
+CCoeControl* CFMRadioFrequencyQueryControl::ComponentControl(TInt aIndex) const
+	{
+    /*lint -save -e1763*/
+    CCoeControl* ccontrol = NULL;
+    
+	switch (aIndex)
+		{
+		case 0:
+			{
+			ccontrol = iMyPrompt;
+			break;
+			}
+		case 1:
+			{
+			ccontrol = iMyEditorIndicator;
+			break;
+			}
+		case 2:
+			{
+			ccontrol = iFreqEditor;
+			break;
+			}
+		case 3:
+			{
+			if ( AknLayoutUtils::PenEnabled() )
+				{
+		    	ccontrol = iIncreaseValueButton;
+		    	}
+		   	break;
+		   	}
+		    
+		case 4:
+			{
+			if ( AknLayoutUtils::PenEnabled() )
+				{
+	    		ccontrol = iDecreaseValueButton;
+	    		}
+	    	break;
+	    	}
+	    
+		default:
+			{
+			ccontrol = NULL;
+			break;
+			}
+		}
+	return ccontrol;
+    /*lint -restore*/
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::CountComponentControls
+// ---------------------------------------------------------
+//
+TInt CFMRadioFrequencyQueryControl::CountComponentControls() const
+	{
+	if ( AknLayoutUtils::PenEnabled() )
+		{
+		return 5;
+		}
+	else
+		{
+		return 3;
+		}
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::FocusChanged
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::FocusChanged(TDrawNow aDrawNow)
+	{
+    if (iFreqEditor)
+        {
+        iFreqEditor->SetFocus(IsFocused(), aDrawNow);
+        SizeChanged();
+        }
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::PrepareForFocusLossL
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::PrepareForFocusLossL()
+	{
+    if (iFreqEditor)
+        {
+        iFreqEditor->PrepareForFocusLossL(); 
+        }
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::SetAcceleratedLongPress
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::SetAcceleratedLongPress(TBool aAccelerated)
+    {
+    iLongPressAccelerationTimer->Cancel();
+    iLongPressTimer->Cancel();
+    
+    if( aAccelerated)
+        {
+        //add more speed
+        iLongPressTimer->Start(KFMRadioButtonRepeatIntervalMicrosecondsAccelerated,
+                            KFMRadioButtonRepeatIntervalMicrosecondsAccelerated,
+                            TCallBack(LongPressTimerCallBack, this));
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::LongPressAccelerateCallBack
+// ---------------------------------------------------------
+//
+TInt CFMRadioFrequencyQueryControl::LongPressAccelerateCallBack( TAny* aAny )
+    {
+    ((CFMRadioFrequencyQueryControl*)(aAny))->SetAcceleratedLongPress(ETrue);
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::LongPressTimerCallBack
+// ---------------------------------------------------------
+//
+TInt CFMRadioFrequencyQueryControl::LongPressTimerCallBack( TAny* aAny )
+    {
+    ((CFMRadioFrequencyQueryControl*)(aAny))->DoIncrementOrDecrement();
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::DoIncrementOrDecrement
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::DoIncrementOrDecrement()
+    {
+    if(iChangeDirectionIncrease)
+        {
+        iFreqEditor->IncrementCurrentField();
+        }
+    else
+        {
+        iFreqEditor->DecrementCurrentField();
+        }
+    
+    iKeyPressReported = ETrue;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::StartKeypress
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::StartKeypress()
+    {
+    iKeyPressReported = EFalse;
+    iLongPressAccelerationTimer->Cancel();
+    iLongPressAccelerationTimer->Start(KFMRadioButtonRepeatAccelerationDelay, 0,
+                                        TCallBack(LongPressAccelerateCallBack, this));
+    
+    iLongPressTimer->Cancel();
+    iLongPressTimer->Start(KFMRadioButtonRepeatDelayMicroseconds,
+                        KFMRadioButtonRepeatDelayMicroseconds,
+                        TCallBack(LongPressTimerCallBack, this));
+    iFreqEditor->SetEditorReportState( EFalse );
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::OfferKeyEventL
+// ---------------------------------------------------------
+//
+TKeyResponse CFMRadioFrequencyQueryControl::OfferKeyEventL( const TKeyEvent& aKeyEvent, TEventCode aType )
+    {
+    if ( aType == EEventKeyDown &&
+            (aKeyEvent.iScanCode == EStdKeyUpArrow || aKeyEvent.iScanCode == EStdKeyDownArrow) )
+        {
+        iChangeDirectionIncrease = (aKeyEvent.iScanCode == EStdKeyUpArrow);
+        StartKeypress();
+        
+        return EKeyWasConsumed;
+        }
+    else if ( aType == EEventKeyUp &&
+            (aKeyEvent.iScanCode == EStdKeyUpArrow || aKeyEvent.iScanCode == EStdKeyDownArrow) )
+        {
+        if(!iKeyPressReported)
+            {
+            //was not a long press
+            DoIncrementOrDecrement();
+            }
+        
+        SetAcceleratedLongPress(EFalse);
+        iFreqEditor->SetEditorReportState( ETrue );
+        iFreqEditor->DrawAndReportL( EFalse );
+        
+        return EKeyWasConsumed;
+        }
+    
+    //eat all up and down events, this is for EEventKey
+    if(aKeyEvent.iScanCode == EStdKeyUpArrow || aKeyEvent.iScanCode == EStdKeyDownArrow)
+        {
+        return EKeyWasConsumed;
+        }
+    
+    return iFreqEditor->OfferKeyEventL(aKeyEvent, aType);
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::HandleControlEventL
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::HandleControlEventL(CCoeControl* aControl, TCoeEvent aEventType)
+	{
+	if ( aEventType == CAknButton::ELongPressEndedEvent  )
+		{
+		SetAcceleratedLongPress(EFalse);
+		iFreqEditor->SetEditorReportState( ETrue );
+		iFreqEditor->DrawAndReportL( EFalse );
+		}
+	
+	if ( (aControl == iIncreaseValueButton || aControl == iDecreaseValueButton )
+	    && aEventType == CAknButton::ELongPressEvent )
+        {
+        iChangeDirectionIncrease = (aControl == iIncreaseValueButton);
+        StartKeypress();
+        return;
+        }
+    
+	//single presses
+	if ( aControl == iIncreaseValueButton && aEventType == EEventStateChanged )
+        {
+        iFreqEditor->IncrementCurrentField();
+        return;
+        }
+
+	else if ( aControl == iDecreaseValueButton && aEventType == EEventStateChanged )
+        {
+        iFreqEditor->DecrementCurrentField();
+        return;
+        }
+	
+	//finally tune to the frequency
+    if (iQueryControlObserver && aEventType == EEventStateChanged)
+        {                
+        if ( iFreqEditor->IsValidToReport() )
+            {
+			MAknQueryControlObserver::TQueryValidationStatus validity = MAknQueryControlObserver::EEditorValueValid;
+			if ( !iFreqEditor->IsValid() )
+				{
+				validity = MAknQueryControlObserver::EEditorValueNotParsed; 
+				}
+            iQueryControlObserver->HandleQueryEditorStateEventL( this, MAknQueryControlObserver::EQueryControlEditorStateChanging, validity );
+            }
+		}	            
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::SetFrequency
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::SetFrequency(const TUint32 aFreq)
+	{
+	if (iFreqEditor)
+		{
+		iFreqEditor->SetFrequency(aFreq);
+		}
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::Frequency
+// ---------------------------------------------------------
+//		
+TUint32 CFMRadioFrequencyQueryControl::Frequency() const
+	{
+    if (iFreqEditor)
+        {
+        return iFreqEditor->Frequency();
+        }
+    return 0; 
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::ControlByLayoutOrNull
+// ---------------------------------------------------------
+//
+CCoeControl* CFMRadioFrequencyQueryControl::ControlByLayoutOrNull(TInt /*aLayout*/)
+	{
+    return iFreqEditor;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::EditorContentIsValidL
+// ---------------------------------------------------------
+//
+TBool CFMRadioFrequencyQueryControl::EditorContentIsValidL() const
+	{
+	TInt ret = EFalse;
+    if (iFreqEditor) 
+        {
+        CEikMfne* editor = iFreqEditor;
+        ret = editor->Field(editor->CurrentField())->IsValid();
+        }
+    return ret;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::SetAndUseFlags
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::SetAndUseFlags(TBitFlags16 aFlags)
+	{
+	iFlags = aFlags;
+	iMyEditorIndicator->SetFlags(aFlags);
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::LayoutEditor
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::LayoutEditor(const TLayoutMethod& aLayoutM)
+	{
+	TIndex LAFIndex(NbrOfPromptLines());
+    iHasEditor = ETrue;
+    LayoutEditorFrame(aLayoutM);
+    LayoutEditorIndicator(aLayoutM);	
+
+    CEikMfne* edwin = NULL;
+    
+    if ( iFreqEditor )
+        {
+        edwin = iFreqEditor;
+        }        
+ 
+    if ( edwin )
+        {
+        TInt variety( LAFIndex.PromptLine() );
+        if ( AknLayoutUtils::PenEnabled() )
+           {
+           variety = NbrOfPromptLines() != 0 ? ( 6 - NbrOfPromptLines() ) : 5;
+            }
+        TAknWindowLineLayout lineLayout( AknLayoutScalable_Avkon::query_popup_pane( variety ) );
+        TAknTextComponentLayout textLayout( AknLayoutScalable_Avkon::query_popup_pane_t1()  );        
+        if ( KFMRadioFrequencyQueryDialogCustomAdditionHeight )
+        	{
+        	lineLayout.it = iDialogSize.iHeight / 2 - lineLayout.iH / 2; 
+        	}
+      
+        AknLayoutUtils::LayoutMfne( edwin, LayoutRect(), 
+               TAknWindowComponentLayout::ComposeText( 
+               		lineLayout,
+                		textLayout ) );
+
+       
+        edwin->SetBorder( TGulBorder::ENone );
+        if ( IsFocused() && !edwin->IsFocused() )
+            {
+            edwin->SetFocus( ETrue );
+            }
+        edwin->SetUpAndDownKeysConsumed( ETrue );
+        }      
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::LayoutPrompt
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::LayoutPrompt(const TLayoutMethod& /*aLayoutM*/)
+    {
+	if (iMyPrompt)
+		{
+		MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+    	TRgb color;
+    	TInt error = AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG19 );
+    	
+		AknLayoutUtils::LayoutLabel(iMyPrompt, LayoutRect(), AKN_LAYOUT_TEXT_Code_query_pop_up_window_texts_Line_1(0) );
+       
+        if (!error)
+        	{
+            TRAP_IGNORE(AknLayoutUtils::OverrideControlColorL( *iMyPrompt, EColorLabelText, color ) )
+        	}
+		}
+
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::LayoutImageOrAnim
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::LayoutImageOrAnim(const TLayoutMethod& /*aLayoutM*/)
+    {
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::LayoutEditorFrame
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::LayoutEditorFrame(const TLayoutMethod& /*aLayoutM*/)
+    {
+    TIndex LAFIndex(NbrOfPromptLines());
+    TRect rect = LayoutRect();
+     
+	TInt variety( LAFIndex.PromptLine() );
+    TAknWindowLineLayout lineLayout(AKN_LAYOUT_WINDOW_Code_query_pop_up_window_elements_Line_1( variety ));
+	lineLayout.il += KEditorFrameCustomLRMargins;
+    lineLayout.ir += KEditorFrameCustomLRMargins;
+    lineLayout.it -= KEditorFrameCustomAdditionHeight/2; 
+    lineLayout.ib -= KEditorFrameCustomAdditionHeight/2;
+    lineLayout.iH += KEditorFrameCustomAdditionHeight;
+	if( KFMRadioFrequencyQueryDialogCustomAdditionHeight )
+		{
+    	lineLayout.it = iDialogSize.iHeight/ 2 - lineLayout.iH / 2;
+    	}         
+	iEditorVerShadow.LayoutRect( rect, lineLayout );
+
+	lineLayout = AKN_LAYOUT_WINDOW_Code_query_pop_up_window_elements_Line_2( variety );
+	lineLayout.il += KEditorFrameCustomLRMargins;
+    lineLayout.ir += KEditorFrameCustomLRMargins;
+    lineLayout.it -= KEditorFrameCustomAdditionHeight/2; 
+    lineLayout.ib -= KEditorFrameCustomAdditionHeight/2;
+    lineLayout.iH += KEditorFrameCustomAdditionHeight;
+	if( KFMRadioFrequencyQueryDialogCustomAdditionHeight )
+		{
+    	lineLayout.it = iDialogSize.iHeight/ 2 - lineLayout.iH / 2; 
+    	}     
+	iEditorHorShadow.LayoutRect( rect, lineLayout );
+    
+	// variety needs to be adjusted for touch layouts.
+    if ( AknLayoutUtils::PenEnabled() )
+        {
+        variety = NbrOfPromptLines() != 0 ? ( 6 - NbrOfPromptLines() ) : 5;    
+        }
+	lineLayout = AknLayoutScalable_Avkon::query_popup_pane( variety );
+	lineLayout.il += KEditorFrameCustomLRMargins;
+    lineLayout.ir += KEditorFrameCustomLRMargins;
+    lineLayout.it -= KEditorFrameCustomAdditionHeight/2; 
+    lineLayout.ib -= KEditorFrameCustomAdditionHeight/2;
+    lineLayout.iH += KEditorFrameCustomAdditionHeight;
+	if( KFMRadioFrequencyQueryDialogCustomAdditionHeight )
+		{
+    	lineLayout.it = iDialogSize.iHeight/ 2 - lineLayout.iH / 2;  
+    	}     
+    iEditorFrame.LayoutRect( rect, lineLayout );
+    iFreqEditor->SetEditorFrameRect( iEditorFrame.Rect() ); 
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::LayoutEditorIndicator
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::LayoutEditorIndicator(const TLayoutMethod& /*aLayoutM*/)
+    { 
+    TIndex LAFIndex(NbrOfPromptLines());
+
+    if (!iMyEditorIndicator)
+        return;
+
+    TInt variety( LAFIndex.PromptLine() );
+    if ( AknLayoutUtils::PenEnabled() )
+        {
+        // adjust layout variety for touch
+        variety = 5 - variety;
+        }
+    TAknWindowLineLayout lineLayout(AknLayoutScalable_Avkon::indicator_popup_pane( variety ));
+    lineLayout.ir += KEditorFrameCustomLRMargins;
+    lineLayout.it -= KEditorFrameCustomAdditionHeight/2;
+    if( KFMRadioFrequencyQueryDialogCustomAdditionHeight )
+    	{
+    	lineLayout.it = iDialogSize.iHeight / 2 - lineLayout.iH - iEditorFrame.Rect().Height()/2; 
+    	}     
+    AknLayoutUtils::LayoutControl(iMyEditorIndicator, LayoutRect(), lineLayout );
+   }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::LayoutRect
+// ---------------------------------------------------------
+//
+TRect CFMRadioFrequencyQueryControl::LayoutRect() 
+    {  
+	TPoint topLeft = Position();
+    TRect parent( TPoint(0,0), iDialogSize );
+	TAknLayoutRect layout;
+
+	layout.LayoutRect(parent, AKN_LAYOUT_WINDOW_Note_pop_up_window_graphics_Line_5(parent));
+
+	TRect rect(layout.Rect());
+	topLeft.iX -= rect.iTl.iX;
+    topLeft.iY -= rect.iTl.iY;
+
+    TPoint bottomRight (topLeft);
+    TSize  size (iDialogSize);
+    bottomRight.iY += size.iHeight; 
+    bottomRight.iX += size.iWidth;
+    return TRect(topLeft,bottomRight);		
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::SetLineWidthsL
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::SetLineWidthsL() 
+    {    
+    if (!iLineWidths)
+        return;
+    
+    iLineWidths->Reset();  
+    TAknWindowLineLayout lineLayout(AknLayoutScalable_Avkon::popup_query_code_window(0));
+    if( KFMRadioFrequencyQueryDialogCustomAdditionHeight )
+    lineLayout.it += KFMRadioFrequencyQueryDialogCustomAdditionHeight / 2; 
+    
+    TAknLayoutRect parentLayoutRect;
+    parentLayoutRect.LayoutRect(iAvkonAppUi->ClientRect(), lineLayout);
+     
+    TAknLayoutText textRect;
+    for (TInt i = 0; i < 3; i++)
+        {  
+        TAknTextLineLayout textLineLayout = AKN_LAYOUT_TEXT_Code_query_pop_up_window_texts_Line_1(i);
+        if ( KFMRadioFrequencyQueryDialogCustomAdditionHeight )
+        	{
+          	textLineLayout.iB -= KFMRadioFrequencyQueryDialogCustomAdditionHeight / 2; 
+        	}
+        textRect.LayoutText(parentLayoutRect.Rect(), textLineLayout);
+        iLineWidths->AppendL(textRect.TextRect().Width());
+        }   
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::Draw
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::Draw(const TRect& /*aRect*/) const
+    {
+    CWindowGc& gc=SystemGc(); 
+    TRect rect(Rect());
+    
+    TRect dialogRect(TPoint(0,0), iDialogSize );
+    rect.iBr.iY += dialogRect.iBr.iY; 
+
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+
+    TRgb color;
+    TInt error = AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG19 );
+    if ( !error )
+        {        
+        TRAP_IGNORE(AknLayoutUtils::OverrideControlColorL( *(CAknQueryControl*)this, EColorLabelText, color ) );
+        }
+
+    MAknsControlContext* cc = AknsDrawUtils::ControlContext( this );
+    AknsDrawUtils::Background( skin, cc, this, gc, rect ); 
+    DrawFrequencyEditorFrame(gc,rect);     
+    }
+
+/**
+ * Draw frequency editor frame and shadow 
+ */
+void CFMRadioFrequencyQueryControl::DrawFrequencyEditorFrame(CWindowGc& aGc,TRect& /*aRect*/) const
+    {
+    if (iHasEditor)
+        {
+        TBool skinnedDraw( EFalse );     
+        skinnedDraw = AknsDrawUtils::Background( 
+                AknsUtils::SkinInstance(), 
+                iEditorContext, 
+                aGc, 
+                iEditorFrame.Rect() );  
+        
+        if( !skinnedDraw )
+            {
+            iEditorFrame.DrawOutLineRect(aGc);
+            iEditorVerShadow.DrawRect(aGc); 
+            iEditorHorShadow.DrawRect(aGc);
+            }
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::SizeChanged.
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::SizeChanged()
+    {  
+	if (iMyPrompt)
+		{
+		iMyPrompt->SetRect(LayoutRect());
+		LayoutPrompt(ETimeQueryLayoutM);
+		}
+    if (iFreqEditor)
+		{
+		LayoutEditor(ETimeQueryLayoutM);
+		}
+			
+    if( iHasEditor && iEditorContext )
+        {
+        // Layout editor context
+        TAknLayoutRect topLeft;
+        TAknLayoutRect bottomRight;
+        
+        TAknWindowLineLayout lineLayout(SkinLayout::Input_field_skin_placing__general__Line_2());
+        topLeft.LayoutRect(iEditorFrame.Rect(), lineLayout );                    
+        bottomRight.LayoutRect(TRect(iEditorFrame.Rect().iBr, iEditorFrame.Rect().iBr), SkinLayout::Input_field_skin_placing__general__Line_5());
+		
+        TRect outerRect = TRect(topLeft.Rect().iTl, bottomRight.Rect().iBr);
+        TRect innerRect = TRect(topLeft.Rect().iBr, bottomRight.Rect().iTl);
+        
+        outerRect.iTl.iY -= KFMRadioEditorCustomInnerFrameSize;
+        outerRect.iBr.iY += KFMRadioEditorCustomInnerFrameSize;				
+		
+		innerRect.iTl.iY -= KFMRadioEditorCustomInnerFrameSize;
+        innerRect.iBr.iY += KFMRadioEditorCustomInnerFrameSize;	
+				
+        iEditorContext->SetFrameRects( outerRect, innerRect );
+        // Chain with the background (since the frame doesn't occupy the entire
+        // layout and it may even be transparent)
+        iEditorContext->SetParentContext( AknsDrawUtils::ControlContextOfParent( this ) );
+        
+        if ( AknLayoutUtils::PenEnabled() )
+            {
+            if ( !iIncreaseValueButton )
+                {
+                TRAPD( err, iIncreaseValueButton = 
+                         CAknButton::NewL(KAvkonBitmapFile,
+                         EMbmAvkonQgn_indi_button_increase,
+                         EMbmAvkonQgn_indi_button_increase_mask,
+                         -1,
+                         -1,
+                         EMbmAvkonQgn_indi_button_increase_pressed,
+                         EMbmAvkonQgn_indi_button_increase_pressed_mask,
+                         -1,
+                         -1,
+                         KNullDesC,
+                         KNullDesC,
+                         KAknButtonNoFrame | KAknButtonKeyRepeat | KAknButtonReportOnLongPress,
+                         0,
+                         KAknsIIDQgnIndiButtonIncrease,
+                         KAknsIIDNone,
+                         KAknsIIDQgnIndiButtonIncreasePressed,
+                         KAknsIIDNone );
+						iIncreaseValueButton->SetContainerWindowL(*this);
+                );
+                
+                if ( err == KErrNone )
+                	{
+	                iIncreaseValueButton->SetParent(this);
+	                iIncreaseValueButton->SetObserver(this);
+	                iIncreaseValueButton->MakeVisible(ETrue);
+	                iIncreaseValueButton->SetFocusing(EFalse);
+					iIncreaseValueButton->SetKeyRepeatInterval( KFMRadioButtonRepeatDelay, KFMRadioButtonRepeatInterval );
+		    		iIncreaseValueButton->SetLongPressInterval( KFMRadioButtonLongPressDelay );
+		    		}
+                }
+                
+            if ( !iDecreaseValueButton )
+                {
+                TRAPD( err, iDecreaseValueButton = CAknButton::NewL(KAvkonBitmapFile,
+											                         EMbmAvkonQgn_indi_button_decrease,
+											                         EMbmAvkonQgn_indi_button_decrease_mask,
+											                         -1,
+											                         -1,
+											                         EMbmAvkonQgn_indi_button_decrease_pressed,
+											                         EMbmAvkonQgn_indi_button_decrease_pressed_mask,
+											                         -1,
+											                         -1,
+											                         KNullDesC,
+											                         KNullDesC,
+											                         KAknButtonNoFrame | KAknButtonKeyRepeat | KAknButtonReportOnLongPress,
+											                         0,
+											                         KAknsIIDQgnIndiButtonDecrease,
+											                         KAknsIIDNone,
+											                         KAknsIIDQgnIndiButtonDecreasePressed,
+											                         KAknsIIDNone );
+    	            		iDecreaseValueButton->SetContainerWindowL(*this); 
+                );
+                
+                if ( err == KErrNone )
+                	{
+                iDecreaseValueButton->SetParent(this);
+                iDecreaseValueButton->SetObserver(this);
+                iDecreaseValueButton->MakeVisible(ETrue);
+                iDecreaseValueButton->SetFocusing(EFalse);
+				iDecreaseValueButton->SetKeyRepeatInterval( KFMRadioButtonRepeatDelay, KFMRadioButtonRepeatInterval );
+	    		iDecreaseValueButton->SetLongPressInterval( KFMRadioButtonLongPressDelay );
+		    		}
+            	}
+            // Position the buttons according to LAF
+            
+            TIndex LAFIndex(NbrOfPromptLines());
+            TInt variety( 5 - LAFIndex.PQCWindow() );
+            
+            AknLayoutUtils::TAknCbaLocation cbaLocation = AknLayoutUtils::CbaLocation();
+            TInt offset = 0;
+            if (cbaLocation == AknLayoutUtils::EAknCbaLocationRight)
+                {
+                offset = 3;
+                }
+            else if (cbaLocation == AknLayoutUtils::EAknCbaLocationLeft)
+                {
+                offset = 6;
+                }
+            variety += offset;    
+
+            TAknWindowComponentLayout btnSpaceLayout;            
+            
+            btnSpaceLayout = AknLayoutScalable_Avkon::button_value_adjust_pane( variety );
+              
+            if ( iIncreaseValueButton )
+                {
+    			TAknWindowLineLayout buttonIncr = TAknWindowComponentLayout::Compose(
+				    btnSpaceLayout,
+				    AknLayoutScalable_Avkon::button_value_adjust_pane_g1()).LayoutLine();
+
+				TInt marginToNumberFrame = KEditorFrameCustomLRMargins - 
+				KFMRadioEditorCustomButtonMarginToLeftFrame - KFMRadioEditorCustomButtonSize;
+																    
+    			buttonIncr.ir += marginToNumberFrame;
+    			buttonIncr.iH += KFMRadioEditorCustomButtonSize;
+    			buttonIncr.iW += KFMRadioEditorCustomButtonSize;
+    			
+    			if ( KFMRadioFrequencyQueryDialogCustomAdditionHeight )
+					{
+    				buttonIncr.it = iDialogSize.iHeight / 2 - buttonIncr.iH;  
+    				}
+    				
+                TAknLayoutRect increaseValueButtonRect;
+                increaseValueButtonRect.LayoutRect( LayoutRect(), buttonIncr ); 
+                iIncreaseValueButton->SetRect(increaseValueButtonRect.Rect());
+                }
+                
+            if ( iDecreaseValueButton) 
+                {
+    			TAknWindowLineLayout buttonDecr = TAknWindowComponentLayout::Compose(
+				    btnSpaceLayout,
+				    AknLayoutScalable_Avkon::button_value_adjust_pane_g2()).LayoutLine();
+				    
+				TInt marginToNumberFrame = KEditorFrameCustomLRMargins - 
+				KFMRadioEditorCustomButtonMarginToLeftFrame - KFMRadioEditorCustomButtonSize;
+																    
+    			buttonDecr.ir += marginToNumberFrame;
+    			buttonDecr.iH += KFMRadioEditorCustomButtonSize;
+    			buttonDecr.iW += KFMRadioEditorCustomButtonSize;
+    			
+    			if ( KFMRadioFrequencyQueryDialogCustomAdditionHeight )
+    				{
+    				buttonDecr.it = iDialogSize.iHeight / 2;  
+    				}
+                TAknLayoutRect decreaseValueButtonRect;
+                decreaseValueButtonRect.LayoutRect( LayoutRect(), buttonDecr ); 
+                iDecreaseValueButton->SetRect(decreaseValueButtonRect.Rect());
+                }
+            }    
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::MopSupplyObject
+// ---------------------------------------------------------
+//
+TTypeUid::Ptr CFMRadioFrequencyQueryControl::MopSupplyObject(TTypeUid aId)
+    {    
+    if( (aId.iUid == MAknsControlContext::ETypeId) && 
+        iEditorContext && iHasEditor )
+        {
+        // Return specific context iff editor exists and the context
+        // has been constructed.
+        return MAknsControlContext::SupplyMopObject( 
+            aId, iEditorContext );
+        }
+
+    if ( aId.iUid == CAknQueryControl::ETypeId )
+    	{
+    	return aId.MakePtr( this );
+    	}
+    
+    return SupplyMopObject(aId, iMyEditorIndicator);
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::WindowLayout
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::WindowLayout( TAknWindowLineLayout& aLayout ) const
+    {
+    TIndex LAFIndex(NbrOfPromptLines());
+  
+	aLayout = AknLayoutScalable_Avkon::popup_query_code_window(LAFIndex.PQCWindow());
+	if( KFMRadioFrequencyQueryDialogCustomAdditionHeight )
+		{
+		aLayout.iH += KFMRadioFrequencyQueryDialogCustomAdditionHeight; 
+		}
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::CanLeaveEditorL
+// ---------------------------------------------------------
+//
+TBool CFMRadioFrequencyQueryControl::CanLeaveEditorL() 
+	{
+	FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyQueryControl::CanLeaveEditorL") ) );
+	
+    if (iFreqEditor)
+		{
+		return iFreqEditor->CanLeaveEditorL();
+		}
+	return ETrue;
+    }
+
+
+/*********************************
+ * CFMRadioManualTuningEditorIndicator
+ *********************************/
+
+CFMRadioFrequencyQueryControl::CFMRadioManualTuningEditorIndicator* CFMRadioFrequencyQueryControl::CFMRadioManualTuningEditorIndicator::NewL(CCoeControl* aControl)
+    {
+    CFMRadioFrequencyQueryControl::CFMRadioManualTuningEditorIndicator* self = new(ELeave)CFMRadioFrequencyQueryControl::CFMRadioManualTuningEditorIndicator();
+    CleanupStack::PushL(self);
+    self->ConstructL(aControl);
+    CleanupStack::Pop(self);
+    return self;
+    }
+
+CFMRadioFrequencyQueryControl::CFMRadioManualTuningEditorIndicator::~CFMRadioManualTuningEditorIndicator()
+    {
+    }
+
+CFMRadioFrequencyQueryControl::CFMRadioManualTuningEditorIndicator::CFMRadioManualTuningEditorIndicator() : CAknIndicatorContainer(CAknIndicatorContainer::EQueryEditorIndicators)
+    {
+    }
+
+void CFMRadioFrequencyQueryControl::CFMRadioManualTuningEditorIndicator::ConstructL(CCoeControl* aControl)
+    {
+    CreateWindowL(aControl);
+    
+	TResourceReader reader;
+    iCoeEnv->CreateResourceReaderLC(reader, R_AVKON_NAVI_PANE_EDITOR_INDICATORS);
+    ConstructFromResourceL(reader);
+    CleanupStack::PopAndDestroy();  // resource reader
+
+    SetExtent(TPoint(0,0), TSize(0,0));
+    MakeVisible( EFalse );
+    //ActivateL();
+    }
+
+void CFMRadioFrequencyQueryControl::CFMRadioManualTuningEditorIndicator::SetState(TAknEditingState aState)
+	{
+	FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyQueryControl::CFMRadioManualTuningEditorIndicator::SetState (%d)"), (int)aState ) );
+	if (AknLayoutUtils::Variant() == EEuropeanVariant)
+		{    
+		SetIndicatorState(TUid::Uid(EAknNaviPaneEditorIndicatorNumberCase), (aState == ENumeric) ? EAknIndicatorStateOn : EAknIndicatorStateOff, EFalse);    
+		SetIndicatorState(TUid::Uid(EAknNaviPaneEditorIndicatorArabicIndicNumberCase), (aState == EArabicIndicNumeric) ? EAknIndicatorStateOn : EAknIndicatorStateOff, EFalse);
+		SetIndicatorState(TUid::Uid(EAknNaviPaneEditorIndicatorQuery), (aState == EStateNone)  ? EAknIndicatorStateOff : EAknIndicatorStateOn, EFalse);
+		}
+	else
+		{
+        SetIndicatorState(TUid::Uid(EAknNaviPaneEditorIndicatorNumberCase), (aState == ENumeric) ? EAknIndicatorStateOn : EAknIndicatorStateOff,  EFalse);    
+		SetIndicatorState(TUid::Uid(EAknNaviPaneEditorIndicatorQuery), (aState == EStateNone)  ? EAknIndicatorStateOff : EAknIndicatorStateOn, EFalse);
+		}
+	
+	MakeVisible( EFalse );
+	//DrawDeferred();
+	}
+
+CAknIndicatorContainer* CFMRadioFrequencyQueryControl::CFMRadioManualTuningEditorIndicator::IndicatorContainer()
+    {
+    return this;
+    }
+
+void CFMRadioFrequencyQueryControl::CFMRadioManualTuningEditorIndicator::SetFlags(TBitFlags16 aFlags)
+    {
+    iBitFlags = aFlags;
+    }
+
+void CFMRadioFrequencyQueryControl::CFMRadioManualTuningEditorIndicator::Reserved_1()
+	{
+	}
+
+/*****************************************************************
+ * CFMRadioFrequencyQueryControl::TIndex
+ *
+ * Manage indexes into LAF tables
+ *
+ * PN stands for "Popup Note"
+ *
+ * PQD stands for "Popup Query Data'
+ *
+ * PQC stands for "Popup Query Code'
+ *
+ * 'DPQ' stands for "Data Query Popup"
+ ******************************************************************/
+
+  
+CFMRadioFrequencyQueryControl::TIndex::TIndex(TInt aNumberOfPromptLines)
+    : iNumberOfPromptLines(aNumberOfPromptLines)
+    {
+    }
+        
+/**
+ * Return index into LAF tables that depend directly on number of prompt lines,
+ * index is equal to number of prompt lines minus one unless there are no prompt
+ * lines in which case the index is zero
+ */
+TInt CFMRadioFrequencyQueryControl::TIndex::PromptLine() const
+    {
+    return iNumberOfPromptLines > 0 ? iNumberOfPromptLines - 1 : 0;
+    }
+
+/**
+ * Return index into Main Pane PQDC Window, which
+ * depends on total number of prompt lines minus 2, e.g.
+ * index 0 for 2 prompt lines total.
+ *
+ */
+TInt CFMRadioFrequencyQueryControl::TIndex::DQPWindowTextsLine2(TInt aLineNum) const
+    {
+    static const TInt  KDataQueryPopupWindowTextsLine2Index[3][5] = 
+    {   {0,  1, 2, 3, 4},    //1 PROMPT LINE
+        {5,  6, 7, 8, 9},    //2 PROMPT LINES
+        {10, 10, 10, 10, 10}  }; //3 PROMPT LINES
+    
+    return KDataQueryPopupWindowTextsLine2Index[PromptLine()][aLineNum-1];
+    }
+
+TInt CFMRadioFrequencyQueryControl::TIndex::PNWindow() const
+    {     
+    static const TInt KPopupNoteWindowIndex[5] = { 0,0,0,1,2 };
+    
+    AknLayoutUtils::TAknCbaLocation cbaLocation = AknLayoutUtils::CbaLocation();
+    if (cbaLocation == AknLayoutUtils::EAknCbaLocationRight)
+        {
+        // variety numbers for right CBA are 3,4 and 5 
+        return (KPopupNoteWindowIndex[PromptLine()] + 3);  
+        }
+    else if (cbaLocation == AknLayoutUtils::EAknCbaLocationLeft)
+        {
+        /// variety numbers for left CBA are 6,7 and 8 
+        return (KPopupNoteWindowIndex[PromptLine()] + 6);
+        }
+    else // bottom
+        {
+        return KPopupNoteWindowIndex[PromptLine()];
+        }
+    }
+
+TInt CFMRadioFrequencyQueryControl::TIndex::PQDWindow(TInt aLineNum) const
+    {
+    AknLayoutUtils::TAknCbaLocation cbaLocation = AknLayoutUtils::CbaLocation();
+    
+    if (cbaLocation == AknLayoutUtils::EAknCbaLocationRight)
+        {
+        static const TInt KPopupQueryDataWindowIndex[7] = 
+            {13, 12, 11, 10, 9, 8, 7}; // variety numbers for right CBA are 7-13 
+        return KPopupQueryDataWindowIndex[PromptLine()+aLineNum-1];
+        }
+    else if (cbaLocation == AknLayoutUtils::EAknCbaLocationLeft)
+        {
+        static const TInt KPopupQueryDataWindowIndex[7] = 
+            {20, 19, 18, 17, 16, 15, 14}; // variety numbers for left CBA are 14-20 
+        return KPopupQueryDataWindowIndex[PromptLine()+aLineNum-1];
+        }
+    else // bottom
+        {
+        static const TInt KPopupQueryDataWindowIndex[7] = 
+            {0, 1, 2, 3, 4, 5, 6}; // variety numbers for bottom CBA are 0-6
+        return KPopupQueryDataWindowIndex[PromptLine()+aLineNum-1];
+        }
+    }
+    
+TInt CFMRadioFrequencyQueryControl::TIndex::PQCWindow() const
+    {    
+    AknLayoutUtils::TAknCbaLocation cbaLocation = AknLayoutUtils::CbaLocation();
+    
+    if (cbaLocation == AknLayoutUtils::EAknCbaLocationRight)
+        {
+        // variety numbers for right CBA are 3,4 and 5 
+        return iNumberOfPromptLines > 0 ? (iNumberOfPromptLines - 1 + 3) : 3;
+        }
+    else if (cbaLocation == AknLayoutUtils::EAknCbaLocationLeft)
+        {
+        // variety numbers for left CBA are 6,7 and 8 
+        return iNumberOfPromptLines > 0 ? (iNumberOfPromptLines - 1 + 6) : 6;
+        }
+    else // bottom
+        {
+        // variety numbers for bottom CBA are 0,1 and 2 
+        return iNumberOfPromptLines > 0 ? (iNumberOfPromptLines - 1) : 0;
+        }
+    }    
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryControl::HandlePointerEventL
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryControl::HandlePointerEventL( const TPointerEvent& aPointerEvent )
+    {
+    CCoeControl::HandlePointerEventL( aPointerEvent );
+    iFreqEditor->HandlePointerEventL( aPointerEvent );
+    }
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradiofrequencyquerydialog.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,159 @@
+/*
+* Copyright (c) 2000 Nokia Corporation and/or 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: Manual tuning dialog for FMRadio
+*
+*/
+
+
+// INCLUDE FILES
+#include	<aknborders.h>
+#include	<eikcapc.h>
+
+#include 	<aknlayoutscalable_avkon.cdl.h>
+
+#include    "fmradiofrequencyquerydialog.h"
+#include	"fmradiofrequencyquerycontrol.h"
+#include	"fmradio.hrh"
+#include 	"debug.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// C++ default constructor can NOT contain any code, that
+// might leave.
+//
+CFMRadioFrequencyQueryDialog::CFMRadioFrequencyQueryDialog(TUint32& aFreq, const TTone& aTone) : CAknQueryDialog(aTone), iFreq(aFreq)
+    {
+    }
+
+// Two-phased constructor.
+CFMRadioFrequencyQueryDialog* CFMRadioFrequencyQueryDialog::NewL(TUint32& aFreq, const TTone& aTone)
+    {
+    CFMRadioFrequencyQueryDialog* self = new (ELeave) CFMRadioFrequencyQueryDialog(aFreq, aTone);
+	CleanupStack::PushL(self);
+	CEikonEnv::Static()->AddLibraryL(CFMRadioFrequencyQueryControl::StaticCreateCustomControl);
+	CleanupStack::Pop(self);
+    return self;
+    }
+
+    
+// Destructor
+CFMRadioFrequencyQueryDialog::~CFMRadioFrequencyQueryDialog()
+    {
+	CEikonEnv::Static()->RemoveLibrary(CFMRadioFrequencyQueryControl::StaticCreateCustomControl);
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryDialog::QueryControl
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+CAknQueryControl* CFMRadioFrequencyQueryDialog::QueryControl() const
+    {
+	CEikCaptionedControl* controlPtr = NULL;
+    const TInt KMaxNumPages = GetNumberOfPages();
+    for (TInt pageCount=0; pageCount<KMaxNumPages; pageCount++)
+        {
+        const TInt KMaxNumLinesOnThisPage= GetNumberOfLinesOnPage(pageCount);
+        for (TInt lineCount=0; lineCount< KMaxNumLinesOnThisPage; lineCount++)
+            {
+            controlPtr = GetLineByLineAndPageIndex(lineCount, pageCount);
+            if (controlPtr && controlPtr->iControlType == EFMRadioCtFrequencyQuery) 
+                {
+                return static_cast<CAknQueryControl*>(controlPtr->iControl);
+                }
+            }
+        }
+    return 0;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryDialog::PreLayoutDynInitL
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryDialog::PreLayoutDynInitL()
+    {
+   // SetBorder(AknBorderId::EAknBorderNotePopup);
+    SetBorder( TGulBorder::ENone );
+    SetEditableL(ETrue) ;
+
+    CFMRadioFrequencyQueryControl* control = static_cast<CFMRadioFrequencyQueryControl*>(QueryControl());
+    if (control)
+        {
+        control->SetQueryControlObserver(this);
+        control->SetFrequency(iFreq);
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryDialog::HandleQueryEditorStateEventL
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TBool CFMRadioFrequencyQueryDialog::HandleQueryEditorStateEventL(CAknQueryControl* aQueryControl, TQueryControlEvent aEventType, TQueryValidationStatus aStatus)
+	{
+	FTRACE( FPrint( _L(" *** FM Radio -- CFMRadioFrequencyQueryDialog::HandleQueryEditorStateEventL") ) );
+	CAknQueryDialog::HandleQueryEditorStateEventL(aQueryControl, aEventType, aStatus);
+	CFMRadioFrequencyQueryControl* control = static_cast<CFMRadioFrequencyQueryControl*>(aQueryControl);
+	if ((control) && (aStatus == MAknQueryControlObserver::EEditorValueValid) && (iFreq != control->Frequency()))
+		{
+		iFreq = control->Frequency();
+		ReportEventL(EEventStateChanged);
+		}
+	return ETrue;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryDialog::Frequency
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TUint32 CFMRadioFrequencyQueryDialog::Frequency() const
+	{
+	return iFreq;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryDialog::UpdateLeftSoftKeyL
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CFMRadioFrequencyQueryDialog::UpdateLeftSoftKeyL()
+    {
+    CFMRadioFrequencyQueryControl* control = static_cast<CFMRadioFrequencyQueryControl*>(QueryControl());
+    if ( control )
+        {
+        TBool showCommand = control->EditorContentIsValidL();
+        ButtonGroupContainer().MakeCommandVisibleByPosition( CEikButtonGroupContainer::ELeftSoftkeyPosition, showCommand );
+        ButtonGroupContainer().MakeCommandVisibleByPosition( CEikButtonGroupContainer::EMiddleSoftkeyPosition, showCommand );
+        ButtonGroupContainer().DrawDeferred();
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioFrequencyQueryDialog::OkToExitL
+// ---------------------------------------------------------
+//
+TBool CFMRadioFrequencyQueryDialog::OkToExitL(TInt /*aButtonId*/)
+	{
+	CFMRadioFrequencyQueryControl* control = static_cast<CFMRadioFrequencyQueryControl*>(QueryControl());
+	return control->CanLeaveEditorL();
+	}
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradioglobalconfirmationquery.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,127 @@
+/*
+* Copyright (c) 2006-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:  Source file of CFMRadioGlobalConfirmationQuery
+*
+*/
+
+
+#include <AknGlobalConfirmationQuery.h>
+
+#include "fmradiodefines.h"
+#include "fmradioapp.h"
+#include "fmradioglobalconfirmationquery.h"
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// CFMRadioGlobalConfirmationQuery::CFMRadioGlobalConfirmationQuery
+// ---------------------------------------------------------------------------
+//
+CFMRadioGlobalConfirmationQuery::CFMRadioGlobalConfirmationQuery(MFMRadioGlobalConfirmationQueryObserver* aObserver)
+    : CActive( CActive::EPriorityStandard ), iObserver(aObserver)
+    {
+    CActiveScheduler::Add( this );
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioGlobalConfirmationQuery::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioGlobalConfirmationQuery::ConstructL()
+    {
+    iAknGlobalConfirmationQuery = CAknGlobalConfirmationQuery::NewL();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioGlobalConfirmationQuery::NewL
+// ---------------------------------------------------------------------------
+//
+CFMRadioGlobalConfirmationQuery* CFMRadioGlobalConfirmationQuery::NewL(MFMRadioGlobalConfirmationQueryObserver* aObserver)
+    {
+    CFMRadioGlobalConfirmationQuery* self = CFMRadioGlobalConfirmationQuery::NewLC(aObserver);
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioGlobalConfirmationQuery::NewLC
+// ---------------------------------------------------------------------------
+//
+CFMRadioGlobalConfirmationQuery* CFMRadioGlobalConfirmationQuery::NewLC(MFMRadioGlobalConfirmationQueryObserver* aObserver)
+    {
+    CFMRadioGlobalConfirmationQuery* self = NULL;
+    self = new( ELeave ) CFMRadioGlobalConfirmationQuery(aObserver);
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioGlobalConfirmationQuery::~CFMRadioGlobalConfirmationQuery
+// ---------------------------------------------------------------------------
+//
+CFMRadioGlobalConfirmationQuery::~CFMRadioGlobalConfirmationQuery()
+    {
+    Cancel();
+    delete iAknGlobalConfirmationQuery;
+    delete iText;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioGlobalConfirmationQuery::ShowQueryL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioGlobalConfirmationQuery::ShowQueryL(const TDesC& aText, TInt aSoftkeys, TInt aAnimation/*, TInt aDialogId*/)
+    {
+    Cancel();
+    delete iText;
+    iText = NULL;
+    iText = aText.AllocL();
+    iAknGlobalConfirmationQuery->ShowConfirmationQueryL( iStatus, *iText, aSoftkeys, aAnimation );
+    SetActive();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioGlobalConfirmationQuery::DoCancel
+// ---------------------------------------------------------------------------
+//
+void CFMRadioGlobalConfirmationQuery::DoCancel()
+    {
+    if ( iAknGlobalConfirmationQuery )
+        {
+        iAknGlobalConfirmationQuery->CancelConfirmationQuery();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioGlobalConfirmationQuery::RunL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioGlobalConfirmationQuery::RunL()
+    {
+    if ( iObserver )
+        {
+        iObserver->GlobalConfirmationQueryDismissedL(iStatus.Int());
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioGlobalConfirmationQuery::RunError
+// ---------------------------------------------------------------------------
+//
+TInt CFMRadioGlobalConfirmationQuery::RunError(TInt /*aError*/)
+    {
+    return KErrNone;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradioidlecontroller.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,130 @@
+/*
+* 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:  fmradio media idle controller
+*
+*/
+
+#include "fmradioidlecontroller.h"
+#include "fmradioidlecontrolinterface.h"
+#include "debug.h"
+
+// ======== MEMBER FUNCTIONS ========
+
+// ----------------------------------------------------------------------------
+// CFMRadioIdleController::CFMRadioIdleController
+// Default constructor
+// ----------------------------------------------------------------------------
+//
+CFMRadioIdleController::CFMRadioIdleController()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioIdleController::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioIdleController::ConstructL()
+    {
+    FTRACE( FPrint( _L("CFMRadioIdleController::ConstructL()") ) );
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioIdleController::NewL
+// Two-phase constructor of CFMRadioPreset
+// ---------------------------------------------------------------------------
+//
+CFMRadioIdleController* CFMRadioIdleController::NewL() 
+    {
+    FTRACE( FPrint( _L("CFMRadioIdleController::NewL()") ) );
+    CFMRadioIdleController* self = new ( ELeave ) CFMRadioIdleController();
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioIdleController::~CFMRadioIdleController
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CFMRadioIdleController::~CFMRadioIdleController()
+    {
+    FTRACE( FPrint( _L("CFMRadioIdleController::~CFMRadioIdleController()") ) );
+    iControlArray.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioIdleController::AddControlItem
+// ---------------------------------------------------------------------------
+//
+void CFMRadioIdleController::AddControlItem( const MFMRadioIdleControlInterface& aControl )
+    {    
+    TInt index = iControlArray.FindInAddressOrder( &aControl );
+    if ( index == KErrNotFound )
+        {
+        iControlArray.InsertInAddressOrder( &aControl );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioIdleController::ShowControl
+// ---------------------------------------------------------------------------
+//
+void CFMRadioIdleController::ShowControl( const MFMRadioIdleControlInterface& aControl )
+    {
+    for ( TInt i = 0; i < iControlArray.Count(); i++ )
+        {
+        MFMRadioIdleControlInterface* controlItem = iControlArray[i];
+        // show requested item
+        if ( &aControl == controlItem )
+            {
+            controlItem->Show();
+            }
+        else // hide rest of the items
+            {
+            controlItem->Hide();
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioIdleController::HideAllControls
+// ---------------------------------------------------------------------------
+//
+void CFMRadioIdleController::HideAllControls()
+    {
+    FTRACE( FPrint( _L("CFMRadioIdleController::HideAllControls()") ) );
+    for ( TInt i = 0; i < iControlArray.Count(); i++ )
+        {
+        iControlArray[i]->Hide();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioIdleController::DeactivateControls
+// ---------------------------------------------------------------------------
+//
+void CFMRadioIdleController::DeactivateControls()
+    {
+    FTRACE( FPrint( _L("CFMRadioIdleController::DeactivateControls()") ) );
+    for ( TInt i = 0; i < iControlArray.Count(); i++ )
+        {
+        iControlArray[i]->Deactivate();
+        }
+    }
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradiologo.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,354 @@
+/*
+* 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:  Implementation of the class CFMRadioLogo
+*
+*/
+
+
+// INCLUDE FILES
+
+#include <AknUtils.h>
+#include <AknsConstants.h>
+#include <alf/alfenv.h>
+#include <alf/alfimagevisual.h>
+#include <alf/alfevent.h>
+#include <alf/alfanchorlayout.h>
+#include <aknlayoutscalable_apps.cdl.h>
+#include <data_caging_path_literals.hrh>
+#include <fmradio.mbg>
+
+#include "fmradiologo.h"
+#include "fmradioalfrdsviewobserver.h"
+#include "fmradiodefines.h"
+#include "debug.h"
+#include "fmradiologoobserver.h"
+
+// CONSTANTS
+
+const TInt  KLogoFadeInDefaultDurationTime = 500;
+const TInt  KLogoFadeOutDefaultDurationTime = 500;
+const TInt  KLogoDisplayPeriod = 2000; // milliseconds = 2 sec
+const TReal KDefaultOpacityInVisibleState = 1.0f;
+const TReal KDefaultOpacityInHiddenState = 0.0f;
+const TInt KLAFVarietyBackgroundImagePortrait = 0;
+const TInt KLAFVarietyBackgroundImageLandscape = 1;
+// bitmap file for the background of the display
+_LIT8( KBitmapAnchorTag, "BitmapAnchorTag" );
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// ---------------------------------------------------------------------------
+// CFMRadioLogo::NewL
+// Two-phase constructor of CFMRadioAlfLogo
+// ---------------------------------------------------------------------------
+//
+CFMRadioLogo* CFMRadioLogo::NewL( CAlfEnv& aEnv )
+    {
+    CFMRadioLogo* self = new ( ELeave ) CFMRadioLogo();
+    CleanupStack::PushL( self );
+    self->ConstructL( aEnv );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CFMRadioLogo::CFMRadioLogo
+// Default constructor
+// ----------------------------------------------------------------------------
+//
+CFMRadioLogo::CFMRadioLogo()
+:  iOpacityInVisibleState( KDefaultOpacityInVisibleState ),
+   iOpacityInHiddenState( KDefaultOpacityInHiddenState ),
+   iIsVisible( ETrue ) // visible by default
+    {
+    //No implementation needed
+    }
+
+
+// ----------------------------------------------------------------------------
+// CFMRadioLogo::SetObserver
+// Sets observer
+// ----------------------------------------------------------------------------
+//
+void CFMRadioLogo::SetObserver( MFMRadioLogoObserver* aObserver )
+    {
+    FTRACE( FPrint( _L( "CFMRadioLogo::SetObserver" ) ) );
+    TInt index = iObservers.FindInAddressOrder( aObserver );
+    if ( index == KErrNotFound )
+        {
+        iObservers.InsertInAddressOrder( aObserver );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CFMRadioLogo::RemoveObserver
+// Removes observer
+// ----------------------------------------------------------------------------
+//
+void CFMRadioLogo::RemoveObserver( MFMRadioLogoObserver* aObserver )
+    {
+	FTRACE( FPrint( _L( "CFMRadioLogo::RemoveObserver" ) ) );
+    TInt index = iObservers.FindInAddressOrder( aObserver );
+
+    if ( index >= 0 )
+        {
+        iObservers.Remove( index );
+        }
+    }
+
+// ----------------------------------------------------------------------------
+// CFMRadioLogo::ConstructL
+// Symbian 2nd phase constructor can leave.
+// ----------------------------------------------------------------------------
+//
+void CFMRadioLogo::ConstructL( CAlfEnv& aEnv )
+    {
+    FTRACE( FPrint( _L( "CFMRadioLogo::ConstructL" ) ) );
+    CAlfControl::ConstructL( aEnv );
+    CreateImageVisualsL();
+    }
+
+// ---------------------------------------------------------------------------
+// ~CFMRadioLogo::~CFMRadioLogo
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CFMRadioLogo::~CFMRadioLogo()
+    {
+    FTRACE( FPrint( _L( "CFMRadioLogo::Destructor" ) ) );
+    Env().CancelCustomCommands( this );
+    iObservers.Close();
+    delete iBackgroundBitmapFileName;
+    } 
+
+// ---------------------------------------------------------------------------
+// CFMRadioLogo::OfferEventL
+// From CAlfControl, takes care of alfred event handling. 
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioLogo::OfferEventL( const TAlfEvent& aEvent )
+    {
+    FTRACE( FPrint( _L( "CFMRadioLogo::OfferEventL" ) ) );
+    TBool eventHandled = EFalse;
+
+    if ( aEvent.IsCustomEvent() )
+        {
+        switch( aEvent.CustomParameter() )
+            {
+        	case EFadeInCompleted:
+                {
+                eventHandled = ETrue;
+                Env().Send( TAlfCustomEventCommand( ELogoDisplayTimerCompleted, this ), KLogoDisplayPeriod );
+                break;
+                }
+            case ELogoDisplayTimerCompleted:
+                {
+                eventHandled = ETrue;
+                for ( TInt i = 0 ; i < iObservers.Count() ; i++ )
+                    {
+                    iObservers[i]->LogoDisplayTimeCompleted();
+                    }
+                break;
+                }
+            default:
+                {
+                break;
+                }
+            }
+        }
+    return eventHandled;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioLogo::SetRect
+// Sets the logo rectangle. 
+// ---------------------------------------------------------------------------
+//
+void CFMRadioLogo::SetRect( const TRect& aRect )
+    {
+    iRect = aRect;
+    if ( iLogoAnchor )
+        {
+        SetAbsoluteCornerAnchors( iLogoAnchor, 0, iRect.iTl, iRect.iBr );
+        iLogoAnchor->UpdateChildrenLayout();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioLogo::CreateImageVisualsL
+// Creates visual for the logo
+// ---------------------------------------------------------------------------
+//
+void CFMRadioLogo::CreateImageVisualsL()
+    {
+    // locate source mbm
+    CCoeEnv* coeEnv = CCoeEnv::Static();
+    TFindFile finder( coeEnv->FsSession() );
+    TInt err = finder.FindByDir( KFMRadioBmpFile, KDC_APP_BITMAP_DIR );
+    if ( err == KErrNone )
+        {
+        iBackgroundBitmapFileName = finder.File().AllocL();
+        }
+
+    iLogoAnchor = CAlfAnchorLayout::AddNewL( *this );
+    iLogoAnchor->SetTagL( KBitmapAnchorTag );
+
+    iImageVisual = CAlfImageVisual::AddNewL( *this, iLogoAnchor );
+
+    // read bitmap size from layout data
+    TRect temp;
+    TAknLayoutRect bitmapLayout;
+    bitmapLayout.LayoutRect(
+            temp,
+            AknLayoutScalable_Apps::area_fmrd2_visual_pane_g1( KLAFVarietyBackgroundImagePortrait ).LayoutLine() );
+
+    // image for portrait
+    iPortraitImage = TAlfImage( KAknsIIDQgnIndiRadioDefault,
+                                   bitmapLayout.Rect().Size(),
+                                   EAspectRatioPreserved,
+                                   iBackgroundBitmapFileName,
+                                   EMbmFmradioQgn_indi_radio_default,
+                                   EMbmFmradioQgn_indi_radio_default_mask );
+
+    // image for landscape
+    bitmapLayout.LayoutRect(
+            temp,
+            AknLayoutScalable_Apps::area_fmrd2_visual_pane_g1( KLAFVarietyBackgroundImageLandscape ).LayoutLine() );    
+
+    iLandscapeImage = TAlfImage( KAknsIIDQgnIndiRadioDefault,
+                                     bitmapLayout.Rect().Size(),
+                                     EAspectRatioPreserved,
+                                     iBackgroundBitmapFileName,
+                                     EMbmFmradioQgn_indi_radio_default,
+                                     EMbmFmradioQgn_indi_radio_default_mask );
+    
+    iImageVisual->SetImage( iPortraitImage );
+    iImageVisual->SetSecondaryImage( iLandscapeImage );
+    }
+
+// ---------------------------------------------------------
+// CFMRadioLogo::Show
+// Fades in the logo with predefined opacity value.
+// ---------------------------------------------------------
+//
+void CFMRadioLogo::Show()
+    {
+    // change status only, fade in and the event are allways triggered so don't
+    // check visibility here
+    iIsVisible = ETrue; 
+    Env().CancelCustomCommands( this );
+    Fade( iImageVisual, KLogoFadeInDefaultDurationTime, iOpacityInVisibleState );
+    Env().Send( TAlfCustomEventCommand( EFadeInCompleted, this ), KLogoFadeInDefaultDurationTime );
+    }
+
+// ---------------------------------------------------------
+// CFMRadioLogo::Hide
+// Fades out the logo with predefined opacity value.
+// ---------------------------------------------------------
+//
+void CFMRadioLogo::Hide()
+    {
+    if ( iIsVisible )
+        {
+        iIsVisible = EFalse;
+        Fade( iImageVisual, KLogoFadeOutDefaultDurationTime, iOpacityInHiddenState );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioLogo::SetOpacityInVisibleState
+// Sets the indicator opacity in visible state.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioLogo::SetOpacityInVisibleState( const TReal aOpacity )
+	{
+	iOpacityInVisibleState = aOpacity;
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioLogo::SetOpacityInHiddenState
+// Sets the logo opacity value in hidden state.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioLogo::SetOpacityInHiddenState( const TReal aOpacity )
+	{
+	iOpacityInHiddenState = aOpacity;
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioLogo::SetAbsoluteCornerAnchors
+// Sets absolute rect of the anchor by top left and bottom right points.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioLogo::SetAbsoluteCornerAnchors( CAlfAnchorLayout* aAnchor,
+                                                     TInt aOrdinal,
+                                                     const TPoint& aTopLeftPosition,
+                                                     const TPoint& aBottomRightPosition )
+	{
+    if ( aAnchor )
+        {					
+        // Set top/left anchor.
+        aAnchor->Attach( aOrdinal, 
+                         EAlfAnchorTypeTopLeft,
+                         TAlfXYMetric( TAlfMetric( aTopLeftPosition.iX ), TAlfMetric( aTopLeftPosition.iY ) ),
+                         EAlfAnchorAttachmentOriginTopLeft );
+        
+        
+        // Set bottom/right anchor.
+        aAnchor->Attach( aOrdinal, 
+                         EAlfAnchorTypeBottomRight, 
+                         TAlfXYMetric( TAlfMetric( aBottomRightPosition.iX ), TAlfMetric( aBottomRightPosition.iY ) ),
+                         EAlfAnchorAttachmentOriginTopLeft );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioLogo::Fade
+// Sets the fading animation to the CAlfVisual object.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioLogo::Fade( CAlfVisual* aVisual, TInt aFadingTime, TReal aOpacity )
+    {
+    TAlfTimedValue opacity;
+    opacity.SetTarget( aOpacity, aFadingTime );
+    aVisual->SetOpacity( opacity );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioLogo::SwitchToLandscapeImage
+// Use secondary image for landscape and primary for portrait
+// ---------------------------------------------------------------------------
+//
+void CFMRadioLogo::SwitchToLandscapeImage( TBool aShow )
+    {
+    if ( aShow )
+        {
+        iImageVisual->SetSecondaryAlpha( TAlfTimedValue( 1.0 ) );
+        }
+    else
+        {
+        iImageVisual->SetSecondaryAlpha( TAlfTimedValue( 0.0 ) );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioLogo::Deactivate
+// from MFMRadioIdleControlInterface
+// ---------------------------------------------------------------------------
+//
+void CFMRadioLogo::Deactivate()
+    {
+    }
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradiomaincontainer.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,817 @@
+/*
+* 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:  Implementation of the class CFMRadioMainContainer
+*
+*/
+
+
+// INCLUDE FILES
+
+#include <alf/alfcontrolgroup.h>
+#include <alf/alfdisplay.h>
+#include <alf/alfroster.h>
+#include <alf/alflayoutmetrics.h>
+#include <AknLayoutFont.h>
+#include <aknlayoutscalable_apps.cdl.h>
+#include <AknsBasicBackgroundControlContext.h>
+#include <AknsDrawUtils.h>
+#include <AknsSkinInstance.h>
+#include <AknsUtils.h>
+#include <aknconsts.h>
+#include <AknDef.h>
+#include <StringLoader.h>
+#include <barsread.h>
+#include <w32std.h>
+#include <e32base.h>
+#include <fontids.hrh>
+#include <gulfont.h>
+#include <fmradio.rsg>
+#include <fmradiouids.h>
+
+#include "fmradiomaincontainer.h"
+#if defined __SERIES60_HELP || defined FF_S60_HELPS_IN_USE
+#include "radio.hlp.hrh"
+#endif
+#include "fmradioengine.h"
+#include "fmradioalfrdsviewer.h"
+#include "fmradioalfvisualizer.h"
+#include "fmradioalfmediaidle.h"
+#include "fmradioalfindicator.h"
+#include "fmradiologo.h"
+#include "fmradiordsreceiverbase.h"
+#include "fmradioalfrdsviewer.h"
+#include "fmradiomainview.h"
+#include "fmradioidlecontroller.h"
+#include "debug.h"
+
+
+// ~3 seconds, 10 frames / second is used
+const TInt KFadeFrames = 30;   
+const TInt KTenMilliSecondsInMicroSeconds = 100000;
+// values from fmradio LAF document
+const TInt KLAFVarietyRDSViewerPortrait = 0;
+const TInt KLAFVarietyRDSViewerLandscape = 1;
+const TInt KLAFVarietyRDSPlusIndicatorPortrait = 0;
+const TInt KLAFVarietyRDSPlusIndicatorLandscape = 1;
+const TInt KLAFVarietyAFIndicatorPortrait = 0;
+const TInt KLAFVarietyAFIndicatorLandscape = 1;
+const TInt KLAFVarietyRDSIndicatorPortrait = 0;
+const TInt KLAFVarietyRDSIndicatorLandscape = 1;
+const TInt KLAFVarietyLogoImagePortrait = 0;
+const TInt KLAFVarietyLogoImageLandscape = 1;
+const TInt KLAFVarietyIndicatorPanePortrait = 0;
+const TInt KLAFVarietyIndicatorPaneLandscape = 1;
+const TInt KLAFVarietyVisualPanePortrait = 0;
+const TInt KLAFVarietyVisualPaneLandscape = 1;
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------------------------------
+// CFMRadioTimer::CFMRadioTimer
+// ---------------------------------------------------------------------------------
+CFMRadioTimer::CFMRadioTimer( MFMRadioTimer* aTimerObserver  ) : 
+	CActive( EPriorityStandard ),
+	iTimerObserver( aTimerObserver )
+	{
+	CActiveScheduler::Add( this );
+	}
+	
+// ---------------------------------------------------------------------------------
+// CFMRadioTimer::~CFMRadioTimer
+// ---------------------------------------------------------------------------------
+CFMRadioTimer::~CFMRadioTimer()
+	{
+	
+	Cancel();
+	}
+	
+// ---------------------------------------------------------------------------------
+// CFMRadioTimer::RunL
+// ---------------------------------------------------------------------------------
+void CFMRadioTimer::RunL()
+	{
+	
+	iTimerObserver->TimerTimeOut( iStatus.Int() );
+	}
+	
+// ---------------------------------------------------------------------------------
+// CFMRadioTimer::DoCancel
+// ---------------------------------------------------------------------------------
+void CFMRadioTimer::DoCancel()
+	{
+	
+	TInt ret = KErrCancel;
+	iTimerObserver->TimerTimeOut( ret );
+	}
+	
+// ---------------------------------------------------------------------------------
+// CFMRadioTimer::Activate
+// ---------------------------------------------------------------------------------
+void CFMRadioTimer::Activate()
+	{
+	SetActive();	
+	}
+
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainContainer::NewL
+// Two-phase constructor of CFMRadioDelayTimer
+// --------------------------------------------------------------------------------
+//
+CFMRadioMainContainer* CFMRadioMainContainer::NewL(
+    const TRect& aRect,
+    CAlfEnv& aAlfEnv,
+    CRadioEngine& aRadioEngine )
+    {
+    CFMRadioMainContainer* self = new (ELeave) CFMRadioMainContainer( aAlfEnv, aRadioEngine  );
+    CleanupStack::PushL( self );
+    self->ConstructL( aRect );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainContainer::CFMRadioMainContainer
+// Default constructor
+// --------------------------------------------------------------------------------
+//
+CFMRadioMainContainer::CFMRadioMainContainer( CAlfEnv& aAlfEnv, CRadioEngine& aRadioEngine ) :
+	iAlfEnv ( aAlfEnv ),
+	iRadioEngine (aRadioEngine ),
+	iLightsOffCounter(0)
+	{
+	//No implementation needed		
+	}
+	
+// --------------------------------------------------------------------------------
+// CFMRadioMainContainer::ConstructL
+// EPOC two phased constructor
+// --------------------------------------------------------------------------------
+//
+void CFMRadioMainContainer::ConstructL(
+    const TRect& aRect )
+    {
+    iCoeEnv = CCoeEnv::Static();
+
+    TRAP_IGNORE( iLight = CHWRMLight::NewL(this) );
+	iTimer = new(ELeave) CFMRadioTimer( this );
+	timer.CreateLocal();
+	
+    // check the layout orientation
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+    TBool isLandscape = appUi->IsLandscapeOrientation();
+
+    TRgb color;
+
+    AknsUtils::GetCachedColor( AknsUtils::SkinInstance(), color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 );
+	//CreateWindowL(); // create a window for the container
+    	
+    // Create alfred display
+    CAlfDisplay* display = NULL; 
+    if ( iAlfEnv.DisplayCount() > 0 )
+    	{
+    	display = &(iAlfEnv.PrimaryDisplay());
+    	}
+    else
+    	{
+    	display = &(iAlfEnv.NewDisplayL( aRect, CAlfEnv::ENewDisplayAsCoeControl ));
+    	}
+
+	// Setup background.
+	display->SetClearBackgroundL( CAlfDisplay::EClearWithSkinBackground );	
+	
+	// Create the control group for HUI visual controls
+	CAlfControlGroup* group;
+	if( display->Roster().Count() > 0)
+		{
+		group = &( iAlfEnv.ControlGroup( KFMRadioVisualControlsGroupId ) );	
+		
+		iVisualControl = static_cast<CFMRadioAlfVisualizer*> 
+								( display->Roster().FindControl( KFMRadioVisualControlId ) );
+		iMediaIdle = static_cast<CFMRadioAlfMediaIdle*> 
+								( display->Roster().FindControl( KFMRadioMediaIdleId ) );
+		iRdsIndicator = static_cast<CFMRadioAlfIndicator*> 
+								( display->Roster().FindControl( KFMRadioRdsIndicatorId ) ); 		
+		iRdsAfIndicator = static_cast<CFMRadioAlfIndicator*> 
+								( display->Roster().FindControl( KFMRadioRdsAfIndicatorId ) );								
+		iRdsViewer = static_cast<CFMRadioAlfRDSViewer*> 
+								( display->Roster().FindControl( KFMRadioRdsViewer ) );
+		iRdsInteractionIndicator = static_cast<CFMRadioAlfIndicator*> 
+						        ( display->Roster().FindControl( KFMRadioRdsInteractionIndicatorId ) ); 								
+
+        iRadioLogo = static_cast<CFMRadioLogo*> 
+            ( display->Roster().FindControl( KFMRadioLogoId ) );
+        }
+	else
+		{
+	    group = &(iAlfEnv.NewControlGroupL( KFMRadioVisualControlsGroupId ) );
+	    // Create the vizualizer control for information of the FMRadio
+	    iVisualControl = CFMRadioAlfVisualizer::NewL( iAlfEnv );
+	    iVisualControl->SetId( KFMRadioVisualControlId );
+	    // Create the media idle
+	    iMediaIdle = CFMRadioAlfMediaIdle::NewL( iAlfEnv );
+	    iMediaIdle->SetId( KFMRadioMediaIdleId );
+	    
+	    // RDS
+	    HBufC* rdsText = StringLoader::LoadLC( R_QTN_FMRADIO_RDS, iCoeEnv );
+	    iRdsIndicator = CFMRadioAlfIndicator::NewL( iAlfEnv );
+	    iRdsIndicator->SetId( KFMRadioRdsIndicatorId );
+	    iRdsIndicator->SetTextColor( color );
+	    iRdsIndicator->SetTextL( *rdsText );
+	    iRdsIndicator->SetOpacityInHiddenState( KFMRadioIndicatorOpacityInHiddenState );
+	    CleanupStack::PopAndDestroy( rdsText );
+	    
+	    // AF
+	    HBufC* afText = StringLoader::LoadLC( R_QTN_FMRADIO_AF, iCoeEnv );
+	    iRdsAfIndicator = CFMRadioAlfIndicator::NewL( iAlfEnv );
+	    iRdsAfIndicator->SetId( KFMRadioRdsAfIndicatorId );
+	    iRdsAfIndicator->SetTextColor( color );
+	    iRdsAfIndicator->SetTextL( *afText );
+	    iRdsAfIndicator->SetOpacityInHiddenState( KFMRadioIndicatorOpacityInHiddenState );
+	    CleanupStack::PopAndDestroy( afText );
+	    
+	    iRdsViewer = CFMRadioAlfRDSViewer::NewL( iAlfEnv );
+	    iRdsViewer->SetId( KFMRadioRdsViewer );
+	    iRdsViewer->SetTextColor( color );
+	    iRdsViewer->SetOpacityInHiddenState( KFMRadioRdsViewerOpacityHidden );
+	    
+        // +
+	    HBufC* interactionText = StringLoader::LoadLC( R_QTN_FMRADIO_RTPLUS_INDICATOR_TEXT, iCoeEnv );
+	    iRdsInteractionIndicator = CFMRadioAlfIndicator::NewL( iAlfEnv );
+        iRdsInteractionIndicator->SetId( KFMRadioRdsInteractionIndicatorId );
+        iRdsInteractionIndicator->SetTextColor( color );
+        iRdsInteractionIndicator->SetTextL( *interactionText );
+        iRdsInteractionIndicator->SetOpacityInHiddenState( KFMRadioIndicatorOpacityInHiddenState );
+        CleanupStack::PopAndDestroy( interactionText );
+        
+        // radio icon
+        iRadioLogo = CFMRadioLogo::NewL( iAlfEnv );
+        iRadioLogo->SetId( KFMRadioLogoId );
+        
+        // Append the controls into the control group.
+        group->AppendL( iMediaIdle );
+        group->AppendL( iRdsIndicator );
+        group->AppendL( iRdsAfIndicator );
+        group->AppendL( iRdsViewer );
+        group->AppendL( iRdsInteractionIndicator );
+        group->AppendL( iRadioLogo );
+        group->AppendL( iVisualControl );
+        }
+
+    iIdleController = CFMRadioIdleController::NewL();
+    // Add media idle visuals to the controller.
+    // Only one of the media idle visuals is visible at a time.
+    iIdleController->AddControlItem( *iRdsViewer );
+    iIdleController->AddControlItem( *iMediaIdle );
+    iIdleController->AddControlItem( *iRadioLogo );
+
+    iMainPaneRect = aRect;
+    
+    UpdateTextColorFromSkin();
+    SizeChanged();
+    // Make the control group active on the display
+	display->Roster().ShowL( *group );
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainContainer::Destructor
+// --------------------------------------------------------------------------------
+//
+CFMRadioMainContainer::~CFMRadioMainContainer()
+    {
+    if ( iTimer->IsActive() )
+        {
+        iTimer->Cancel();
+        }
+
+    delete iTimer;
+    iTimer = NULL;
+    timer.Close();
+
+    delete iLight;
+    iLight = NULL;
+    delete iIdleController;
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainContainer::SetFaded
+// Fades the entire window and controls in the window owned
+// by this container control.
+// -------------------------------------------------------------------------------
+//
+void CFMRadioMainContainer::SetFaded( TBool aFaded )
+    {
+    iFadeStatus = aFaded;
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainContainer::DisplayChannelInfoL
+// Display the channel information
+// --------------------------------------------------------------------------------
+//
+void CFMRadioMainContainer::DisplayChannelInfoL(
+        TInt aChannelNumber,
+        const TDesC& aStationName,
+        TFMRadioStationChangeType aChangeType,
+        TInt aFrequency )
+    {
+    HBufC* firstLine = NULL;
+    HBufC* secondLine = NULL;
+    TBool programmeServiceNameExists = iRadioEngine.RdsReceiver().ProgrammeService().Length();
+    CFMRadioRdsReceiverBase::TFMRadioProgrammeSeviceType PSNameType = 
+        iRadioEngine.RdsReceiver().ProgrammeServiceNameType();
+    
+    TBool useStaticPsName = EFalse;
+    if ( !aStationName.Length() && 
+         PSNameType == CFMRadioRdsReceiverBase::EFMRadioPSNameStatic &&
+         programmeServiceNameExists )
+        {
+        useStaticPsName = ETrue;
+        }
+    const TDesC& stationName = useStaticPsName ? iRadioEngine.RdsReceiver().ProgrammeService() : aStationName;
+    
+    if ( !stationName.Length() )
+        {
+        // PS Name is concidered as dynamic
+        if( aChannelNumber == KErrNotFound )
+            {
+            firstLine = FormattedFrequencyStringL( aFrequency, R_QTN_FMRADIO_FREQ );
+            CleanupStack::PushL( firstLine );
+            if( programmeServiceNameExists )
+                {
+                secondLine = iRadioEngine.RdsReceiver().ProgrammeService().AllocL();
+                }
+            }
+        else
+            {
+            TReal frequency = static_cast<TReal>( aFrequency / static_cast<TReal>( KHzConversionFactor ));
+    
+            // Gets locale decimal separator automatically
+            TInt maxDecimalPlaces = iRadioEngine.DecimalCount();
+            TRealFormat format( KFrequencyMaxLength, maxDecimalPlaces );
+            TBuf<KFrequencyMaxLength> frequencyString;
+            frequencyString.Num( frequency, format );
+            AknTextUtils::LanguageSpecificNumberConversion( frequencyString );
+            
+            firstLine = StringLoader::LoadLC( R_QTN_FMRADIO_MEM_LOCATION_FREQ,
+                    frequencyString, aChannelNumber, iCoeEnv );
+            
+            if( programmeServiceNameExists )
+                {
+                secondLine = iRadioEngine.RdsReceiver().ProgrammeService().AllocL();
+                }
+            }
+        }
+    else
+        {
+        if( aChannelNumber == KErrNotFound )
+            {
+            firstLine = stationName.AllocLC();
+            }
+        else
+            {
+            firstLine = StringLoader::LoadLC( R_QTN_FMRADIO_MEM_LOCATION_NAME,
+                    stationName, aChannelNumber, iCoeEnv );
+            }
+        
+        if ( programmeServiceNameExists &&
+             PSNameType == CFMRadioRdsReceiverBase::EFMRadioPSNameDynamic )
+            {
+            // PS Name is concidered as dynamic
+            secondLine = iRadioEngine.RdsReceiver().ProgrammeService().AllocL();
+            }
+        else
+            {
+            secondLine = FormattedFrequencyStringL( aFrequency, R_QTN_FMRADIO_FREQ );
+            }
+        }
+    CleanupStack::PushL( secondLine );
+    
+    if( AknLayoutUtils::LayoutMirrored() )
+        {
+        // Add right to left mark in the beginning so that the text is laid out correctly
+        firstLine = firstLine->ReAllocL( firstLine->Length() + KRightToLeftMark().Length() );
+        CleanupStack::Pop( 2 ); // secondLine and old firstLine
+        CleanupStack::PushL( firstLine );
+        CleanupStack::PushL( secondLine );
+        firstLine->Des().Insert( 0, KRightToLeftMark );
+        
+        if ( secondLine )
+            {
+            secondLine = secondLine->ReAllocL( secondLine->Length() + KRightToLeftMark().Length() );
+            CleanupStack::Pop(); // old secondLine
+            CleanupStack::PushL( secondLine );
+            secondLine->Des().Insert( 0, KRightToLeftMark );
+            }
+        }
+    
+    iVisualControl->ChangeStationL( aChangeType, *firstLine, secondLine );
+    
+    HBufC* frequencyString = FormattedFrequencyStringL( aFrequency, R_QTN_FMRADIO_MEDIA_IDLE_FREQ );
+    CleanupStack::PushL( frequencyString );
+    iMediaIdle->AddMediaIdleContentL( *frequencyString );
+    CleanupStack::PopAndDestroy( frequencyString );
+    if( aStationName.Length() )
+        {
+        iMediaIdle->AddMediaIdleContentL( stationName );
+        }
+    if ( aStationName != iRadioEngine.RdsReceiver().ProgrammeService() &&
+         PSNameType == CFMRadioRdsReceiverBase::EFMRadioPSNameStatic )
+        {
+        iMediaIdle->AddPsNameToMediaIdleL( iRadioEngine.RdsReceiver().ProgrammeService() );
+        }
+    
+    CleanupStack::PopAndDestroy( 2, firstLine );
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainContainer::FormattedFrequencyStringL
+// Format the frequency
+// --------------------------------------------------------------------------------
+//
+HBufC* CFMRadioMainContainer::FormattedFrequencyStringL( TInt aFrequency, TInt aResourceId  )
+    {
+    TReal frequency = static_cast<TReal>( aFrequency / static_cast<TReal>( KHzConversionFactor ));
+
+    // Gets locale decimal separator automatically
+    TInt maxDecimalPlaces = iRadioEngine.DecimalCount();
+    TRealFormat format( KFrequencyMaxLength, maxDecimalPlaces );
+    TBuf<KFrequencyMaxLength> frequencyString;
+    frequencyString.Num( frequency, format );
+    AknTextUtils::LanguageSpecificNumberConversion( frequencyString );
+    
+    return StringLoader::LoadL( aResourceId, frequencyString, iCoeEnv );;
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainContainer::ShowRTPlusInteractionIndicator
+// Hide/show the RT+ interaction indicator with optional fade effecct
+// --------------------------------------------------------------------------------
+//
+void CFMRadioMainContainer::ShowRTPlusInteractionIndicator( TBool aVisible, TBool aFadeEffect)
+    {
+    if (aVisible)
+        iRdsInteractionIndicator->Show( aFadeEffect );
+    else
+        iRdsInteractionIndicator->Hide( aFadeEffect );
+    }
+
+// ---------------------------------------------------------
+// CFMRadioMainContainer::ShowRdsInfo
+// ---------------------------------------------------------
+//
+void CFMRadioMainContainer::ShowRdsInfo( TBool aShow, TBool aFade, TBool aShowAfMarquee )
+    {    
+    if( aShow )
+    	{
+    	iRdsIndicator->Show( aFade );
+    	
+    	if( aShowAfMarquee )
+        	{
+        	iRdsAfIndicator->Show( aFade );
+        	}
+    	else
+    		{
+    		iRdsAfIndicator->Hide( aFade ); 
+    		}
+    	}
+    else
+    	{
+    	iRdsIndicator->Hide( aFade );
+    	    	
+    	iRdsAfIndicator->Hide( aFade ); 
+    	}
+    }
+
+// ----------------------------------------------------------------------------------------------------
+// CFMRadioMainContainer::HandleResourceChange
+// Handles resource changes
+// ----------------------------------------------------------------------------------------------------
+//
+void CFMRadioMainContainer::HandleResourceChange( TInt aType )
+    {
+	if ( aType ==  KEikDynamicLayoutVariantSwitch )
+		{						
+		AknLayoutUtils::LayoutMetricsRect(
+		AknLayoutUtils::EMainPane, iMainPaneRect);
+		SizeChanged();
+        TRAP_IGNORE( iAlfEnv.NotifyLayoutChangedL() )
+        iIdleController->ShowControl( *iRadioLogo );
+		}
+	else if ( aType == KAknsMessageSkinChange  )
+	  	{
+	    UpdateTextColorFromSkin();
+	    TRAP_IGNORE( iAlfEnv.NotifySkinChangedL() );
+	    }
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainContainer::SetRect
+// Sets rectangle of the alfred display
+// --------------------------------------------------------------------------------
+//
+void CFMRadioMainContainer::SetRect( const TRect& aRect )
+	{
+	iMainPaneRect = aRect;
+	SizeChanged();
+	}
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainContainer::SizeChanged
+// Called when the view size is changed
+// --------------------------------------------------------------------------------
+//
+void CFMRadioMainContainer::SizeChanged()
+    {
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+    
+    iAlfEnv.PrimaryDisplay().ForceSetVisibleArea( iMainPaneRect ); 
+    
+    TAknLayoutRect layoutRect;
+    TAknLayoutText textLayout;
+    TAknLayoutRect indicatorLayoutRect;
+    TAknLayoutRect visualPaneLayoutRect;
+    
+    TRect displayRect( iMainPaneRect.Size() );
+    
+    iVisualControl->SetMirrored( appUi->IsLayoutMirrored() );
+    TBool isLandscape = appUi->IsLandscapeOrientation();
+    
+    TDisplayOrientation alfDisplayOrientation = EPortrait;
+    CFMRadioAlfMediaIdle::TOrientation mediaIdleOrientation = CFMRadioAlfMediaIdle::EPortrait;
+    
+    TInt lafVarietyRdsIndicator = 0;
+    TInt lafVarietyAfIndicator = 0;
+    TInt lafVarietyPlusIndicator = 0;
+    TInt lafVarietyRdsText = 0;
+    TInt lafVarietyLogo = 0;
+    TInt lafVarietyIndicatorPane = 0;
+    TInt lafVarietyVisualPane = 0;
+    TBool useLandscapeImage = EFalse;
+    
+    if ( isLandscape )
+    	{
+    	alfDisplayOrientation = ELandscape;
+    	mediaIdleOrientation = CFMRadioAlfMediaIdle::ELandscape;
+    	
+    	lafVarietyRdsIndicator = KLAFVarietyRDSIndicatorLandscape;
+    	lafVarietyAfIndicator = KLAFVarietyAFIndicatorLandscape;
+    	lafVarietyPlusIndicator = KLAFVarietyRDSPlusIndicatorLandscape;
+    	lafVarietyRdsText = KLAFVarietyRDSViewerLandscape;
+        lafVarietyLogo = KLAFVarietyLogoImageLandscape;
+        lafVarietyIndicatorPane = KLAFVarietyIndicatorPaneLandscape;
+        lafVarietyVisualPane = KLAFVarietyVisualPaneLandscape;
+        useLandscapeImage = ETrue;
+        }
+    else
+    	{
+    	lafVarietyRdsIndicator = KLAFVarietyRDSIndicatorPortrait;
+    	lafVarietyAfIndicator = KLAFVarietyAFIndicatorPortrait;
+        lafVarietyPlusIndicator = KLAFVarietyRDSPlusIndicatorPortrait;
+        lafVarietyRdsText = KLAFVarietyRDSViewerPortrait;
+        lafVarietyLogo = KLAFVarietyLogoImagePortrait;
+        lafVarietyIndicatorPane = KLAFVarietyIndicatorPanePortrait;
+        lafVarietyVisualPane = KLAFVarietyVisualPanePortrait;
+        }
+    // indicator pane
+    indicatorLayoutRect.LayoutRect( displayRect,
+                                    AknLayoutScalable_Apps::fmrd2_indi_pane( lafVarietyIndicatorPane ) );
+    
+    // RDS indicator
+    textLayout.LayoutText( indicatorLayoutRect.Rect(),
+            AknLayoutScalable_Apps::fmrd2_indi_pane_t3( lafVarietyRdsIndicator ).LayoutLine() );
+            
+    iRdsIndicator->SetRect( textLayout.TextRect() );
+	
+    // AF indicator    
+    textLayout.LayoutText( indicatorLayoutRect.Rect(),
+            AknLayoutScalable_Apps::fmrd2_indi_pane_t2( lafVarietyAfIndicator ).LayoutLine() );
+    
+    iRdsAfIndicator->SetRect( textLayout.TextRect() );
+    
+    // + indicator
+    textLayout.LayoutText( indicatorLayoutRect.Rect(),
+            AknLayoutScalable_Apps::fmrd2_indi_pane_t1( lafVarietyPlusIndicator ).LayoutLine() );
+    
+    iRdsInteractionIndicator->SetRect( textLayout.TextRect() );
+
+    // RDS Text pane      
+    layoutRect.LayoutRect( displayRect,
+            AknLayoutScalable_Apps::area_fmrd2_visual_pane( lafVarietyRdsText ).LayoutLine() );
+    
+    iRdsViewer->SetRect( layoutRect.Rect() );
+    
+    // radio icon    
+    visualPaneLayoutRect.LayoutRect( displayRect,
+            AknLayoutScalable_Apps::area_fmrd2_visual_pane( lafVarietyVisualPane ).LayoutLine() );
+    
+    layoutRect.LayoutRect( visualPaneLayoutRect.Rect(),
+            AknLayoutScalable_Apps::area_fmrd2_visual_pane_g1( lafVarietyLogo ).LayoutLine() );
+
+    // change image
+    iRadioLogo->SwitchToLandscapeImage( useLandscapeImage );
+    iRadioLogo->SetRect( layoutRect.Rect() );
+    
+    iVisualControl->SetOrientation( alfDisplayOrientation );
+    iVisualControl->UpdateLayout( );
+    iMediaIdle->SetOrientation( mediaIdleOrientation );
+    iMediaIdle->UpdateLayout( );
+    }
+
+// --------------------------------------------------------------------------------------------------
+// CFMRadioMainContainer::GetHelpContext
+// --------------------------------------------------------------------------------------------------
+//
+void CFMRadioMainContainer::GetHelpContext( TCoeHelpContext& aContext ) const
+    {
+#if defined __SERIES60_HELP || defined FF_S60_HELPS_IN_USE
+    aContext.iMajor = TUid::Uid( KUidFMRadioApplication );
+    aContext.iContext = KFMRADIO_HLP_MAIN;
+#endif
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainContainer::UpdateTextColorFromSkin
+// Handles updating main area text colors using current skin.
+// --------------------------------------------------------------------------------
+//
+void CFMRadioMainContainer::UpdateTextColorFromSkin()
+    {
+	// Update text using skin color
+    MAknsSkinInstance* skin = AknsUtils::SkinInstance();
+   
+    TRgb color( KRgbBlue );
+    AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 );  
+       
+    iVisualControl->SetStationInformationTextColor( color );
+    iMediaIdle->SetPrimaryColor( color );
+    iRdsViewer->SetTextColor( color );
+    iRdsIndicator->SetTextColor( color );
+    iRdsAfIndicator->SetTextColor( color );
+    iRdsInteractionIndicator->SetTextColor( color );
+    
+    AknsUtils::GetCachedColor( skin, color, KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG10 );
+    
+    iMediaIdle->SetSecondaryColor( color );    
+    }
+
+// ----------------------------------------------------------------------------------------------------
+// CFMRadioMainContainer::VisualControl
+// Returns a pointer to the station information visualizer
+// ----------------------------------------------------------------------------------------------------
+//
+CFMRadioAlfVisualizer* CFMRadioMainContainer::VisualControl()
+	{
+	return iVisualControl;
+	}
+
+// ----------------------------------------------------------------------------------------------------
+// CFMRadioMainContainer::MediaIdle
+// Returns a pointer to Media Idle
+// ----------------------------------------------------------------------------------------------------
+//
+CFMRadioAlfMediaIdle& CFMRadioMainContainer::MediaIdle()
+    {
+    return *iMediaIdle;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioMainContainer::SetRdsRadioTextL
+// Updates the rds information.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioMainContainer::SetRdsRadioTextL( const TDesC& aRadioText )
+    {
+    // Trim the text and check if there is actual content before showing it
+    HBufC* text = aRadioText.AllocLC();
+    text->Des().Trim();
+    if ( text->Length() )
+        {
+        if ( iRdsViewer->SetTextL( *text ) )
+            {
+            iIdleController->ShowControl( *iRdsViewer );
+            }
+        }
+    CleanupStack::PopAndDestroy( text );
+    }
+
+// ----------------------------------------------------------------------------------------------------
+// TimerTimeOut
+// ----------------------------------------------------------------------------------------------------
+void CFMRadioMainContainer::TimerTimeOut( TInt aErrorStatus )
+	{
+	
+	if ( aErrorStatus == KErrNone && iLightsOffCounter < KFadeFrames )
+		{		
+		iAlfEnv.RefreshCallBack( &( iAlfEnv ) );
+		TTimeIntervalMicroSeconds32 time( KTenMilliSecondsInMicroSeconds );
+				
+		timer.After(iTimer->iStatus, time );
+			
+		iTimer->Activate();
+		
+		iLightsOffCounter++;
+					
+		}
+	else
+		{
+		timer.Cancel();
+		}
+	
+	}	
+
+// ---------------------------------------------------------------------------
+// CFMRadioAlfMediaIdle::LightStatusChangedL
+// From MHWRMLightObserver
+// Prepares media idle to handle new channel information
+// ---------------------------------------------------------------------------
+//	
+void CFMRadioMainContainer::LightStatusChanged(TInt aTarget, 
+                                        CHWRMLight::TLightStatus aStatus)
+	{
+    FTRACE( FPrint( _L("CFMRadioMainContainer::LightStatusChanged( Target: %d Lights: %d )"), aTarget, aStatus ) );
+	if ( CHWRMLight::ELightOff == aStatus && aTarget == 1 )
+		{
+		CAlfDisplay* display = NULL; 
+		
+	    if( iAlfEnv.DisplayCount() > 0 )
+	    	{	    	
+	    	display = &(iAlfEnv.PrimaryDisplay());
+
+	    	if ( display->Roster().Count() > 0 )
+				{
+                iIdleController->DeactivateControls();
+				
+
+				iAlfEnv.RefreshCallBack( &(iAlfEnv) );
+				
+				if ( !iTimer->IsActive() )
+					{			
+					TTimeIntervalMicroSeconds32 time( KTenMilliSecondsInMicroSeconds );
+					// Just to make sure, that dimming is really happening
+					iLightsOffCounter = 0;
+					timer.After(iTimer->iStatus, time );
+					iTimer->Activate();
+					}
+				}	
+	    	}
+	    }
+	else if (  CHWRMLight::ELightOn == aStatus && aTarget == 1 )
+		{
+		if ( iTimer )
+			{		
+			if ( iTimer->IsActive() )
+				{
+				iTimer->Cancel();
+				}
+			}
+			
+		if ( iLightsOffCounter != 0 )
+            {
+            CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+            CFMRadioMainView* mainView = static_cast<CFMRadioMainView*>( appUi->View( KFMRadioMainViewId ) );
+            mainView->DetermineActiveMediaIdleComponent();
+            
+            iLightsOffCounter = 0;
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainContainer::RdsViewer
+// --------------------------------------------------------------------------------
+//
+CFMRadioAlfRDSViewer& CFMRadioMainContainer::RdsViewer() const
+    {
+    return *iRdsViewer;
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainContainer::IdleController
+// --------------------------------------------------------------------------------
+//
+CFMRadioIdleController& CFMRadioMainContainer::IdleController() const
+    {
+    return *iIdleController;
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainContainer::Logo
+// --------------------------------------------------------------------------------
+//
+CFMRadioLogo& CFMRadioMainContainer::Logo() const
+    {
+    return *iRadioLogo;
+    }
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradiomainview.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,1471 @@
+/*
+* 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:  Implementation of the class CFMRadioMainView
+*
+*/
+
+// INCLUDE FILES
+#include <featmgr.h>
+#include <aknViewAppUi.h>
+#include <akntitle.h>
+#include <avkon.hrh>
+#include <avkon.rsg>
+#include <avkon.mbg>
+#include <data_caging_path_literals.hrh>
+#include <akntoolbar.h>
+#include <fmradio.rsg>
+#include <StringLoader.h>
+#include <aknbutton.h>
+#include <aknconsts.h>
+#include <aknmessagequerydialog.h>
+#include <fmradio.mbg>
+#include <fmradiouids.h>
+#include <akntoolbarextension.h>
+
+#include "fmradiomusicstorehandler.h"
+#include "fmradiobacksteppingservicewrapper.h"
+#include "fmradiodocument.h"
+#include "fmradiordsreceiverbase.h"
+#include "fmradioalfvisualizer.h"
+#include "fmradioengine.h"
+#include "fmradiomainview.h"
+#include "fmradiomaincontainer.h"
+#include "fmradioappui.h"
+#include "fmradio.hrh"
+#include "fmradioengineradiosettings.h"
+#include "fmradioalfmediaidle.h"
+#include "fmradiopubsub.h"
+#include "fmradioalfrdsviewer.h"
+#include "fmradioidlecontroller.h"
+#include "fmradiologo.h"
+#include "debug.h"
+
+// A debug flag which is used for differentiating between original version and updated
+// version, when set will add identifier on Main View title. Used for testing purposes
+#undef __FM_UPDATE_PACKAGE__
+
+// CONSTANTS
+
+#ifdef __FM_UPDATE_PACKAGE__
+_LIT( KFMRadioUpdated, " *" );
+#endif
+
+// Delay in milliseconds for fading out the RDS indicator
+const TInt KFMRadioRdsSignalFadeOutDelay = 1000;
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------
+// CFMRadioMainView::NewL
+// Two-phase constructor of CFMRadioMainView
+// ---------------------------------------------------------
+//
+CFMRadioMainView* CFMRadioMainView::NewL(
+    CRadioEngine* aRadioEngine, CAlfEnv& aAlfEnv, MChannelListHandler& aObserver )
+    {
+    CFMRadioMainView* self = new (ELeave) CFMRadioMainView( aRadioEngine, aAlfEnv, aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioMainView::ConstructL
+// EPOC two-phased constructor
+// ---------------------------------------------------------
+//
+void CFMRadioMainView::ConstructL()
+    {
+    BaseConstructL( R_FMRADIO_MAIN_VIEW );
+    PrepareToolbar();
+    
+    if ( !AknLayoutUtils::PenEnabled() )
+        {
+        ShowToolbar( EFalse );
+        }
+
+    iRdsSignalTimer = CPeriodic::NewL(CActive::EPriorityStandard);
+    iMusicStoreHandler = CFMRadioMusicStoreHandler::NewL( R_FMRADIO_MAIN_OPTIONS_MENU );
+    iMusicStoreHandler->EnableMusicStore( ETrue );
+    
+    CAknToolbarExtension* toolbarExt = iToolbar->ToolbarExtension();
+    CAknButton* operatorStoreButton = NULL;
+    operatorStoreButton = static_cast<CAknButton*>( toolbarExt->ControlOrNull( EFMRadioToolbarButtonCmdOperatorMusicStore ) );
+    const TDesC& storeName = iMusicStoreHandler->OperatorMusicStoreName();
+    
+    if ( operatorStoreButton )
+        {
+        // set text for button tooltip
+        operatorStoreButton->State()->SetHelpTextL( storeName );
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioMainView::CFMRadioMainView
+// default constructor
+// ---------------------------------------------------------
+//
+CFMRadioMainView::CFMRadioMainView(
+    CRadioEngine* aRadioEngine,
+    CAlfEnv& /*aAlfEnv*/,
+    MChannelListHandler& aObserver)
+    : iRadioEngine( aRadioEngine ),
+      iSeeking( EFalse ),
+      iChangeDirection( EFMRadioStationChangeNone ),
+      iStartUp( ETrue ),
+      iObserver( aObserver )
+    {
+    }
+
+// ---------------------------------------------------------
+// CFMRadioMainView::~CFMRadioMainView
+// Class destructor
+// ---------------------------------------------------------
+//
+CFMRadioMainView::~CFMRadioMainView()
+    {
+    if( iRdsSignalTimer && iRdsSignalTimer->IsActive() )
+        {
+        iRdsSignalTimer->Cancel();
+        }   
+    if ( iRdsSignalTimer )
+    	{
+	    delete iRdsSignalTimer;
+	    iRdsSignalTimer = NULL;
+    	}
+
+    CAlfEnv* alfEnv = CAlfEnv::Static();
+    if ( alfEnv && iContainer )
+        {
+        iContainer->RdsViewer().RemoveObserver( this );
+        iContainer->Logo().RemoveObserver( this );
+        }
+    
+    delete iContainer;
+    iContainer = NULL;
+
+    delete iMusicStoreHandler;
+    }
+
+// ---------------------------------------------------------
+// TUid CFMRadioMainView::Id
+// Return the unique identifier corresponding to this view
+// ---------------------------------------------------------
+//
+TUid CFMRadioMainView::Id() const
+    {
+    return KFMRadioMainViewId;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioMainView::StopSeekL
+// Seek operation has completed. Update the view to reflect
+// this fact.
+// ---------------------------------------------------------
+//
+void CFMRadioMainView::StopSeekL()
+    {
+    FTRACE( FPrint( _L("CFMRadioMainView::StopSeekL  Start") ) );
+    if ( iContainer && iSeeking)
+        {
+        FTRACE( FPrint( _L("CFMRadioMainView::StopSeekL  inside first if") ) );
+        if ( !AknLayoutUtils::PenEnabled() )
+            {
+            Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_BACK ); // Change softkeys
+            Cba()->SetCommandL( CEikButtonGroupContainer::EMiddleSoftkeyPosition, 0, KNullDesC );
+            }
+        else
+            {
+            Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_BACK__SELECT ); // Change softkeys
+            }
+        
+        SetToolbarDimmedState( EFalse );
+        iContainer->VisualControl()->StopTuningAnimation();
+        iSeeking = EFalse;
+        Cba()->DrawDeferred(); // Redraw softkeys
+        }
+    
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+    
+    TInt presetIndex = iRadioEngine->GetPresetIndex();
+    TInt channelCount = iObserver.Channels().Count();
+    
+    if ( iRadioEngine->GetRadioMode() == CRadioEngine::ERadioPresetMode && 
+            channelCount > 0 &&
+            presetIndex < channelCount )
+        {
+        DisplayChannelL( presetIndex );
+        FTRACE( FPrint( _L("CFMRadioMainView::StopSeekL  ERadioPresetMode preset index = %d"),iRadioEngine->GetPresetIndex() ) );
+        }
+    else
+        {
+        FTRACE( FPrint( _L("CFMRadioMainView::StopSeekL  inside else") ) );
+        TInt channelIndex = appUi->MatchingChannelL( iRadioEngine->GetTunedFrequency() ); //, need to get here!
+        if ( channelIndex != KErrNotFound )
+            {
+            FTRACE( FPrint( _L("CFMRadioMainView::StopSeekL  if channelIndex is found, channelIndex = %d"),channelIndex ) );
+            iRadioEngine->TunePresetL( channelIndex ); //update engine to let it know that we've locked onto a preset.
+            }
+        else
+            {
+            FTRACE( FPrint( _L("CFMRadioMainView::StopSeekL  else, get tuned freq = %d"),iRadioEngine->GetTunedFrequency() ) );
+            DisplayChannelL( KErrNotFound );
+            }
+        }
+
+    // show default radio logo
+    if ( iContainer )
+        {
+        iContainer->IdleController().ShowControl( iContainer->Logo() );
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioMainView::FadeAndShowExit
+// Fade the view and all controls associated with it. Change
+// the soft keys so that "Exit" is displayed
+// ---------------------------------------------------------
+//
+void CFMRadioMainView::FadeAndShowExit(
+    TBool aFaded )
+    {
+    iFaded = aFaded;
+    
+    if ( iContainer )
+        {
+        if ( aFaded || iRadioEngine->IsInCall() ) // Needs to be faded - headset missing
+            {
+            StopDisplayingMenuBar(); // In case options menu is open when headset is disconnected
+            SetToolbarDimmedState( ETrue );
+            TRAP_IGNORE( Cba()->SetCommandSetL( R_FMRADIO_SOFTKEYS_EXIT ) ); // Change softkeys
+            }
+        else // Unfade
+            {
+            SetToolbarDimmedState( EFalse );
+            if ( !AknLayoutUtils::PenEnabled() )
+                {
+                TRAP_IGNORE( Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_BACK ); // Change softkeys
+                    Cba()->SetCommandL( CEikButtonGroupContainer::EMiddleSoftkeyPosition, 0, KNullDesC ); )
+                }
+            else
+                {
+                TRAP_IGNORE ( Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_BACK__SELECT ); )// Change softkeys
+                }
+            }
+        iContainer->SetFaded( aFaded ); // Unfade controls inside container
+        Cba()->DrawDeferred(); // Redraw softkeys
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioMainView::UpdateDisplayForFocusGained
+// Update display to override default behavior
+// Can be removed when auto resume is implemented
+// ---------------------------------------------------------
+//
+void CFMRadioMainView::UpdateDisplayForFocusGained()
+    {
+    FTRACE( FPrint( _L("CFMRadioMainView::UpdateDisplayForFocusGained") ) );
+    FadeAndShowExit( iFaded );
+    DetermineActiveMediaIdleComponent();
+    }
+
+// ---------------------------------------------------------
+// CFMRadioMainView::SeekL
+// Tells the window owning container to display seek note
+// and updates softkeys
+// ---------------------------------------------------------
+//
+void CFMRadioMainView::SeekL()
+    {
+    if ( iContainer )
+        {
+		HBufC* seekString = StringLoader::LoadLC( R_QTN_FMRADIO_TUNING, iCoeEnv );									
+		iContainer->VisualControl()->SetStaticInfoTextL( iChangeDirection, *seekString );
+		CleanupStack::PopAndDestroy( seekString );				
+        iContainer->RdsViewer().Reset();
+        iContainer->MediaIdle().ResetMediaIdleContent();
+		iContainer->ShowRTPlusInteractionIndicator( EFalse, ETrue );
+        iContainer->IdleController().ShowControl( iContainer->Logo() );
+		iContainer->VisualControl()->StartTuningAnimation();
+        iSeeking = ETrue;
+        SetToolbarDimmedState( ETrue );
+        // force update for toolbar extension view
+        iToolbar->ToolbarExtension()->SetShown( EFalse );
+        }
+    Cba()->SetCommandSetL( R_FMRADIO_MAIN_VIEW_TUNING_STATE_SOFTKEYS );
+
+    Cba()->DrawDeferred(); // Redraw softkeys
+    }
+
+// ---------------------------------------------------------
+// CFMRadioMainView::ShowToolbar
+// Sets toolbar visibility.
+// ---------------------------------------------------------
+//
+void CFMRadioMainView::ShowToolbar( TBool aVisible )
+	{
+	if ( iToolbar )
+		{
+		iToolbar->SetToolbarVisibility( aVisible );
+		iToolbar->UpdateBackground();
+		iToolbar->DrawDeferred();			
+		}
+	}
+
+// ---------------------------------------------------------
+// CFMRadioMainView::HandleForegroundEventL
+// ---------------------------------------------------------
+//
+void CFMRadioMainView::HandleForegroundEventL(TBool aForeground)
+    {
+    CAknView::HandleForegroundEventL(aForeground);
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( AppUi() );
+    if ( aForeground )
+        {	 
+        if ( iStartUp )
+            {
+            iStartUp = EFalse;
+            CFMRadioRdsReceiverBase& receiver = iRadioEngine->RdsReceiver();
+            TBool afEnabled = iRadioEngine->RadioSettings().IsRdsAfSearchEnabled();
+            iContainer->ShowRdsInfo( receiver.SignalAvailable(), ETrue, afEnabled );
+            TBool showMusicStore = IsRTPlusInterActionIndicatorNeeded();
+            iContainer->ShowRTPlusInteractionIndicator(showMusicStore, ETrue);
+            }
+        }
+    else
+        {
+        CAlfEnv* env = CAlfEnv::Static();
+        if ( iContainer && env )
+            {
+            iContainer->IdleController().DeactivateControls();
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioMainView::RdsDataProgrammeService
+// ---------------------------------------------------------------------------
+//
+void CFMRadioMainView::RdsDataProgrammeService( const TDesC& aProgramService )
+    {
+	TRAP_IGNORE( 
+		RdsDataProgrammeServiceL( aProgramService ) 
+		);
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioMainView::RdsDataPsNameIsStatic
+// ---------------------------------------------------------------------------
+//
+void CFMRadioMainView::RdsDataPsNameIsStatic( TBool aStatic )
+    {
+    TRAP_IGNORE( HandleStaticProgrammeServiceL( aStatic ) )
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioMainView::RdsDataProgrammeServiceL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioMainView::RdsDataProgrammeServiceL( const TDesC& aProgramService )
+    {
+    FTRACE(FPrint(_L("CFMRadioMainView::RdsDataProgrammeServiceL('%S')"), &aProgramService));
+    if( iContainer )
+        {
+        CAlfEnv* alfEnv = CAlfEnv::Static();
+        if( alfEnv )
+            {
+            if(  aProgramService.Length() > 0 )
+                {
+                TInt presetIndexToDisplay = KErrNotFound;
+                TInt presetIndex = iRadioEngine->GetPresetIndex();
+                // When we haven't preset name, ps name will save as preset name
+                if ( iRadioEngine->GetRadioMode() == CRadioEngine::ERadioPresetMode &&
+                        presetIndex < iObserver.Channels().Count() )
+                    {
+                    presetIndexToDisplay = presetIndex;
+                    }
+                SetStationChangeType( EFMRadioStationChangeNone );
+                DisplayChannelL( presetIndexToDisplay );
+                }
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioMainView::HandleStaticProgrammeServiceL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioMainView::HandleStaticProgrammeServiceL( TBool aStatic )
+    {
+    FTRACE(FPrint(_L("CFMRadioMainView::HandleStaticProgrammeServiceL(%d)"), aStatic));
+    
+    if( iContainer )
+        {
+        if ( aStatic )
+            {
+            // When we haven't got a name for preset, a static ps name will be saved
+            TInt channelCount = iObserver.Channels().Count();
+            TInt currentPresetIx = iRadioEngine->GetPresetIndex();
+            
+            if ( aStatic && iRadioEngine->GetRadioMode() == CRadioEngine::ERadioPresetMode &&
+                    currentPresetIx != KErrNotFound &&
+                    channelCount > 0 &&
+                    currentPresetIx < channelCount )
+                {
+                const TDesC& stationName = iObserver.Channels()[ currentPresetIx ]->PresetName();
+                TInt presetFreq = iObserver.Channels()[ currentPresetIx ]->PresetFrequency();
+        
+                if ( stationName.Length() == 0 && 
+                        presetFreq != KErrNotFound && 
+                        iRadioEngine->RdsReceiver().ProgrammeService().Length() )
+                    {  
+                    iObserver.Channels()[ currentPresetIx ]->SetPresetNameL( iRadioEngine->RdsReceiver().ProgrammeService() );
+                    iObserver.UpdateChannelsL( EStoreIndexToRepository, currentPresetIx, 0 );
+                    // Update station information display
+                    DisplayChannelL( currentPresetIx );
+                    }  
+                }
+            iContainer->MediaIdle().AddPsNameToMediaIdleL( iRadioEngine->RdsReceiver().ProgrammeService() );
+            }
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioMainView::RdsDataRadioText
+// ---------------------------------------------------------
+//
+void CFMRadioMainView::RdsDataRadioText( const TDesC& aRadioText )
+    {
+    FTRACE(FPrint(_L("CFMRadioMainView::RdsDataRadioText('%S')"), &aRadioText));
+    if ( iContainer && aRadioText.Length() > 0 )
+        {
+            TRAP_IGNORE( iContainer->SetRdsRadioTextL( aRadioText ) );
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioMainView::RdsDataRadioTextPlus
+// ---------------------------------------------------------
+//
+void CFMRadioMainView::RdsDataRadioTextPlus( const TInt aRadioTextPlusClass, const TDesC& aRadioText )
+    {
+    if ( aRadioTextPlusClass == ERTplusProgramHomepage &&
+            iRadioEngine->GetRadioMode() == CRadioEngine::ERadioPresetMode )
+        {
+        TInt currentPresetIx = iRadioEngine->GetPresetIndex();
+        
+        if ( currentPresetIx < iObserver.Channels().Count() )
+            {
+            TRAP_IGNORE
+                (
+                // save permanently
+                iRadioEngine->SaveUrlToPresetL( currentPresetIx, aRadioText );
+                // save to ui list
+                iObserver.Channels()[ currentPresetIx ]->SetPresetUrlL( aRadioText );
+                )
+            }
+        }
+    
+    
+    if ( IsRTPlusInterActionIndicatorNeeded() )
+        {
+        iContainer->ShowRTPlusInteractionIndicator( ETrue, ETrue );
+        if ( !iRadioEngine->MusicStoreNoteDisplayed() )
+            {
+            TRAP_IGNORE( ShowRTPlusFirstTimeDialogL() )
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioMainView::IsRTPlusInterActionIndicatorNeeded
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioMainView::IsRTPlusInterActionIndicatorNeeded()
+    {
+    CFMRadioRdsReceiverBase& receiver = iRadioEngine->RdsReceiver();
+    TBool songInformation = receiver.RtPlusSong().Length() || 
+                            receiver.RtPlusArtist().Length() ||
+                            receiver.RtPlusAlbum().Length();
+    TBool webLink = receiver.RtPlusProgramUrl().Length() &&
+                    iRadioEngine->GetRTPlusSupportLevel() == EFMRadioAllInteractions;
+
+    return songInformation || webLink;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioMainView::ShowRTPlusFirstTimeDialogL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioMainView::ShowRTPlusFirstTimeDialogL()
+    {
+    // to avoid further calls
+    iRadioEngine->SetMusicStoreNoteDisplayed();
+    
+    HBufC* noteTxt = StringLoader::LoadLC( R_QTN_FMRADIO_RTPLUS_FIRSTTIME, iCoeEnv );
+
+    CAknMessageQueryDialog* rdsFirstTimeDialog = new (ELeave) CAknMessageQueryDialog;
+    CleanupStack::PushL( rdsFirstTimeDialog );
+    rdsFirstTimeDialog->SetMessageTextL( *noteTxt );
+    CleanupStack::Pop( rdsFirstTimeDialog );
+    rdsFirstTimeDialog->ExecuteLD( R_FMRADIO_RTPLUS_FIRSTTIME_NOTE );
+
+    CleanupStack::PopAndDestroy( noteTxt );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioMainView::RdsAfSearchBegin
+// ---------------------------------------------------------------------------
+//
+void CFMRadioMainView::RdsAfSearchBegin()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioMainView::RdsAfSearchEnd
+// ---------------------------------------------------------------------------
+//
+void CFMRadioMainView::RdsAfSearchEnd( TUint32 /*aFrequency*/, TInt /*aError*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioMainView::RdsAfSearchStateChange
+// ---------------------------------------------------------------------------
+//
+void CFMRadioMainView::RdsAfSearchStateChange( TBool aEnabled )
+    { 
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>(AppUi());
+    if( appUi->ActiveView() == KFMRadioMainViewId )
+        {
+        CFMRadioRdsReceiverBase& receiver = iRadioEngine->RdsReceiver();
+        TBool show = receiver.SignalAvailable();
+        iContainer->ShowRdsInfo( show, ETrue, aEnabled );
+       }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioMainView::RdsAvailable
+// ---------------------------------------------------------------------------
+//
+void CFMRadioMainView::RdsAvailable( TBool aAvailable )
+    {
+    CAlfEnv* alfEnv = CAlfEnv::Static();
+    if( alfEnv )
+        {
+        CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>(AppUi());
+
+        if( appUi->ActiveView() == KFMRadioMainViewId )
+            {
+            if( aAvailable )
+                {
+                iRdsSignalTimer->Cancel();
+                TBool afEnabled = iRadioEngine->RadioSettings().IsRdsAfSearchEnabled();
+                iContainer->ShowRdsInfo( ETrue, ETrue, afEnabled );
+                }
+            else
+                {
+                // Start timer only if it wasn't activated before
+                if( !iRdsSignalTimer->IsActive() )
+                    {
+                    // Used for conversing milliseconds to format timer understand, ie. microseconds
+                    const TInt timerMultiplier = 1000;
+
+                    // Start timer to fade rds icon after a delay
+                    iRdsSignalTimer->Start( TTimeIntervalMicroSeconds32( KFMRadioRdsSignalFadeOutDelay * timerMultiplier ),
+                            TTimeIntervalMicroSeconds32(0), TCallBack( StaticRdsSignalTimerCallback, this ) );
+                    }
+                }
+            }
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioMainView::StaticRdsSignalTimerCallback
+// ---------------------------------------------------------
+TInt CFMRadioMainView::StaticRdsSignalTimerCallback( TAny* aSelfPtr )
+    {
+    CFMRadioMainView* self = reinterpret_cast<CFMRadioMainView*>(aSelfPtr);
+    if(self)
+        {
+        self->iRdsSignalTimer->Cancel();
+        if(self->iContainer)
+            {
+            self->iContainer->ShowRdsInfo(EFalse, ETrue);
+            }
+        }
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioMainView::DisplayChannelL
+// Inform the window owning container that it should display
+// the frequency and name of the channel specified.
+// ---------------------------------------------------------
+//
+void CFMRadioMainView::DisplayChannelL( TInt aChannelIndex )
+    {
+    FTRACE(FPrint(_L("DisplayChannelL Start, index: %d "), aChannelIndex));
+
+    if ( iContainer )
+        { 
+        iContainer->MediaIdle().ResetMediaIdleContent();
+        
+        if ( aChannelIndex != KErrNotFound )
+            {
+            CRadioEngine::TStationName stationName;
+            TInt channelNumber = aChannelIndex + 1;
+            TInt channelFrequency = KErrNotFound;
+            
+            iRadioEngine->GetPresetNameAndFrequencyL( aChannelIndex, stationName, channelFrequency );
+            
+            TFMRadioStationChangeType seekDirection = iChangeDirection;
+            
+            // Hide index number as the frequency was set by RDS AF search.
+            if ( iRadioEngine->FrequencySetByRdsAf() && channelFrequency != iRadioEngine->GetTunedFrequency() )
+                {
+                channelNumber = KErrNotFound;
+                channelFrequency = iRadioEngine->GetTunedFrequency();
+                seekDirection = EFMRadioStationChangeNone;
+                }
+    
+            // Update view
+            iContainer->DisplayChannelInfoL( channelNumber, 
+                                             stationName, 
+                                             seekDirection, 
+                                             channelFrequency );
+            
+            // show '+' indicator if channel exists and url is stored
+            if ( channelNumber && iObserver.Channels()[ aChannelIndex ]->PresetUrl().Length() )
+                {
+                iContainer->ShowRTPlusInteractionIndicator( ETrue, ETrue );
+                }
+            }
+        else
+            {
+            iContainer->DisplayChannelInfoL( aChannelIndex, 
+                                             KNullDesC, 
+                                             iChangeDirection, 
+                                             iRadioEngine->GetTunedFrequency() );
+            }
+        
+        FTRACE( FPrint(_L("DisplayChannelL End") ) );
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioMainView::HandleCommandL
+// All commands are handled by the AppUi
+// ---------------------------------------------------------
+//
+void CFMRadioMainView::HandleCommandL( TInt aCommand )
+    {
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( AppUi() );
+    switch ( aCommand )
+        {
+        case EAknSoftkeyBack:
+            {
+            const TVwsViewId viewId( TUid::Uid( KUidFMRadioApplication ), Id() );
+            if ( !appUi->BackSteppingWrapper().HandleBackCommandL( viewId ) )
+                {
+                // Command not consumed by Back Stepping Service, handle here by going background
+                TApaTask task( iEikonEnv->WsSession() );
+                task.SetWgId( iEikonEnv->RootWin().Identifier() );
+                task.SendToBackground();
+                }
+            break;
+            }
+        case EMPXPbvCmdInternetGoToWeb:
+            {
+            LaunchBrowserL( aCommand );
+            break;
+            }
+        case EFMRadioCmdChannelList:
+            {
+            HandleSaveChannelQueryL();
+            appUi->HandleCommandL( aCommand );
+            break;
+            }
+        case EFMRadioRockerButtonKeyUp:
+        case EFMRadioRockerButtonKeyDown:
+            {
+            // NOP
+            break;
+            }
+        case EAknSoftkeySelect: // MSK
+            {
+            if ( !iFaded && !iSeeking )
+                {
+                HandleSaveChannelQueryL();
+                appUi->HandleCommandL( EFMRadioCmdChannelList );
+                }
+            break;
+            }
+        case EFMRadioRockerButtonKeyLeft:
+            {
+            if ( !iFaded && !iSeeking )
+                {
+                appUi->HandleCommandL( EFMRadioCmdPrevChannel );
+                }
+            break;
+            }
+        case EFMRadioRockerButtonKeyLeftLong:
+            {
+            if ( !iFaded && !iSeeking )
+                {
+                appUi->HandleCommandL( EFMRadioCmdSeekDown );
+                }
+            break;
+            }
+        case EFMRadioRockerButtonKeyRight:
+            {
+            if ( !iFaded && !iSeeking )
+                {
+                appUi->HandleCommandL( EFMRadioCmdNextChannel );
+                }
+            break;
+            }
+         case EFMRadioRockerButtonKeyRightLong:
+            {
+            if ( !iFaded && !iSeeking )
+                {
+                appUi->HandleCommandL( EFMRadioCmdSeekUp );
+                }
+            break;
+            }
+         case EFMRadioCmdErase:
+             {
+             if ( appUi->EraseChannelL( iRadioEngine->GetPresetIndex() ) )
+                 {
+                 // delete has been confirmed, update station info
+                 if ( iContainer )
+                     {
+                     if ( IsRTPlusInterActionIndicatorNeeded() )
+                         {
+                         iContainer->ShowRTPlusInteractionIndicator( ETrue, ETrue );
+                         }
+                     else
+                         {
+                         iContainer->ShowRTPlusInteractionIndicator( EFalse, ETrue );
+                         }
+                     }
+                 SetStationChangeType( EFMRadioStationChangeNone );
+                 iRadioEngine->SetTunerModeOn();
+                 DisplayChannelL( KErrNotFound );
+                 }
+             break;
+             }
+         case EFMRadioToolbarButtonCmdToggleIhf:
+             {
+             if ( iRadioEngine->GetAudioOutput() == CRadioEngine::EFMRadioOutputHeadset )
+                 {
+                 appUi->HandleCommandL( EFMRadioCmdActivateIhf );
+                 }
+             else
+                 {
+                 appUi->HandleCommandL( EFMRadioCmdDeactivateIhf );
+                 }
+             break;
+             }
+         default:
+            {
+            if ( iMusicStoreHandler->IsMusicStoreCommandId( aCommand ) )
+                {
+                LaunchBrowserL( aCommand );
+                }
+            else
+                {
+                appUi->HandleCommandL( aCommand );
+                }
+            break;
+            }
+        }
+    }
+
+// ----------------------------------------
+// Launch Browser
+// ----------------------------------------
+void CFMRadioMainView::LaunchBrowserL( TInt aCommandId )
+    {
+    FTRACE( FPrint(_L("CFMRadioMainView::LaunchBrowserL") ) );
+    
+    CFMRadioRdsReceiverBase& receiver = iRadioEngine->RdsReceiver();
+    switch ( aCommandId )
+        {
+        case EMPXPbvCmdInternetGoToWeb:
+            {
+            RBuf webLinkToLaunch;
+            webLinkToLaunch.CleanupClosePushL();
+            if ( receiver.RtPlusProgramUrl().Length() )
+                {
+                webLinkToLaunch.CreateL( receiver.RtPlusProgramUrl() );
+                }           
+            else if ( iRadioEngine->GetRadioMode() == CRadioEngine::ERadioPresetMode )
+                {
+                webLinkToLaunch.CreateL(
+                        iObserver.Channels()[ iRadioEngine->GetPresetIndex() ]->PresetUrl() );
+                }
+            iMusicStoreHandler->LaunchWebPageL( webLinkToLaunch );
+            CleanupStack::PopAndDestroy( &webLinkToLaunch );
+            break;
+            }
+        default:
+            iMusicStoreHandler->LaunchMusicStoreL( aCommandId, 
+                                                   receiver.RtPlusSong(),
+                                                   receiver.RtPlusArtist(),
+                                                   receiver.RtPlusAlbum() );
+            break;
+        }
+    }
+
+// ----------------------------------------------------------------------------------------------------
+// CFMRadioMainView::NotifyRdsTextTimerCompletion()
+// From MFMRadioAlfRdsViewObserver
+// Called when same RT has stayed on display for 60 sec.
+// ----------------------------------------------------------------------------------------------------
+//
+void CFMRadioMainView::NotifyRdsTextTimerCompletion()
+    {
+    DetermineActiveMediaIdleComponent();
+    }
+// ---------------------------------------------------------
+// CFMRadioMainView::DoActivateL
+// Activate the main view
+// ---------------------------------------------------------
+//
+void CFMRadioMainView::DoActivateL(
+        const TVwsViewId& /*aPrevViewId*/,
+        TUid /*aCustomMessageId*/,
+        const TDesC8& /*aCustomMessage*/)
+    {
+    CAknTitlePane* titlePane = static_cast<CAknTitlePane*>( StatusPane()->ControlL( TUid::Uid( EEikStatusPaneUidTitle ) ) );
+    titlePane->SetTextToDefaultL();
+#ifdef __FM_UPDATE_PACKAGE__
+    const TDesC* titleText = titlePane->Text();
+    TBufC<2> titleAddition( KFMRadioUpdated );
+    HBufC* newTitle = HBufC::NewLC( titleText->Length() + titleAddition.Length() );
+    newTitle->Des().Copy( *titleText );
+    newTitle->Des().Append( titleAddition );
+    titlePane->SetTextL( *newTitle, ETrue );
+    CleanupStack::PopAndDestroy( newTitle );
+#endif
+
+    if ( !iContainer )
+        {
+        CAlfEnv* alfEnv = CAlfEnv::Static();
+        CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( AppUi() );
+        iContainer = CFMRadioMainContainer::NewL( ClientRect() , *alfEnv, *iRadioEngine );
+        iContainer->RdsViewer().SetObserver( this );
+        iContainer->Logo().SetObserver( this );
+        }
+    if ( !AknLayoutUtils::PenEnabled() )
+        {
+        // explicitly remove the middle softkey that shouldn't be there.
+        Cba()->SetCommandL( CEikButtonGroupContainer::EMiddleSoftkeyPosition, 0, KNullDesC );
+        }
+
+    SetStationChangeType( EFMRadioStationChangeNone );
+
+    if ( !iStartUp )
+        {
+        StopSeekL(); //used to trigger a UI update
+        }
+    else
+        {
+        AppUi()->HandleCommandL( EFMRadioCmdUpdateVolume );
+        }
+
+    AppUi()->HandleCommandL( EFMRadioCmdMainViewActive );
+
+    iRadioEngine->RdsReceiver().AddObserver( this );
+
+    TBool afEnabled = iRadioEngine->RadioSettings().IsRdsAfSearchEnabled();
+
+    iContainer->ShowRdsInfo( iRadioEngine->RdsReceiver().SignalAvailable(), EFalse, afEnabled );
+    FadeAndShowExit(iFaded);
+    }
+
+// ---------------------------------------------------------
+// CFMRadioMainView::DoDeactivate
+// Deactivate the main view
+// ---------------------------------------------------------
+//
+void CFMRadioMainView::DoDeactivate()
+    {
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>(AppUi());
+    
+    if ( appUi->RadioEngine() )
+        {
+        iRadioEngine->RdsReceiver().RemoveObserver( this );
+    	}
+    
+    if ( iContainer )
+        {
+        CAlfEnv* alfEnv = CAlfEnv::Static();
+        if ( alfEnv )
+            {
+            iContainer->RdsViewer().RemoveObserver( this );
+            iContainer->RdsViewer().Reset();
+            iContainer->Logo().RemoveObserver( this );
+            iContainer->IdleController().HideAllControls();
+            }
+        delete iContainer;
+	    iContainer = NULL;
+        }
+    }
+	
+// ---------------------------------------------------------
+// CFMRadioMainView::DynInitMenuPaneL
+// Sets the state of menu items dynamically according to the
+// state of application data.
+// ---------------------------------------------------------
+//
+void CFMRadioMainView::DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane )
+    {
+    iMusicStoreHandler->InitializeMenuL( aResourceId, aMenuPane );
+    
+    if ( aResourceId == R_FMRADIO_MAIN_OPTIONS_MENU ) // Main menu
+        {
+        if ( IsWebLinkAvailable() )
+            {
+            aMenuPane->SetItemDimmed( EMPXPbvCmdInternetGoToWeb, EFalse );
+            }
+        else
+            {
+            aMenuPane->SetItemDimmed( EMPXPbvCmdInternetGoToWeb, ETrue );
+            }
+
+        if ( iRadioEngine->IsAudioRoutingPossible() )
+        	{
+	        if ( iRadioEngine->GetAudioOutput() == CRadioEngine::EFMRadioOutputIHF )
+	            {
+	            // Delete existing menu option and add a new one
+	            aMenuPane->DeleteMenuItem( EFMRadioCmdActivateIhf );
+	            if ( iRadioEngine->IsHeadsetConnected() )
+	                {
+	                aMenuPane->SetItemTextL( EFMRadioCmdDeactivateIhf, R_QTN_FMRADIO_OPTIONS_DEACTIVATE );
+	                }
+	            else
+	                {
+	                aMenuPane->DeleteMenuItem( EFMRadioCmdDeactivateIhf );
+	                }
+	            }
+	        else
+	            {
+	            // Delete existing menu option and add a new one
+	            aMenuPane->DeleteMenuItem( EFMRadioCmdDeactivateIhf );
+	            aMenuPane->SetItemTextL( EFMRadioCmdActivateIhf,R_QTN_FMRADIO_OPTIONS_ACTIVATE );
+	            }
+        	}
+		else
+			{
+			aMenuPane->SetItemDimmed( EFMRadioCmdDeactivateIhf, ETrue );	
+			aMenuPane->SetItemDimmed( EFMRadioCmdActivateIhf, ETrue );
+			}        	
+
+        // if help is not enabled, disable help option
+        if ( !FeatureManager::FeatureSupported( KFeatureIdHelp ) )
+            {
+            aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue );
+            }
+        CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+        if ( appUi->MatchingChannelL( iRadioEngine->GetTunedFrequency() ) == KErrNotFound || 
+              iRadioEngine->GetRadioMode() == CRadioEngine::ERadioTunerMode ) // current frequency not saved
+            {
+            aMenuPane->SetItemDimmed( EFMRadioCmdRename, ETrue );
+            aMenuPane->SetItemDimmed( EFMRadioCmdSaveChannel, EFalse );
+            aMenuPane->SetItemDimmed( EFMRadioCmdErase, ETrue );
+            }
+        else
+            {
+            aMenuPane->SetItemDimmed( EFMRadioCmdRename, EFalse );
+            aMenuPane->SetItemDimmed( EFMRadioCmdSaveChannel, ETrue );
+            aMenuPane->SetItemDimmed( EFMRadioCmdErase, EFalse );
+            }
+        }
+        
+    if ( aResourceId == R_FMRADIO_OPTIONS_AF_SUB_MENU ) // Rds af search sub menu
+        {
+        TBool afEnabled = iRadioEngine->RadioSettings().IsRdsAfSearchEnabled();
+	    if ( afEnabled )
+	    	{
+			aMenuPane->SetItemButtonState( EFMRadioCmdDisableRdsAfSearch, EEikMenuItemSymbolIndeterminate );        	
+        	aMenuPane->SetItemButtonState( EFMRadioCmdEnableRdsAfSearch, EEikMenuItemSymbolOn );
+        	}
+        else
+        	{      	
+			aMenuPane->SetItemButtonState( EFMRadioCmdEnableRdsAfSearch, EEikMenuItemSymbolIndeterminate );
+        	aMenuPane->SetItemButtonState( EFMRadioCmdDisableRdsAfSearch, EEikMenuItemSymbolOn );
+        	}
+        }
+    
+    }
+
+// ---------------------------------------------------------
+// CFMRadioMainView::LayoutChangedL
+// ---------------------------------------------------------
+//
+void CFMRadioMainView::LayoutChangedL( TInt aType )
+    {
+    if ( iContainer ) 
+    	{
+    	iContainer->HandleResourceChange( aType );
+    	}
+    }
+    
+// ---------------------------------------------------------
+// CFMRadioMainView::SetStationChangeType
+// ---------------------------------------------------------
+//
+void CFMRadioMainView::SetStationChangeType( TFMRadioStationChangeType aChangeType )
+	{
+	iChangeDirection = aChangeType;
+	}
+	
+// ---------------------------------------------------------
+// CFMRadioMainView::PrepareViewForChannelChange
+// ---------------------------------------------------------
+//
+void CFMRadioMainView::PrepareViewForChannelChange()
+	{
+	TRAP_IGNORE( PrepareViewForChannelChangeL() );
+	}
+	
+// ---------------------------------------------------------
+// CFMRadioMainView::PrepareViewForChannelChangeL
+// ---------------------------------------------------------
+//
+void CFMRadioMainView::PrepareViewForChannelChangeL()
+	{	
+	switch ( iChangeDirection ) 
+		{
+		case EFMRadioStationChangeNext: // fall through
+        case EFMRadioStationChangePrevious:
+        case EFMRadioStationChangeScanUp:
+        case EFMRadioStationChangeScanDown:
+			{
+			if( iContainer )
+				{
+				iContainer->VisualControl()->ScrollOutCurrentStationInformationL( iChangeDirection );
+				}
+			}
+            break;
+		default:
+			{
+			break;
+			}
+		}	
+    if ( iContainer )
+        {
+        iContainer->RdsViewer().Reset();
+        }
+
+    if ( iContainer )
+        {
+        iContainer->ShowRTPlusInteractionIndicator( EFalse, ETrue);
+        }
+    // force update for toolbar extension view
+    iToolbar->ToolbarExtension()->SetShown( EFalse );
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainView::PrepareToolbar
+// Prepare toolbar for displaying basic radio command buttons
+// --------------------------------------------------------------------------------
+//
+void CFMRadioMainView::PrepareToolbar()
+	{
+	// get toolbar from view
+   	iToolbar = Toolbar();
+   	
+   	// Set observer
+    iToolbar->SetToolbarObserver( this );
+
+   	CAknButton* leftButton = NULL;
+ 	CAknButton* rightButton = NULL;	
+   	leftButton = static_cast<CAknButton*>( iToolbar->ControlOrNull( EFMRadioToolbarButtonCmdTuneDown ) );
+    rightButton = static_cast<CAknButton*>( iToolbar->ControlOrNull( EFMRadioToolbarButtonCmdTuneUp) );
+    
+    //set delay after buttons report long key press	
+   	if ( leftButton )
+   		{
+    	leftButton->SetLongPressInterval( KLongPressDelayValueInMicroseconds );
+    	}
+	if ( rightButton )
+		{
+		rightButton->SetLongPressInterval( KLongPressDelayValueInMicroseconds );
+		}		          	
+	}
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainView::OfferToolbarEventL
+// Handle commands from toolbar.
+// --------------------------------------------------------------------------------
+//
+void CFMRadioMainView::OfferToolbarEventL( TInt aCommandId )
+    {
+    // Event modifiers are valid only during CAknToolbar::OfferToolbarEventL
+    TBool isHandled = EFalse;
+    if ( iToolbar->EventModifiers() == CAknToolbar::ELongPress )
+        {
+        switch( aCommandId )
+            {
+            case EFMRadioToolbarButtonCmdTuneDown:
+                {
+                isHandled = ETrue;
+                AppUi()->HandleCommandL( EFMRadioCmdSeekDown );
+                break;
+                }
+            case EFMRadioToolbarButtonCmdTuneUp:
+                {
+                isHandled = ETrue;
+                AppUi()->HandleCommandL( EFMRadioCmdSeekUp );
+                break;
+                }
+            default:
+                {
+                // fall through.
+                // dont break here because extension list buttons
+                // seem to report longpress also after the tuning buttons
+                // are pressed long.
+                }
+            }
+        }
+        
+    if ( iToolbar->EventModifiers() != CAknToolbar::ELongPress && 
+        iToolbar->EventModifiers() != CAknToolbar::ELongPressEnded )
+        {
+        switch( aCommandId )
+            {
+            case EFMRadioToolbarButtonCmdTuneDown:
+                {
+                isHandled = ETrue;
+                AppUi()->HandleCommandL( EFMRadioCmdPrevChannel );
+                break;
+                }
+            case EFMRadioToolbarButtonCmdTuneUp:
+                {
+                isHandled = ETrue;
+                AppUi()->HandleCommandL( EFMRadioCmdNextChannel );
+                break;
+                }
+            default:
+                {
+                // fall through.
+                // dont break here because extension list buttons
+                // seem to report longpress also after the tuning buttons
+                // are pressed long.
+                }
+            }
+        }
+    if ( !isHandled )
+        {
+        switch( aCommandId )
+            {
+            case EFMRadioToolbarButtonCmdNokiaMusicStore:
+                {
+                HandleCommandL( EFMRadioMusicStoreNokiaMusicShop );
+                break;
+                }
+            case EFMRadioToolbarButtonCmdOperatorMusicStore:
+                {
+                HandleCommandL( EFMRadioMusicStoreOperator );
+                break;
+                }
+            case EFMRadioCmdRename:
+                {
+                iToolbar->ToolbarExtension()->SetShown( EFalse );
+                HandleCommandL( aCommandId );
+                break;
+                }
+            case EFMRadioCmdErase:
+                {
+                iToolbar->ToolbarExtension()->SetShown( EFalse );
+                HandleCommandL( aCommandId );
+                break;
+                }
+            case EFMRadioCmdChannelList:
+                {
+                iToolbar->ToolbarExtension()->SetShown( EFalse );
+                HandleCommandL( aCommandId );
+                break;
+                }
+            default:
+                {
+                HandleCommandL( aCommandId );
+                break;
+                }
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainView::DynInitToolbarL
+// from MAknToolbarObserver
+// --------------------------------------------------------------------------------
+//
+void CFMRadioMainView::DynInitToolbarL( TInt /*aResourceId*/, CAknToolbar* aToolbar )
+    {
+    if ( iToolbar == aToolbar )
+        {
+        CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+        CAknToolbarExtension* toolbarExtension = iToolbar->ToolbarExtension();
+        
+        if ( appUi->MatchingChannelL( iRadioEngine->GetTunedFrequency() ) == KErrNotFound  || 
+              iRadioEngine->GetRadioMode() == CRadioEngine::ERadioTunerMode )
+            {
+            // current frequency not saved
+            // show save
+            toolbarExtension->HideItemL( EFMRadioCmdSaveChannel, EFalse );
+            // hide rename
+            toolbarExtension->HideItemL( EFMRadioCmdRename, ETrue );
+            // dim delete
+            toolbarExtension->SetItemDimmed( EFMRadioCmdErase, ETrue );
+            }
+        else
+            {
+            // show rename
+            toolbarExtension->HideItemL( EFMRadioCmdRename, EFalse );
+            // hide save
+            toolbarExtension->HideItemL( EFMRadioCmdSaveChannel, ETrue );
+            // undim delete
+            toolbarExtension->SetItemDimmed( EFMRadioCmdErase, EFalse );
+            }
+        
+        if ( IsWebLinkAvailable() )
+            {
+            // show web button
+            toolbarExtension->HideItemL( EMPXPbvCmdInternetGoToWeb, EFalse );
+            }
+        else
+            {
+            // hide web button
+            toolbarExtension->HideItemL( EMPXPbvCmdInternetGoToWeb, ETrue );
+            }
+        
+        TBool musicStoreEnabled = iMusicStoreHandler->IsMusicStoreEnabled();
+        
+        if ( iMusicStoreHandler->OperatorMusicStoreAvailable() && musicStoreEnabled )
+            {
+            // show operator store
+            toolbarExtension->HideItemL( EFMRadioToolbarButtonCmdOperatorMusicStore, EFalse );
+            // hide speaker button
+            toolbarExtension->HideItemL( EFMRadioToolbarButtonCmdToggleIhf, ETrue );
+            }
+        else
+            {
+            // hide operator store
+            toolbarExtension->HideItemL( EFMRadioToolbarButtonCmdOperatorMusicStore, ETrue );
+            // show and update speaker button
+            UpdateToolbarSpeakerButtonStatus();
+            toolbarExtension->HideItemL( EFMRadioToolbarButtonCmdToggleIhf, EFalse );
+            }
+        
+        if ( iMusicStoreHandler->NokiaMusicStoreAvailable() && musicStoreEnabled )
+            {
+            // show Nokia Music Store
+            toolbarExtension->HideItemL( EFMRadioToolbarButtonCmdNokiaMusicStore, EFalse );
+            }
+        else
+            {
+            // hide Nokia Music Store
+            toolbarExtension->HideItemL( EFMRadioToolbarButtonCmdNokiaMusicStore, ETrue );
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainView::SetToolbarDimmedState
+// Set the current state of the buttons in the button group
+// --------------------------------------------------------------------------------
+//
+void CFMRadioMainView::SetToolbarDimmedState( TBool aState )
+    {	
+    iToolbar->SetDimmed( aState );
+    iToolbar->DrawDeferred();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioMainView::HandleSaveChannelQueryL
+// show query if the current channel is not saved
+// ---------------------------------------------------------------------------
+//
+void CFMRadioMainView::HandleSaveChannelQueryL()
+    {
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+    TInt channelIndex = appUi->MatchingChannelL( iRadioEngine->GetTunedFrequency() );
+    
+    if ( KErrNotFound == channelIndex )
+        {
+        TBool accepted = EFalse; // Operation accepted or discarded
+        CAknQueryDialog* saveQuery = CAknQueryDialog::NewL();
+        accepted = saveQuery->ExecuteLD( R_FMRADIO_QUERY_SAVE_CURRENT );
+        
+        if ( accepted )
+            {
+            AppUi()->HandleCommandL( EFMRadioCmdSaveChannel );
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainView::SetEmphasis
+// From MEikMenuObserver. 
+// --------------------------------------------------------------------------------
+//
+void CFMRadioMainView::SetEmphasis( CCoeControl* aMenuControl, TBool aEmphasis )
+    {
+    CAknView::SetEmphasis( aMenuControl, aEmphasis );
+
+    if ( iContainer )
+        {
+        if ( aEmphasis ) // options menu opened
+            {
+            iOptionsMenuOpen = ETrue;
+            // deactivate controls to help improve UI performance
+            iContainer->IdleController().DeactivateControls();
+            }
+        else
+            {
+            if ( iOptionsMenuOpen )
+                {
+                // menu has been been really opened so update status
+                iOptionsMenuOpen = EFalse;
+                DetermineActiveMediaIdleComponent();
+                }
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainView::LogoDisplayTimeCompleted
+// from MFMRadioAlfLogoObserver 
+// --------------------------------------------------------------------------------
+//
+void CFMRadioMainView::LogoDisplayTimeCompleted()
+    {
+    DetermineActiveMediaIdleComponent();
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainView::DetermineActiveMediaIdleComponent
+// --------------------------------------------------------------------------------
+//
+void CFMRadioMainView::DetermineActiveMediaIdleComponent()
+    {
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*> (AppUi());
+    TBool wizardHandled = appUi->IsStartupWizardHandled();
+
+     if ( iContainer &&
+          !iOptionsMenuOpen &&
+          wizardHandled &&
+          IsForeground() )
+        {
+        
+        if ( iContainer->RdsViewer().IsRdsTextVisibilityTimerCompleted() )
+            {
+            // same text displayed for a while, ok to start idle
+            iContainer->IdleController().ShowControl( iContainer->MediaIdle() );
+            }
+        else
+            {
+            // display the rds text until the NotifyRdsTextTimerCompletion() callback
+            iContainer->IdleController().ShowControl( iContainer->RdsViewer() );
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainView::IsWebLinkAvailabe
+// --------------------------------------------------------------------------------
+//
+TBool CFMRadioMainView::IsWebLinkAvailable()
+    {
+    TBool response = EFalse;
+    TBool webLinkStored = EFalse;
+    TInt presetIndex = iRadioEngine->GetPresetIndex();
+    
+    if ( iRadioEngine->GetRadioMode() == CRadioEngine::ERadioPresetMode &&
+            presetIndex < iObserver.Channels().Count() )
+        {
+        if ( iObserver.Channels()[ presetIndex ]->PresetUrl().Length() )
+            {
+            webLinkStored = ETrue;
+            }
+        }
+
+    CFMRadioRdsReceiverBase& receiver = iRadioEngine->RdsReceiver();
+    
+    if ( ( receiver.RtPlusProgramUrl().Length() || 
+            webLinkStored ) && 
+            iRadioEngine->GetRTPlusSupportLevel() == EFMRadioAllInteractions )
+        {
+        response = ETrue;
+        }
+    
+    return response;
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainView::UpdateToolbarSpeakerButtonStatus
+// --------------------------------------------------------------------------------
+//
+void CFMRadioMainView::UpdateToolbarSpeakerButtonStatus()
+    {
+    if ( iToolbar && iContainer )
+        {
+        CAknToolbarExtension* toolbarExtension = iToolbar->ToolbarExtension();
+        
+        if ( iRadioEngine->IsAudioRoutingPossible() )
+            {
+            toolbarExtension->SetItemDimmed( EFMRadioToolbarButtonCmdToggleIhf, EFalse );
+            CAknButton* speakerButton = NULL;
+            
+            speakerButton = static_cast<CAknButton*>( toolbarExtension->ControlOrNull( EFMRadioToolbarButtonCmdToggleIhf ) );
+            
+            if ( speakerButton )
+                {
+                if ( iRadioEngine->GetAudioOutput() == CRadioEngine::EFMRadioOutputIHF )
+                    {
+                    speakerButton->SetCurrentState( 1, ETrue );
+                    }
+                else
+                    {
+                    speakerButton->SetCurrentState( 0, ETrue );
+                    }
+                }
+            }
+        else
+            {
+            toolbarExtension->SetItemDimmed( EFMRadioToolbarButtonCmdToggleIhf, ETrue );
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioMainView::ShowDefaultLogo
+// --------------------------------------------------------------------------------
+//
+void CFMRadioMainView::ShowDefaultLogo()
+    {
+    // show default radio logo
+    if ( iContainer )
+        {
+        iContainer->IdleController().ShowControl( iContainer->Logo() );
+        }
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradiomusicstorehandler.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,761 @@
+/*
+* 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:  Implementation for music store integration.
+*
+*/
+
+#include <apgcli.h>
+#include <apgtask.h>
+#include <centralrepository.h>
+#include <e32base.h>
+#include <e32property.h>
+#include <eikenv.h>
+#include <eikmenup.h>
+#include <eikmenub.h>
+#include <fmradio.rsg>
+#include <mpxfindinmusicshop.h>
+#include <mpxfindinmusicshopcommon.h>   //for p&s keys
+
+#include "fmradio.hrh"
+#include "fmradiomusicstorehandler.h"
+#include "debug.h"
+
+// Some debug flags
+
+// If defined, forces Operator specific music shop to be enabled,
+// regardless if it is supported or not. For debugging purposes
+#undef FORCE_OPERATOR_MUSIC_SHOP
+
+// Following constants are from mpxmusicplayer_101FFCDC.crml
+const TUid KCRUidMPXMPSettings = {0x101FFCDC}; // UID for Music Store Settings CenRep
+const TUint32 KMPXMusicStoreUID = 0x3;
+const TUint32 KOperatorMusicStore = 0x4;
+const TUint32 KOperatorMusicStoreType = 0x5;
+const TUint32 KOperatorMusicStoreDisplayName = 0x6;
+const TUint32 KOperatorMusicStoreNativeUid = 0x7;
+const TUint32 KOperatorMusicStoreJavaName = 0x8;
+const TUint32 KOperatorMusicStoreWebPage = 0x9;
+const TUint32 KOperatorMusicStoreURI = 0xA;
+const TInt TUInt32HexLength = 8;
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::CMusicStoreHandler
+// C++ class constructor.
+// ----------------------------------------------------
+//
+CFMRadioMusicStoreHandler::CFMRadioMusicStoreHandler( TInt aResourceId )
+: iResourceId( aResourceId )
+    {
+    // Nothing to do
+    }
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::~CMusicStoreHandler
+// Default destructor.
+// ----------------------------------------------------
+//
+CFMRadioMusicStoreHandler::~CFMRadioMusicStoreHandler()
+    {
+    iOperatorMusicStoreName.Close();
+    iOperatorStoreWebsite.Close();
+    }
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::NewL
+// Two-phased class constructor.
+// ----------------------------------------------------
+//
+CFMRadioMusicStoreHandler* CFMRadioMusicStoreHandler::NewL( TInt aResourceId )
+    {
+    CFMRadioMusicStoreHandler* self = new (ELeave) CFMRadioMusicStoreHandler( aResourceId );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::NewL
+// Second phase class constructor.
+// ----------------------------------------------------
+//
+void CFMRadioMusicStoreHandler::ConstructL()
+    {
+    iCoeEnv = CEikonEnv::Static();
+    CRepository* repository = CRepository::NewL( KCRUidMPXMPSettings );
+    CleanupStack::PushL( repository );
+    
+    RBuf8 uidDes;
+    uidDes.CleanupClosePushL();
+    uidDes.CreateL( TUInt32HexLength );
+    TInt error = KErrNone;
+    error = repository->Get( KMPXMusicStoreUID, uidDes );
+    
+    // Check for availability of Nokia Music store
+    if ( !error )
+        {
+        iMusicStoreUID = Uint32Presentation( uidDes );
+        iMusicStoreAppInstalled = IsAppInstalledL( TUid::Uid( iMusicStoreUID ) );
+        }
+
+    if ( NokiaMusicStoreAvailable() )
+        {
+        InitializeMusicStore( TUid::Uid( iMusicStoreUID ) );
+        }
+
+    // Check if operator provided a music store
+    TFMRadioOperatorAppType appType = CheckOperatorMusicStoreTypeL( *repository );
+    if ( appType != EFMRadioAppNotAvailable )
+        {
+        // Get the name of the music store
+        const TInt initialNameLength = 11;
+        iOperatorMusicStoreName.CreateL( initialNameLength );
+        TInt realLength = KErrNotFound;
+        error = repository->Get( KOperatorMusicStoreDisplayName, iOperatorMusicStoreName, realLength );
+        if ( error == KErrOverflow )
+            {
+            iOperatorMusicStoreName.ReAllocL( realLength );
+            error = repository->Get( KOperatorMusicStoreDisplayName, iOperatorMusicStoreName );
+            }
+        User::LeaveIfError( error );
+#ifdef FORCE_OPERATOR_MUSIC_SHOP
+        if ( !iOperatorMusicStoreName.Length() )
+            {
+            _LIT( KHardCodedName, "O'MusicShop" ); // length <= initialNameLength
+            iOperatorMusicStoreName.Copy( KHardCodedName );
+            }
+#endif
+
+        // Get application type specific parameters
+        InitializeParametersL( *repository, appType );
+        }
+    CleanupStack::PopAndDestroy( 2 ); // uidDes, repository
+    }
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::CheckOperatorMusicStoreTypeL
+// ----------------------------------------------------
+//
+CFMRadioMusicStoreHandler::TFMRadioOperatorAppType CFMRadioMusicStoreHandler::CheckOperatorMusicStoreTypeL(
+        CRepository& aRepository )
+    {
+    TFMRadioOperatorAppType appType = EFMRadioAppNotAvailable;
+    // Check if operator provided a music store
+    TBool operatorStorePresent = EFalse;
+    TInt error = aRepository.Get( KOperatorMusicStore, operatorStorePresent );
+    if ( error != KErrNotFound )
+        {
+        User::LeaveIfError( error );
+        }
+    if ( operatorStorePresent )
+        {
+        TInt appTypeCR;
+        error = aRepository.Get( KOperatorMusicStoreType, appTypeCR );
+        User::LeaveIfError( error );
+        if ( appTypeCR == 0 ) // 0 = Native app
+            {
+            appType = EFMRadioNativeApp;
+            }
+        else    // 1 = Java app
+            {
+            appType = EFMRadioJavaApp;
+            }
+         }
+
+    // The code assumes that if both application and website is available then
+    // website is preferred type
+    TInt website;
+    error = aRepository.Get( KOperatorMusicStoreWebPage, website );
+    User::LeaveIfError( error );
+#ifdef FORCE_OPERATOR_MUSIC_SHOP
+    website = ETrue;
+#endif
+    if ( website )
+        {
+        appType = EFMRadioWebsite;
+        }
+
+    return appType;
+    }
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::InitializeParametersL
+// ----------------------------------------------------
+//
+void CFMRadioMusicStoreHandler::InitializeParametersL(
+        CRepository& aRepository,
+        TFMRadioOperatorAppType aAppType )
+    {
+    TInt error = KErrNone;
+    switch ( aAppType )
+        {
+        case EFMRadioNativeApp:
+            {
+            RBuf8 operatorUidDes;
+            operatorUidDes.CleanupClosePushL();
+            operatorUidDes.CreateL( TUInt32HexLength );
+            
+            TInt error = KErrNone;
+            error = aRepository.Get( KOperatorMusicStoreNativeUid, operatorUidDes );
+            
+            if ( !error )
+                {
+                iOperatorStoreNativeUID = Uint32Presentation( operatorUidDes );
+                // It is assumed that both Nokia Music Shop and operator specific music store use
+                // same kind of interface to communicate
+                InitializeMusicStore( TUid::Uid( iOperatorStoreNativeUID ) );
+                }
+            CleanupStack::PopAndDestroy( &operatorUidDes );
+            break;
+            }
+        case EFMRadioJavaApp:
+            {
+            TApaAppInfo appInfo;
+            RBuf operatorJavaAppName;
+            operatorJavaAppName.CleanupClosePushL();
+            operatorJavaAppName.CreateL( appInfo.iCaption.MaxLength() ); // caption length should be enough
+            
+            TInt err = aRepository.Get( KOperatorMusicStoreJavaName, operatorJavaAppName );
+
+            if ( !err )
+                {
+                _LIT( KFakeName, ".fakeapp" );
+                RApaLsSession apaSession;
+                User::LeaveIfError( apaSession.Connect() );
+                CleanupClosePushL( apaSession );
+                User::LeaveIfError( apaSession.GetAllApps() );
+    
+                while ( apaSession.GetNextApp( appInfo ) == KErrNone )
+                    {
+                    if ( appInfo.iFullName.Right( 8 ).Compare( KFakeName ) == 0)
+                        {
+                        TApaAppCaption appname;
+                        appname = appInfo.iCaption;
+                        if ( !appInfo.iCaption.Compare( operatorJavaAppName ) )
+                            {
+                            FTRACE(FPrint(_L("CFMRadioMusicStoreHandler::InitializeParametersL( Operator Java UID found, name: %S)"), &operatorJavaAppName ));
+                            iOperatorJavaMusicStoreUID = appInfo.iUid;
+                            }
+                        }
+                    }
+                CleanupStack::PopAndDestroy( &apaSession ); // close apaSession
+                }
+            CleanupStack::PopAndDestroy( &operatorJavaAppName );
+            break;
+            }
+        case EFMRadioWebsite:
+            {
+            const TInt initialSize = 5;
+            TInt realLength = KErrNotFound;
+            iOperatorStoreWebsite.Create( initialSize );
+            error = aRepository.Get( KOperatorMusicStoreURI, iOperatorStoreWebsite, realLength );
+            if ( error == KErrOverflow )
+                {
+                iOperatorStoreWebsite.ReAllocL( realLength );
+                error = aRepository.Get( KOperatorMusicStoreURI, iOperatorStoreWebsite );
+                }
+            User::LeaveIfError( error );
+#ifdef FORCE_OPERATOR_MUSIC_SHOP
+            if ( !iOperatorStoreWebsite.Length() )
+                {
+                _LIT( KHardCodedName, "http://www.google.com/" );
+                iOperatorStoreWebsite.ReAllocL( KHardCodedName().Length() );
+                iOperatorStoreWebsite.Copy( KHardCodedName );
+                }
+#endif
+            break;
+            }
+        default:
+            break;
+        }
+    }
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::InitializeMusicShop
+// ----------------------------------------------------
+//
+void CFMRadioMusicStoreHandler::InitializeMusicStore( TUid aMusicstoreUid )
+    {
+    //MusicShop CenRep initialization values
+    _LIT_SECURITY_POLICY_C1(KMPlayerRemoteReadPolicy, ECapabilityReadUserData);
+    _LIT_SECURITY_POLICY_C1(KMPlayerRemoteWritePolicy, ECapabilityWriteUserData);
+    TInt retval(KErrNone);
+    // P/S key for music shop
+    retval = RProperty::Define( aMusicstoreUid,
+            KMShopCategoryId,
+            RProperty::EInt,
+            KMPlayerRemoteReadPolicy,
+            KMPlayerRemoteWritePolicy );
+
+    if( retval != KErrAlreadyExists)
+        {
+        RProperty::Set( aMusicstoreUid,
+                KMShopCategoryId,
+                KFindInMShopKeyInValid );  // initialize Find In Musicshop was not called
+
+        RProperty::Define( aMusicstoreUid,
+                KMShopCategoryName,
+                RProperty::ELargeText,
+                KMPlayerRemoteReadPolicy,
+                KMPlayerRemoteWritePolicy );
+        }
+    }
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::GetUint32Presentation
+// ----------------------------------------------------
+//
+TUint32 CFMRadioMusicStoreHandler::Uint32Presentation( const TDesC8& aBuf )
+    {
+    TUint32 result = 0;
+
+    const TInt KProEngByteLength( 8 );
+    const TInt length( aBuf.Length() );
+    const TInt maxBitShift( KProEngByteLength * ( length - 1 ) );
+
+    for ( TInt i( 0 ); i < length; ++i )
+        {
+        result |= ( aBuf[i] <<
+                   ( maxBitShift - ( KProEngByteLength * i ) ) );
+        }
+    return result;
+    }
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::IsMusicStoreCommandId
+// Goes through known command ids and compares to them
+// ----------------------------------------------------
+//
+TBool CFMRadioMusicStoreHandler::IsMusicStoreCommandId( TInt aCommandId )
+    {
+    TBool isHandled = EFalse;
+    switch( aCommandId )
+        {
+        case EFMRadioMusicStore:
+        case EFMRadioMusicStoreGoogle:
+        case EFMRadioMusicStoreWikipedia:
+        case EFMRadioMusicStoreAmg:
+        case EFMRadioMusicStoreNokiaMusicShop:
+        case EFMRadioMusicStoreMusicPortl:
+        case EFMRadioMusicStoreOperator:
+            isHandled = ETrue;
+            break;
+        default:
+            break;
+        }
+    return isHandled;
+    }
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::MusicStoreCount
+// ----------------------------------------------------
+//
+TInt CFMRadioMusicStoreHandler::MusicStoreCount()
+    {
+    TInt count = 0;
+    if ( NokiaMusicStoreAvailable() )
+        {
+        count++;
+        }
+    if ( OperatorMusicStoreAvailable() )
+        {
+        count++;
+        }
+    return count;
+    }
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::OperatorMusicStoreAvailable
+// ----------------------------------------------------
+//
+TBool CFMRadioMusicStoreHandler::OperatorMusicStoreAvailable()
+    {
+    return ( iOperatorMusicStoreName.Length() != 0 );
+    }
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::NokiaMusicStoreAvailable
+// ----------------------------------------------------
+//
+TBool CFMRadioMusicStoreHandler::NokiaMusicStoreAvailable()
+    {
+    TBool response = EFalse;
+    
+    if ( iMusicStoreUID != 0 && iMusicStoreAppInstalled )
+        {
+        response = ETrue;
+        }
+    return response;
+    }
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::InitializeMenuL
+// Takes care of dynamically initializing menu items related to Music shop.
+// Takes care of adding either menu item or cascaded menuitem
+// based on how many Music shops there is available. Fills the
+// cascaded menuitem automatically.
+// ----------------------------------------------------
+//
+TBool CFMRadioMusicStoreHandler::InitializeMenuL( TInt aResourceId, CEikMenuPane* aMenuPane )
+    {
+    TBool resourceHandled = EFalse;
+
+    if ( aResourceId == R_FMRADIO_OPTIONS_MUSIC_STORE_SUB_MENU )
+        {
+        if ( NokiaMusicStoreAvailable() )
+            {
+            aMenuPane->SetItemDimmed( EFMRadioMusicStoreNokiaMusicShop, EFalse );
+            }
+        else
+            {
+            aMenuPane->SetItemDimmed( EFMRadioMusicStoreNokiaMusicShop, ETrue );
+            }
+        if ( OperatorMusicStoreAvailable() )
+            {
+            aMenuPane->SetItemTextL( EFMRadioMusicStoreOperator, iOperatorMusicStoreName );
+            aMenuPane->SetItemDimmed( EFMRadioMusicStoreOperator, EFalse );
+            }
+        else
+            {
+            aMenuPane->SetItemDimmed( EFMRadioMusicStoreOperator, ETrue );
+            }
+        resourceHandled = ETrue;
+        }
+    else if ( iResourceId == aResourceId )
+        {
+        const TInt firstIndex = 0;
+        TInt firstCommand = aMenuPane->MenuItemCommandId( firstIndex );
+        if ( MusicStoreCount() > 1 || OperatorMusicStoreAvailable() )
+            {
+            aMenuPane->AddMenuItemsL( R_FMRADIO_OPTIONS_MUSIC_STORE_WITH_SUB_MENU, firstCommand );
+            }
+        else
+            {
+            aMenuPane->AddMenuItemsL( R_FMRADIO_OPTIONS_MUSIC_STORE, firstCommand );
+            }
+
+        // Show or hide menu item based on Music store state
+        if ( iState == EFMRadioMusicStoreDisabled || iState == EFMRadioMusicStoreUninitialized )
+            {
+            aMenuPane->SetItemDimmed( EFMRadioMusicStore, ETrue );
+            }
+        else if ( iState == EFMRadioMusicStoreEnabled && !MusicStoreCount() )
+            {
+            aMenuPane->SetItemDimmed( EFMRadioMusicStore, ETrue );
+            }
+        else
+            {
+            aMenuPane->SetItemDimmed( EFMRadioMusicStore, EFalse );
+            }
+        }
+    else
+        {
+        //NOP
+        }
+    return resourceHandled;
+    }
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::EnableMusicStore
+// Shows or hides Music store related functionality
+// ----------------------------------------------------
+//
+void CFMRadioMusicStoreHandler::EnableMusicStore( TBool aEnable, TBool aForce )
+    {
+    if ( aForce && aEnable )
+        {
+        iState = EFMRadioMusicStoreForceEnabled;
+        }
+    else if ( aEnable )
+        {
+        iState = EFMRadioMusicStoreEnabled;
+        }
+    else
+        {
+        iState = EFMRadioMusicStoreDisabled;
+        }
+    }
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::LaunchMusicStoreL
+// Launches appropriate Music Store functionality based on parameters.
+// ----------------------------------------------------
+//
+void CFMRadioMusicStoreHandler::LaunchMusicStoreL(
+        TInt aCommandId,
+        const TDesC& aTitle,
+        const TDesC& aArtist,
+        const TDesC& aAlbum )
+    {
+    if ( aCommandId == EFMRadioMusicStore )
+        {
+        aCommandId = EFMRadioMusicStoreNokiaMusicShop;
+        }
+
+    RBuf searchString;
+    searchString.CleanupClosePushL();
+
+    TBool isHandled = EFalse;
+    switch( aCommandId )
+        {
+        case EFMRadioMusicStoreGoogle:
+        case EFMRadioMusicStoreWikipedia:
+        case EFMRadioMusicStoreAmg:
+        case EFMRadioMusicStoreMusicPortl:
+            break;
+        case EFMRadioMusicStoreNokiaMusicShop:
+            isHandled = ETrue;
+            searchString.Assign( NokiaMusicShopSearchL( aTitle, aArtist, aAlbum ) );
+            break;
+        case EFMRadioMusicStoreOperator:
+            if ( iOperatorStoreWebsite.Length() != 0 )
+                {
+                isHandled = ETrue;
+                searchString.CreateL( iOperatorStoreWebsite );
+                }
+            else if ( iOperatorStoreNativeUID )
+                {
+                isHandled = ETrue;
+                // It is assumed that both Nokia Music Shop and operator specific music store use
+                // same kind of interface to communicate
+                searchString.Assign( NokiaMusicShopSearchL( aTitle, aArtist, aAlbum ) );
+                }
+            else if ( iOperatorJavaMusicStoreUID.iUid )
+                {
+                isHandled = ETrue;
+                }
+            else
+                {
+                }
+            break;
+        default:
+            FTRACE( FPrint( _L("CFMRadioMusicStoreHandler::LaunchMusicStoreL - Unknown id = %d"), aCommandId ) );
+            break;
+        }
+
+    if ( isHandled )
+        {
+        switch( aCommandId )
+            {
+            case EFMRadioMusicStoreNokiaMusicShop:
+                {
+                TUid musicshopUid( TUid::Uid( iMusicStoreUID ) );
+                LaunchMusicShopL( musicshopUid, searchString );
+                break;
+                }
+            case EFMRadioMusicStoreOperator:
+                LaunchOperatorMusicStoreL( searchString );
+                break;
+            default:
+                LaunchWebPageL( searchString );
+                break;
+            }
+        }
+    CleanupStack::PopAndDestroy( &searchString );
+    }
+
+// -----------------------------------------------------------------------------
+// CFMRadioMusicStoreHandler::LaunchOperatorMusicStoreL
+// -----------------------------------------------------------------------------
+//
+void CFMRadioMusicStoreHandler::LaunchOperatorMusicStoreL( const TDesC& aSearchString )
+    {
+    FTRACE(FPrint(_L("CFMRadioMusicStoreHandler::LaunchOperatorMusicStoreL('%S')"), &aSearchString));
+    if ( iOperatorStoreWebsite.Length() != 0 )
+        {
+        FTRACE(FPrint(_L("CFMRadioMusicStoreHandler::LaunchOperatorMusicStoreL Website") ));
+        LaunchWebPageL( aSearchString );
+        }
+    else if ( iOperatorStoreNativeUID )
+        {
+        // It is assumed that both Nokia Music Shop and operator specific music store use
+        // same kind of interface to communicate
+        FTRACE(FPrint(_L("CFMRadioMusicStoreHandler::LaunchOperatorMusicStoreL Operator Native UID") ));
+        TUid musicshopUid( TUid::Uid( iOperatorStoreNativeUID ) );
+        LaunchMusicShopL( musicshopUid, aSearchString );
+        }
+    else if ( iOperatorJavaMusicStoreUID.iUid )
+        {
+        FTRACE(FPrint(_L("CFMRadioMusicStoreHandler::LaunchOperatorMusicStoreL Operator Java UID") ));
+        TThreadId threadId;
+        RApaLsSession apaSession;
+        User::LeaveIfError( apaSession.Connect() );
+        CleanupClosePushL( apaSession );
+        apaSession.StartDocument( KNullDesC, iOperatorJavaMusicStoreUID, threadId );
+        CleanupStack::PopAndDestroy( &apaSession ); // close apaSession
+        }
+    else
+        {
+        //NOP
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CFMRadioMusicStoreHandler::NokiaMusicShopSearchL
+// -----------------------------------------------------------------------------
+//
+HBufC* CFMRadioMusicStoreHandler::NokiaMusicShopSearchL(
+        const TDesC& aSongName,
+        const TDesC& aArtistName,
+        const TDesC& aAlbumName )
+    {
+    HBufC* searchUrl = NULL;    // Launching the music store client
+    _LIT(KReferrerAppParam, "&ReferrerApp=3");
+    
+    if ( aSongName.Length() || aArtistName.Length() || aAlbumName.Length() )
+        {
+        CMPXFindInMShop* finder = CMPXFindInMShop::NewL();  //ECom Plugin
+        CleanupStack::PushL( finder );
+        searchUrl = finder->CreateSearchURLL(  aSongName,
+                                         aArtistName,
+                                         aAlbumName,
+                                         KNullDesC,     // Composer - Not used
+                                         KNullDesC );   // Genre - Not used
+        
+        HBufC* finalUrl = HBufC::NewL( searchUrl->Length() + KReferrerAppParam().Length() );
+        
+        TPtr urlPtr = finalUrl->Des();
+        urlPtr.Copy( *searchUrl );
+        urlPtr.Append( KReferrerAppParam() );
+        
+        delete searchUrl;
+        searchUrl = NULL;
+        
+        CleanupStack::PopAndDestroy( finder ); // finder
+        REComSession::FinalClose();
+        return finalUrl;
+        }
+    return searchUrl;
+    }
+
+// -----------------------------------------------------------------------------
+// CFMRadioMusicStoreHandler::LaunchMusicShopL
+// Launch Nokia music shop application
+// -----------------------------------------------------------------------------
+//
+void CFMRadioMusicStoreHandler::LaunchMusicShopL( TUid aMusicshopUid, const TDesC& aSearchString )
+    {
+    if ( aSearchString.Length() )
+        {
+        RProperty::Set( aMusicshopUid,
+                KMShopCategoryName,
+                aSearchString );
+    
+        RProperty::Set( aMusicshopUid,
+                KMShopCategoryId,
+                KFindInMShopKeyValid );  // Set Key to Valid
+        }
+
+    TApaTaskList taskList( iCoeEnv->WsSession() );
+    TApaTask task = taskList.FindApp( aMusicshopUid );
+
+    if ( task.Exists() )
+        {
+        task.BringToForeground();
+        }
+    else
+        {
+        RApaLsSession session;
+        User::LeaveIfError( session.Connect() );
+        TThreadId threadId;
+        session.CreateDocument( KNullDesC, aMusicshopUid, threadId );
+        session.Close();
+        }
+    }
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::LaunchWebPageL
+// Opens web site based on the string
+// ----------------------------------------------------
+//
+void CFMRadioMusicStoreHandler::LaunchWebPageL( const TDesC& aWebpage )
+    {
+    _LIT( KCommand, "4 ");
+    RBuf param;
+    param.CreateL( KCommand().Length() + aWebpage.Length() );
+    param.CleanupClosePushL();
+    param.Copy( KCommand() );   //Web Browser requires this in order to fetch url.
+    param.Append( aWebpage );
+
+    const TInt KWebBrowserUid = 0x10008D39;
+    TUid browserId( TUid::Uid( KWebBrowserUid ) );
+    TApaTaskList taskList( iCoeEnv->WsSession() );
+    TApaTask task = taskList.FindApp( browserId );
+    if ( task.Exists() )
+        {
+        HBufC8* param8 = HBufC8::NewLC( param.Length() );
+        param8->Des().Append( param );
+        task.SendMessage( TUid::Uid( 0 ), *param8 ); // Uid is not used
+        CleanupStack::PopAndDestroy( param8 );
+        }
+    else
+        {
+        RApaLsSession session;
+        User::LeaveIfError( session.Connect() );
+        TThreadId threadId;
+        session.StartDocument( param, browserId, threadId );
+        session.Close();
+        }
+    CleanupStack::PopAndDestroy( &param );
+    }
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::IsMusicStoreLaunchable
+// ----------------------------------------------------
+//
+TBool CFMRadioMusicStoreHandler::IsMusicStoreEnabled()
+    {
+    TBool musicStoreLaunchable = EFalse;
+    
+    if ( iState != CFMRadioMusicStoreHandler::EFMRadioMusicStoreDisabled &&
+         iState != CFMRadioMusicStoreHandler::EFMRadioMusicStoreUninitialized )
+        {
+        musicStoreLaunchable = ETrue;
+        }
+    return musicStoreLaunchable;
+    }
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::OperatorMusicStoreName
+// ----------------------------------------------------
+//
+const TDesC& CFMRadioMusicStoreHandler::OperatorMusicStoreName() const
+    {
+    return iOperatorMusicStoreName;
+    }
+
+// ----------------------------------------------------
+// CFMRadioMusicStoreHandler::IsAppInstalled
+// ----------------------------------------------------
+//
+TBool CFMRadioMusicStoreHandler::IsAppInstalledL( const TUid& aAppUid )
+    {
+    TBool response = EFalse;
+    
+    RApaLsSession apaSession;
+    CleanupClosePushL( apaSession );
+    User::LeaveIfError( apaSession.Connect() );
+    apaSession.GetAllApps();
+    
+    TApaAppInfo appInfo;
+    TInt err = apaSession.GetAppInfo( appInfo, aAppUid );
+    CleanupStack::PopAndDestroy( &apaSession );
+    
+    if ( !err )
+        {
+        // app was found
+        response = ETrue;
+        }
+    return response;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradiopreset.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,138 @@
+/*
+* 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:  fmradio preset station information
+*
+*/
+
+#include "fmradiopreset.h"
+
+// ======== MEMBER FUNCTIONS ========
+
+// ----------------------------------------------------------------------------
+// CFMRadioPreset::CFMRadioPreset
+// Default constructor
+// ----------------------------------------------------------------------------
+//
+CFMRadioPreset::CFMRadioPreset() : iNameIsValid( ETrue )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioPreset::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPreset::ConstructL()
+    {
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioPreset::NewL
+// Two-phase constructor of CFMRadioPreset
+// ---------------------------------------------------------------------------
+//
+CFMRadioPreset* CFMRadioPreset::NewL() 
+    {
+    CFMRadioPreset* self = new ( ELeave ) CFMRadioPreset;
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+
+// ---------------------------------------------------------------------------
+// CFMRadioPreset::~CFMRadioPreset
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CFMRadioPreset::~CFMRadioPreset()
+    {
+    iStationName.Close();
+    iStationUrl.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioPreset::SetPresetNameL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPreset::SetPresetNameL( const TDesC& aName )
+    {
+    iStationName.Close();
+    iStationName.CreateL( aName );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioPreset::PresetName
+// ---------------------------------------------------------------------------
+//
+const TDesC& CFMRadioPreset::PresetName()
+    {
+    return iStationName;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioPreset::SetPresetNameValid
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPreset::SetPresetNameValid( TBool aValid )
+    {
+    iNameIsValid = aValid;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioPreset::PresetNameValid
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioPreset::PresetNameValid()
+    {
+    return iNameIsValid;
+    }
+ 
+// ---------------------------------------------------------------------------
+// CFMRadioPreset::SetPresetFrequency
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPreset::SetPresetFrequency( TInt aFrequency  )
+    {
+    iStationFrequency = aFrequency;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioPreset::PresetFrequency
+// ---------------------------------------------------------------------------
+//
+TInt CFMRadioPreset::PresetFrequency()
+    {
+    return iStationFrequency;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioPreset::SetPresetUrlL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPreset::SetPresetUrlL( const TDesC& aUrl )
+    {
+    iStationUrl.Close();
+    iStationUrl.CreateL( aUrl );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioPreset::PresetUrl
+// ---------------------------------------------------------------------------
+//
+const TDesC& CFMRadioPreset::PresetUrl()
+    {
+    return iStationUrl;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradioscanlocalstationscontainer.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,632 @@
+/*
+* 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:  Implementation of the class CFMRadioScanLocalStationsContainer
+*
+*/
+
+
+// INCLUDE FILES
+#include <e32math.h>
+#include <AknsSkinInstance.h>
+#include <AknsUtils.h>
+#include <AknsDrawUtils.h>
+#include <AknsBasicBackgroundControlContext.h>
+#include <akntoolbar.h>
+#include <gulutil.h> 
+#include <w32std.h>
+#include <fmradio.rsg>
+#include <StringLoader.h>
+#include <eiklabel.h>
+#include <AknWaitDialog.h>
+#include <eikclbd.h> 
+#include <AknIconArray.h>
+#include <gulicon.h> 
+#include <fmradiouids.h>
+#include <aknconsts.h>
+#include <avkon.mbg>
+
+#if defined __SERIES60_HELP || defined FF_S60_HELPS_IN_USE
+#include "radio.hlp.hrh"
+#endif
+#include "fmradioapp.h"
+#include "fmradioappui.h"
+#include "fmradioscanlocalstationscontainer.h"
+#include "fmradioscanlocalstationsview.h"
+
+// CONSTANTS
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ----------------------------------------------------------------------------
+// CFMRadioScanLocalStationsContainer::CFMRadioScanLocalStationsContainer
+// Default constructor
+// ----------------------------------------------------------------------------
+//
+CFMRadioScanLocalStationsContainer::CFMRadioScanLocalStationsContainer( CRadioEngine& aRadioEngine ):
+	iRadioEngine( aRadioEngine )
+	{	
+	}
+
+// ---------------------------------------------------------
+// CFMRadioScanLocalStationsContainer::NewL
+// Two-phase constructor of CFMRadioScanLocalStationsContainer
+// ---------------------------------------------------------
+//
+CFMRadioScanLocalStationsContainer* CFMRadioScanLocalStationsContainer::NewL( const TRect& aRect, CRadioEngine& aRadioEngine )
+    {
+    CFMRadioScanLocalStationsContainer* self = new (ELeave) CFMRadioScanLocalStationsContainer( aRadioEngine );
+    CleanupStack::PushL( self );
+    self->ConstructL( aRect );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------
+// CFMRadioScanLocalStationsContainer::ConstructL
+// EPOC two phased constructor
+// ----------------------------------------------------
+//
+void CFMRadioScanLocalStationsContainer::ConstructL( const TRect& aRect )
+    {
+    // check the layout orientation
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+    TBool isLandscape = appUi->IsLandscapeOrientation();
+    CreateWindowL();
+
+    iSkin = AknsUtils::SkinInstance();
+
+    // Instantiate a listbox for the channel list
+    iChannelList = new ( ELeave ) CAknSingleNumberStyleListBox();
+    iChannelList->SetContainerWindowL( *this );
+    iChannelList->SetListBoxObserver( this );
+    iChannelList->ConstructL( this, CEikListBox::ELoopScrolling | EAknListBoxSelectionList ); // Looped list
+    // Create scrollbars
+    iChannelList->CreateScrollBarFrameL( ETrue );
+    
+    CAknIconArray* listIconArray = new ( ELeave ) CAknIconArray( 1 );
+    CleanupStack::PushL( listIconArray );
+    CreateListIconsL( *listIconArray );
+    iChannelList->ItemDrawer()->ColumnData()->SetIconArray( listIconArray );
+    CleanupStack::Pop( listIconArray );
+
+    // Array for channels
+    iChannelItemArray = new( ELeave ) CDesCArrayFlat( KMaxNumberOfChannelListItems );
+    InitializeChannelListL();
+    SetRect( aRect ); 
+
+    CFMRadioScanLocalStationsView* searchStationsView = static_cast<CFMRadioScanLocalStationsView*> ( appUi->View( KFMRadioScanLocalStationsViewId ) );
+
+    ActivateL();
+    }
+
+// ----------------------------------------------------
+// CFMRadioScanLocalStationsContainer::CreateListIconsL
+// ----------------------------------------------------
+//
+void CFMRadioScanLocalStationsContainer::CreateListIconsL( CArrayPtr<CGulIcon>& aArray )
+    {
+    if ( iBitMaps.Count() )
+        {
+        // release any previously created bitmaps
+        iBitMaps.ResetAndDestroy();
+        }
+    
+    TRgb defaultColor = iEikonEnv->Color( EColorControlText );
+
+    // speaker icon
+    CFbsBitmap* playingIconBitmap = NULL;
+    CFbsBitmap* playingIconBitmapMask = NULL;
+        
+    AknsUtils::CreateColorIconLC( iSkin,
+                KAknsIIDQgnIndiSpeaker,
+                KAknsIIDQsnIconColors,
+                EAknsCIQsnIconColorsCG13,
+                playingIconBitmap,
+                playingIconBitmapMask,
+                KAvkonBitmapFile,
+                EMbmAvkonQgn_indi_speaker,
+                EMbmAvkonQgn_indi_speaker_mask,
+                defaultColor
+                );
+    iBitMaps.AppendL( playingIconBitmap );
+    iBitMaps.AppendL( playingIconBitmapMask );
+    CleanupStack::Pop( 2 ); // playingIconBitmap, playingIconBitmapMask
+         
+    CGulIcon* playingIcon = CGulIcon::NewLC();
+    playingIcon->SetBitmapsOwnedExternally( ETrue );
+    playingIcon->SetBitmap( playingIconBitmap );
+    playingIcon->SetMask( playingIconBitmap );
+    aArray.AppendL( playingIcon );
+    CleanupStack::Pop( playingIcon );
+    }
+
+// ----------------------------------------------------
+// CFMRadioScanLocalStationsContainer::~CFMRadioScanLocalStationsContainer
+// Class destructor
+// ----------------------------------------------------
+//
+CFMRadioScanLocalStationsContainer::~CFMRadioScanLocalStationsContainer()
+    {
+    delete iChannelList;
+    iBitMaps.ResetAndDestroy();
+    iBitMaps.Close();
+    delete iChannelItemArray;
+    }
+
+// ----------------------------------------------------
+// CFMRadioScanLocalStationsContainer::InitializeChannelListL
+// Create the channel list (initially all spots are set as empty)
+// ----------------------------------------------------
+//
+void CFMRadioScanLocalStationsContainer::InitializeChannelListL()
+	{
+	iChannelList->Reset();
+	iChannelItemArray->Reset();
+	iChannelList->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EAuto );
+    // Pass the array to the listbox model and set the ownership type
+    iChannelList->Model()->SetItemTextArray( (MDesCArray*) iChannelItemArray );
+    iChannelList->Model()->SetOwnershipType( ELbmDoesNotOwnItemArray );
+    iChannelList->HandleItemAdditionL();
+	DrawDeferred();
+	}
+
+// ----------------------------------------------------
+// CFMRadioScanLocalStationsContainer::UpdateChannelListContentL
+// Update the content of the channel at aIndex with the
+// values specified
+// ----------------------------------------------------
+//
+void CFMRadioScanLocalStationsContainer::UpdateChannelListContentL( TInt aIndex,
+        const TDesC& aInfoText,
+        TInt aChannelFrequency,
+        TBool aNowPlaying,
+        TBool aInfoTextPlacement )
+    {
+    TBuf<KLengthOfChannelItemString> textChannelItem;
+    TBuf<KLengthOfChIndexStringChList> textChIndex;
+    TBuf<KLengthOfChannelItemIconIndexString> textChIconIndex;
+    
+    textChIndex.SetLength( 0 );
+    
+    textChIconIndex.Format( KChIconIndexFormatChList, KNowPlayingIconIndexChList ) ;
+    textChannelItem.Append( textChIndex );
+    textChannelItem.Append( KColumnListSeparator );
+    
+    TReal frequency = static_cast<TReal>( aChannelFrequency / static_cast<TReal>( KHzConversionFactor ));
+    // Gets locale decimal separator automatically
+    TRealFormat format(KFrequencyMaxLength, iRadioEngine.DecimalCount() );
+    TBuf<30> frequencyString;
+    frequencyString.Num( frequency, format );
+
+    HBufC* listItemString = NULL;
+    if ( aInfoTextPlacement ) // frequency and PS name
+        {
+        const TInt granularity = 2;
+        
+        CDesCArray* stringsArray = new ( ELeave ) CDesCArrayFlat( granularity );
+        CleanupStack::PushL( stringsArray );
+        stringsArray->AppendL( frequencyString );
+        stringsArray->AppendL( aInfoText );
+        
+        listItemString = StringLoader::LoadL( R_QTN_FMRADIO_SINGLE_FREQ_NAME, *stringsArray, iEikonEnv );
+        CleanupStack::PopAndDestroy( stringsArray );
+        CleanupStack::PushL( listItemString );
+        }
+    else // frequency
+        {
+        listItemString = StringLoader::LoadLC( R_QTN_FMRADIO_SINGLE_FREQ, frequencyString, iEikonEnv );
+        }
+
+    // Update for display of Hindi Devnagari Numbers
+    TPtr listItemStringPtr = listItemString->Des();
+    AknTextUtils::LanguageSpecificNumberConversion( listItemStringPtr );
+        
+    textChannelItem.Append( *listItemString );
+    CleanupStack::PopAndDestroy( listItemString );
+    
+    // Set 'Now Playing' icon to the channel item
+    textChannelItem.Append( KColumnListSeparator );
+    
+    if ( aNowPlaying )
+        {
+        textChannelItem.Append( textChIconIndex );	
+        }
+    
+    if ( aIndex < iChannelItemArray->Count() && aIndex >= 0 )
+        {
+        iChannelItemArray->Delete( aIndex );
+        iChannelItemArray->InsertL( aIndex, textChannelItem );
+        }
+    else
+        {
+        iChannelItemArray->AppendL( textChannelItem );
+        iChannelList->HandleItemAdditionL(); // Update list
+        iChannelList->UpdateScrollBarsL();
+        }
+
+    iChannelList->DrawDeferred();
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsContainer::InsertScannedChannelToListL
+// --------------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsContainer::InsertScannedChannelToListL( TInt aIndex, TInt aChannelFrequency )
+    {
+    TBuf<KLengthOfChannelItemString> textChannelItem;
+    TBuf<KLengthOfChIndexStringChList> textChIndex;
+    
+    textChannelItem.Append( textChIndex );
+    textChannelItem.Append( KColumnListSeparator );
+    
+    TReal frequency = static_cast<TReal>( aChannelFrequency / static_cast<TReal>( KHzConversionFactor ));
+    // Gets locale decimal separator automatically
+    TRealFormat format(KFrequencyMaxLength, iRadioEngine.DecimalCount() );
+    TBuf<30> frequencyString;
+    frequencyString.Num( frequency, format );
+    
+    HBufC* listItemString = listItemString = StringLoader::LoadLC( R_QTN_FMRADIO_SINGLE_FREQ, frequencyString, iEikonEnv );
+    // Update for display of Hindi Devnagari Numbers
+    TPtr listItemStringPtr = listItemString->Des();
+    AknTextUtils::LanguageSpecificNumberConversion( listItemStringPtr );
+    textChannelItem.Append( *listItemString );
+    CleanupStack::PopAndDestroy( listItemString );
+    
+    // Set 'Now Playing' icon to the channel item
+    textChannelItem.Append( KColumnListSeparator );
+    
+    if ( aIndex <= ( iChannelItemArray->Count() - 1 ) )
+        {
+        iChannelItemArray->InsertL( aIndex, textChannelItem );
+        }
+    else
+        {
+        iChannelItemArray->AppendL( textChannelItem );
+        }    
+    
+    iChannelList->HandleItemAdditionL(); // Update list
+    iChannelList->UpdateScrollBarsL();
+    iChannelList->DrawDeferred();
+    }
+	
+// ----------------------------------------------------
+// CFMRadioScanLocalStationsContainer::RemoveChannelListContentL
+// 
+// ----------------------------------------------------
+//
+void CFMRadioScanLocalStationsContainer::RemoveChannelListContentL( TInt aIndex )
+    {
+    if ( aIndex < iChannelItemArray->Count() )
+        {
+        iChannelItemArray->Delete( aIndex );
+        iChannelList->HandleItemRemovalL();
+        iChannelList->UpdateScrollBarsL();
+
+        TInt channelCount = iChannelItemArray->Count();
+        // check if the last channel is saved and update current item
+        if ( aIndex == channelCount && channelCount > 0 )
+            {
+            iChannelList->SetCurrentItemIndex( channelCount - 1 );
+            }
+        iChannelList->DrawDeferred();
+        }
+    }
+
+// ----------------------------------------------------
+// CFMRadioScanLocalStationsContainer::UpdateNowPlayingIconL
+// Displays 'Now Playing' icon in the current selected channel item.
+// ----------------------------------------------------
+//
+void CFMRadioScanLocalStationsContainer::UpdateNowPlayingIconL( TInt aNewIndex, TInt aOldIndex )
+    {
+    HideNowPlayingIconL( aOldIndex, EFalse );
+
+    if ( aNewIndex >= 0 && aNewIndex < iChannelItemArray->Count() )
+        {
+        TBuf<KLengthOfChannelItemIconIndexString> textChIconIndex;
+        textChIconIndex.Format( KChIconIndexFormatChList, KNowPlayingIconIndexChList );
+        HBufC* channelItem = HBufC::NewLC( KLengthOfChannelItemString );
+        channelItem->Des().Copy( iChannelItemArray->MdcaPoint( aNewIndex ) );
+        TPtr ptr( channelItem->Des() );
+        ptr.Append( textChIconIndex ); // Add icon index
+
+        iChannelItemArray->InsertL( aNewIndex, *channelItem );
+        CleanupStack::PopAndDestroy( channelItem );
+        iChannelList->HandleItemAdditionL(); // Update list
+        iChannelItemArray->Delete( aNewIndex + 1 );
+        iChannelList->HandleItemRemovalL();
+        iChannelList->UpdateScrollBarsL();
+        }
+    // required for fast channel browsing
+    iChannelList->DrawNow();
+    }
+
+// ----------------------------------------------------
+// CFMRadioScanLocalStationsContainer::HideNowPlayingIconL
+// Hides 'Now Playing' icon from the last selected channel.
+// ----------------------------------------------------
+//
+void CFMRadioScanLocalStationsContainer::HideNowPlayingIconL( TInt aIndex, TBool aDraw )
+    {
+    if ( aIndex >= 0 && aIndex < iChannelItemArray->Count() )
+        {
+        HBufC* channelItem = HBufC::NewLC( KLengthOfChannelItemString );
+        channelItem->Des().Copy( iChannelItemArray->MdcaPoint( aIndex ) );
+        TPtr ptr( channelItem->Des() );	
+
+        TBuf<KLengthOfChannelItemIconIndexString> textChIconIndex;
+        TPtrC iconIndexPtr( textChIconIndex );
+        TInt err = TextUtils::ColumnText( iconIndexPtr, 2, &ptr );
+
+        if ( iconIndexPtr.Length() > 0 )
+            {
+            ptr.Delete( ptr.Length() - iconIndexPtr.Length(), iconIndexPtr.Length() ); // Remove icon index
+            iChannelItemArray->InsertL( aIndex, *channelItem );
+            iChannelList->HandleItemAdditionL(); // Update list
+            iChannelItemArray->Delete( aIndex + 1 );
+            iChannelList->HandleItemRemovalL();
+            iChannelList->UpdateScrollBarsL();
+            
+            }
+        CleanupStack::PopAndDestroy( channelItem );
+        if ( aDraw )
+            {
+            iChannelList->DrawDeferred();
+            }
+        }    
+    }
+
+// ----------------------------------------------------
+// CFMRadioScanLocalStationsContainer::SetFaded
+// Fades the entire window and controls in the window owned
+// by this container control.
+// ----------------------------------------------------
+//
+void CFMRadioScanLocalStationsContainer::SetFaded( TBool aFaded )
+	{
+    iFadeStatus = aFaded;
+    Window().SetFaded( aFaded, RWindowTreeNode::EFadeIncludeChildren );
+	}
+
+// ----------------------------------------------------
+// CFMRadioScanLocalStationsContainer::UpdateLastListenedChannel
+// Updates channel index - the highlighted channel in the list.
+// ----------------------------------------------------
+//
+void CFMRadioScanLocalStationsContainer::UpdateLastListenedChannel( TInt aIndex )
+	{
+	if ( aIndex < iChannelItemArray->Count() &&
+		 aIndex > -1 )
+		{
+	    iLastChIndex = aIndex;
+		   
+		iChannelList->SetCurrentItemIndex( iLastChIndex );
+		iChannelList->ScrollToMakeItemVisible( iLastChIndex );
+		DrawDeferred();			
+		}
+
+	}
+
+// ----------------------------------------------------
+// CFMRadioScanLocalStationsContainer::CurrentlySelectedChannel
+// Returns the index of the selected channel item from the
+// channel list.
+// ----------------------------------------------------
+//
+TInt CFMRadioScanLocalStationsContainer::CurrentlySelectedChannel() const
+	{
+    return iChannelList->CurrentItemIndex(); // Index of selected channel
+	}
+
+// ----------------------------------------------------
+// CFMRadioScanLocalStationsContainer::HandleListBoxEventL
+// For handling listbox-, in this case, channel list events.
+// The event equals to selecting a channel item from the list.
+// ----------------------------------------------------
+//
+void CFMRadioScanLocalStationsContainer::HandleListBoxEventL( CEikListBox* /*aListBox*/,
+                                                              TListBoxEvent aEventType )
+    {
+    // Check the event generated by keypress and report the event,
+    // Also check for Pen Enabled touch screen event
+    switch ( aEventType )
+        {
+        case EEventEnterKeyPressed:
+        case EEventItemSingleClicked: // new event for item activation
+            {
+            ReportEventL( MCoeControlObserver::EEventStateChanged );
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CFMRadioScanLocalStationsContainer::HandleResourceChange
+// -----------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsContainer::HandleResourceChange( TInt aType )
+    {
+    CCoeControl::HandleResourceChange( aType );
+    if ( aType ==  KEikDynamicLayoutVariantSwitch  )
+        {
+        SizeChanged();
+        }
+    else if ( aType == KAknsMessageSkinChange )
+        {
+        CArrayPtr<CGulIcon>* iconArray = iChannelList->ItemDrawer()->ColumnData()->IconArray();
+        // update icons with new skin
+        iconArray->ResetAndDestroy();
+        TRAP_IGNORE( CreateListIconsL( *iconArray ) )
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioScanLocalStationsContainer::SizeChanged
+// Called by framework when the view size is changed
+// ---------------------------------------------------------
+//
+void CFMRadioScanLocalStationsContainer::SizeChanged()
+    {
+    iChannelList->SetRect( Rect() );
+    }
+
+// ---------------------------------------------------------
+// CFMRadioScanLocalStationsContainer::CountComponentControls
+// Return the number of controls in the window owned by this container
+// ---------------------------------------------------------
+//
+TInt CFMRadioScanLocalStationsContainer::CountComponentControls() const
+    {
+    return 1;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioScanLocalStationsContainer::ComponentControl
+// Return the control corresponding to the specified index
+// ---------------------------------------------------------
+//
+CCoeControl* CFMRadioScanLocalStationsContainer::ComponentControl( TInt aIndex ) const
+    {
+    CCoeControl* control = NULL;
+    
+    switch ( aIndex )
+        {
+        case 0:
+            {
+            control = iChannelList;
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    
+    return control;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioScanLocalStationsContainer::OfferKeyEventL
+// Allow the channel list to process key events
+// ---------------------------------------------------------
+//
+TKeyResponse CFMRadioScanLocalStationsContainer::OfferKeyEventL( const TKeyEvent& aKeyEvent,
+														   		 TEventCode aType )
+	{
+	TKeyResponse response = EKeyWasNotConsumed;
+    
+    switch ( aKeyEvent.iCode )
+        {
+        case EKeyLeftArrow:
+        case EKeyRightArrow:
+            return EKeyWasNotConsumed;
+
+        case EKeyUpArrow:
+        case EKeyDownArrow:
+            response = iChannelList->OfferKeyEventL( aKeyEvent, aType );
+            if (response == EKeyWasConsumed)
+                {
+                ReportEventL( MCoeControlObserver::EEventRequestFocus );
+                }
+            return response;
+
+
+        default:
+			switch ( aKeyEvent.iScanCode ) //we need to use the scan code, because we need to process the event wrt the keyUp and keyDown action
+				{
+                case EKeyboardKey1: // Timed key
+                case EKeyboardKey2: // Normal keys
+                case EKeyboardKey3:
+                case EKeyboardKey4:
+                case EKeyboardKey5:
+                case EKeyboardKey6:
+                case EKeyboardKey7:
+                case EKeyboardKey8:
+                case EKeyboardKey9:
+                case EKeyboardKey0:
+                   return EKeyWasNotConsumed;
+                default:
+                    break;
+                }
+            break;
+        }
+    return iChannelList->OfferKeyEventL( aKeyEvent, aType );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsContainer::GetHelpContext
+// Gets Help
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsContainer::GetHelpContext( TCoeHelpContext& aContext ) const
+    {
+#if defined __SERIES60_HELP || defined FF_S60_HELPS_IN_USE
+    aContext.iMajor = TUid::Uid( KUidFMRadioApplication );
+    aContext.iContext = KFMRADIO_HLP_SEARCH;
+#endif
+    }
+
+// ---------------------------------------------------------
+// CFMRadioScanLocalStationsContainer::FocusChanged(TDrawNow aDrawNow)
+// ---------------------------------------------------------
+//
+void CFMRadioScanLocalStationsContainer::FocusChanged( TDrawNow aDrawNow )
+    {
+    CCoeControl::FocusChanged( aDrawNow );
+    if ( iChannelList )
+        {
+        iChannelList->SetFocus( IsFocused(), aDrawNow );
+        }
+    }
+	
+// --------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsContainer::ResetChannelListL
+// Sets toolbar visibility
+// --------------------------------------------------------------------------------
+//	
+void CFMRadioScanLocalStationsContainer::ResetChannelListL()
+	{
+	iChannelItemArray->Reset();
+	iChannelList->ScrollBarFrame()->SetScrollBarVisibilityL( CEikScrollBarFrame::EOff, CEikScrollBarFrame::EOff );
+	iChannelList->HandleItemRemovalL();
+	iChannelList->DrawDeferred();		
+	}	
+
+// ---------------------------------------------------------
+// CFMRadioScanLocalStationsContainer::SetStationListEmptyTextL
+// ---------------------------------------------------------
+//
+void CFMRadioScanLocalStationsContainer::SetStationListEmptyTextL( const TDesC& aText )
+	{
+   	iChannelList->View()->SetListEmptyTextL( aText );
+	}
+	
+// ---------------------------------------------------------
+// CFMRadioScanLocalStationsContainer::HandlePointerEventL
+// ---------------------------------------------------------
+//
+void CFMRadioScanLocalStationsContainer::HandlePointerEventL( const TPointerEvent& aPointerEvent )
+    {
+    // don't handle any pointer events if view is faded
+    if ( !iFadeStatus )
+        {
+        CCoeControl::HandlePointerEventL( aPointerEvent );
+        }
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradioscanlocalstationsview.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,1710 @@
+/*
+* 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:  Implementation of the class CFMRadioScanLocalStationsView
+*
+*/
+
+
+// INCLUDE FILES
+#include <AknWaitDialog.h> 
+#include <featmgr.h>
+#include <aknViewAppUi.h>
+#include <aknnotedialog.h>
+#include <akntitle.h>
+#include <aknnotewrappers.h> // for basic note
+#include <aknbutton.h>
+#include <avkon.hrh>
+#include <avkon.rsg>
+#include <StringLoader.h>
+#include <eikmenup.h>
+#include <eikbtgpc.h>
+#include <fmradio.rsg>
+#include <fmradio.mbg>
+#include <fmradiouids.h>
+#include <data_caging_path_literals.hrh>
+#include <akntoolbar.h>
+
+#include "fmradiobacksteppingservicewrapper.h"
+#include "fmradioengine.h"
+#include "fmradiordsreceiverbase.h"
+#include "fmradio.hrh"
+#include "fmradioscanlocalstationsview.h"
+#include "fmradiopreset.h"
+#include "fmradioscanlocalstationscontainer.h"
+#include "debug.h"
+#include "fmradioappui.h"
+
+
+const TInt KMSKControlID(3);
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::NewL
+// Two-phase constructor of CFMRadioScanLocalStationsView
+// ---------------------------------------------------------------------------
+//
+CFMRadioScanLocalStationsView* CFMRadioScanLocalStationsView::NewL( CRadioEngine& aRadioEngine,
+		MChannelListHandler& aObserver )
+    {
+    CFMRadioScanLocalStationsView* self = new (ELeave) CFMRadioScanLocalStationsView( aRadioEngine, 
+    		aObserver );
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self; 
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::CFMRadioScanLocalStationsView
+// Parameter constructor ( default constructor )
+// ---------------------------------------------------------------------------
+//
+CFMRadioScanLocalStationsView::CFMRadioScanLocalStationsView( CRadioEngine& aRadioEngine,
+    MChannelListHandler& aObserver ):
+    iNowPlayingIndex( KErrNotFound ),
+    iScanAndSaveActivated( EFalse ),
+    iScanCancelled( EFalse ),
+    iRadioEngine( aRadioEngine ),
+    iTuneRequested( EFalse ),
+    iObserver( aObserver ),
+    iCancelType( EFMRadioCancelScanDefault )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::ConstructL
+// EPOC two-phased constructor
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::ConstructL()
+    {
+    BaseConstructL( R_FMRADIO_SEARCH_STATIONS_VIEW );
+    PrepareToolbar();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::~CFMRadioScanLocalStationsView
+// Class destructor
+// ---------------------------------------------------------------------------
+//
+CFMRadioScanLocalStationsView::~CFMRadioScanLocalStationsView()
+    {
+    if ( iContainer )
+        {
+        AppUi()->RemoveFromViewStack( *this, iContainer );
+        delete iContainer;
+    	iContainer = NULL;
+        }
+    
+    if ( iScanningNote )
+    	{
+    	TRAP_IGNORE( iScanningNote->ProcessFinishedL() );
+    	iScanningNote = NULL;
+    	}
+    iScannedChannels.ResetAndDestroy();
+    iScannedChannels.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::Id
+// Return the unique identifier corresponding to this view
+// ---------------------------------------------------------------------------
+//
+TUid CFMRadioScanLocalStationsView::Id() const
+    {
+    return KFMRadioScanLocalStationsViewId;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::DoActivateL
+// Activate the channel list view
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::DoActivateL( const TVwsViewId& /*aPrevViewId*/,
+												 TUid /*aCustomMessageId*/,
+												 const TDesC8& /*aCustomMessage*/ )
+    {
+    FTRACE( FPrint( _L("CFMRadioScanLocalStationsView::DoActivateL  Start") ) );
+    Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_EMPTY ); 
+    Cba()->DrawDeferred(); // Redraw softkeys
+    
+
+    HBufC* title = StringLoader::LoadLC( R_FMRADIO_SEARCH_STATIONS_VIEW_TITLE, iCoeEnv );
+    static_cast<CAknTitlePane*>( StatusPane()->ControlL( 
+        TUid::Uid( EEikStatusPaneUidTitle ) ) )->SetTextL( *title );
+    CleanupStack::PopAndDestroy( title );
+
+    if ( !iContainer )
+        {
+        FTRACE( FPrint( _L("CFMRadioScanLocalStationsView::DoActivateL  inside second, not iContainer if") ) );
+        iContainer = CFMRadioScanLocalStationsContainer::NewL( ClientRect(), iRadioEngine );
+        iContainer->SetMopParent( this );
+        iContainer->SetObserver( this );
+        AppUi()->AddToStackL( *this, iContainer );
+        }
+    AppUi()->HandleCommandL( EFMRadioCmdScanLocalStationsViewActive );
+
+    ResetListAndStartScanL();
+    iRadioEngine.RdsReceiver().AddObserver( this );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::HandleCommandL
+// Interprets view's menu,softkey and other commands and acts
+// accordingly by calling the appropriate command handler
+// function for further action.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::HandleCommandL( TInt aCommand )
+    {
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( AppUi() );
+    switch ( aCommand )
+        {
+        case EAknSoftkeyBack: // go back to the main view
+            {
+            appUi->ActivateLocalViewL( KFMRadioChannelListViewId );
+            break;
+            }
+        case EEikBidCancel:
+            {
+            if ( iFaded )
+                {
+                appUi->HandleCommandL( aCommand );
+                }
+            else
+                {
+                appUi->ActivateLocalViewL( KFMRadioChannelListViewId );
+                }
+            break;
+            }
+        case EFMRadioCmdSaveChannel:
+            {
+            HandleOneChannelSaveL();
+            break;      	        
+        	}        	
+        case EFMRadioCmdSaveAllChannels:
+            SaveAllChannelsL();
+            break;
+        case EFMRadioCmdScanLocalStationsScan: // start station scanning
+            {
+            Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_EMPTY ); 
+            Cba()->DrawDeferred(); // Redraw softkeys
+            //reset all counters, make station list empty
+            ResetListAndStartScanL();
+        	break;
+        	}
+        	
+        case EFMRadioCmdListenCh:
+        	{
+        	PlayCurrentlySelectedChannelL();
+        	SetContextMenu( R_FMRADIO_SCAN_STATIONS_CTX_MENUBAR_SAVE );
+        	break;
+        	}
+        default: // Send all other commands to AppUi
+            appUi->HandleCommandL( aCommand );
+            break;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::SetLastListenedChannel
+// Keep track of the last selected channel
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::SetLastListenedChannel( TInt aIndex )
+    {
+    iChIndex = aIndex;
+    if ( iContainer )
+        {
+        iContainer->UpdateLastListenedChannel( aIndex ); // Update index
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::SetNowPlayingChannelL
+// Keep track of the current selected channel
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::SetNowPlayingChannelL( TInt aChannelIndex )
+    {
+    TInt oldIndex = iNowPlayingIndex;
+    iNowPlayingIndex = aChannelIndex;
+    
+    if ( iContainer && ( aChannelIndex != oldIndex ) )
+        {
+        if ( ChannelInUse( oldIndex ) &&
+                !iScannedChannels[ oldIndex ]->PresetNameValid() )
+            {
+            // Remove dynamic ps name
+            iContainer->UpdateChannelListContentL( oldIndex,
+                    KNullDesC,
+                    iScannedChannels[ oldIndex ]->PresetFrequency(),
+                    EFalse,
+                    EFalse );
+            }
+        iContainer->UpdateNowPlayingIconL( iNowPlayingIndex, oldIndex );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::CurrentlyPlayingChannel
+// Returns the index of the playing channel item from the channel list.
+// ---------------------------------------------------------------------------
+//
+TInt CFMRadioScanLocalStationsView::CurrentlyPlayingChannel()
+	{
+	return iNowPlayingIndex;
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::ChannelInPlay
+// Return true/false to indicate whether the channel specified
+// is in play
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioScanLocalStationsView::ChannelInPlay( TInt aChannelIndex ) const
+    {
+    if( aChannelIndex == iNowPlayingIndex )
+    	{
+    	return ETrue;
+    	}
+    else 
+    	{
+    	return EFalse;
+    	}
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::ChannelInUse
+// Return true/false to indicate whether the channel specified
+// is in use
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioScanLocalStationsView::ChannelInUse( const TInt aChannelIndex ) const
+    {
+    TBool ret = EFalse;
+    FTRACE( FPrint( _L("CFMRadioScanLocalStationsView::ChannelInUse  Start") ) );
+
+    if ( aChannelIndex >= KMinNumberOfChannelListItems &&
+            aChannelIndex < iScannedChannels.Count() )
+        {
+        ret = ETrue;
+        }
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::FadeAndShowExit
+// Fade the view and all controls associated with it. Change
+// the soft keys so that "Exit" is displayed
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::FadeAndShowExit( TBool aFaded )
+    {
+    TInt err = KErrNone;
+    iFaded = aFaded;
+    SetToolbarDimmedState( aFaded ); 
+    if ( iContainer )
+        {
+        if ( aFaded ) // Fade
+            {
+            // In case options menu is open when headset is disconnected
+            StopDisplayingMenuBar();
+            iContainer->SetFaded( aFaded );
+            TRAP( err,Cba()->SetCommandSetL( R_FMRADIO_SOFTKEYS_EXIT ) );
+            }
+        else
+            {
+            iContainer->SetFaded( aFaded );
+            TRAP( err,Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_BACK ) );
+            // Update index to be sure it is up-to-date (in case if list was scrolled in idle state)
+            iContainer->UpdateLastListenedChannel( iChIndex );
+            
+            if( iScannedChannels.Count() > 0 )
+                {
+                TRAP_IGNORE( SetMiddleSoftKeyIconL(); )
+                
+                if ( ( CurrentlyPlayingChannel() == CurrentlySelectedChannel() ) )
+                    {
+                    SetContextMenu( R_FMRADIO_SCAN_STATIONS_CTX_MENUBAR_SAVE );
+                    }
+                else
+                    {
+                    SetContextMenu( R_FMRADIO_SCAN_STATIONS_CTX_MENUBAR );
+                    }
+                }
+            }
+        Cba()->DrawDeferred();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::UpdateDisplayForFocusGained
+// Update the view after a focus gained event.
+// 1. Fade/Unfade view
+// 2. Update MSK label
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::UpdateDisplayForFocusGained()
+    {
+    FadeAndShowExit( iFaded );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::UpdateChannelListContentL
+// Make a request to the channel container to update the
+// content of the channel at aIndex with the values specified
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::UpdateChannelListContentL( TInt aIndex,
+															   TInt aChannelFrequency )
+    {
+    TBool nowPlaying = EFalse;	
+    if( ChannelInPlay( aIndex ) )
+	    {
+	    nowPlaying = ETrue;	
+	    }
+	else 
+		{
+		 nowPlaying = EFalse;	
+		}
+    if ( iContainer )
+        {
+        iContainer->UpdateChannelListContentL( aIndex, KNullDesC, aChannelFrequency, nowPlaying );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::CurrentlySelectedChannel
+// Returns the index of the selected channel item from the
+// channel list. If the container is active get the info from
+// it, because it may have more up-to-date info.
+// ---------------------------------------------------------------------------
+//
+TInt CFMRadioScanLocalStationsView::CurrentlySelectedChannel()
+    {
+    if ( iContainer )
+        {
+        iChIndex = iContainer->CurrentlySelectedChannel();
+        }
+    return iChIndex;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::NextChannel
+// Retrieve the index of the next channel that has been set.
+// ---------------------------------------------------------------------------
+//
+TInt CFMRadioScanLocalStationsView::NextChannel()
+    {
+    if ( iContainer )
+        {
+        iChIndex = iContainer->CurrentlySelectedChannel();
+        }
+    else
+        {
+        iChIndex = iRadioEngine.GetPresetIndex();
+        }
+
+    TInt nextChannel = iChIndex;
+    for ( TInt i = iChIndex + 1; i < KMaxNumberOfChannelListItems; i++ )
+        {
+        if ( ChannelInUse( i ) )
+            {
+            nextChannel = i;
+            break;
+            }
+        }
+    if ( nextChannel == iChIndex )
+        {
+        for ( TInt i = 0; i < iChIndex; i++ )
+            {
+            if ( ChannelInUse( i ) )
+                {
+                nextChannel = i;
+                break;
+                }
+            }
+        }
+    return nextChannel;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::PreviousChannel
+// Retrieve the index of the previous channel that has been set.
+// ---------------------------------------------------------------------------
+//
+TInt CFMRadioScanLocalStationsView::PreviousChannel()
+    {
+    if ( iContainer )
+        {
+        iChIndex = iContainer->CurrentlySelectedChannel();
+        }
+    else
+        {
+        iChIndex = iRadioEngine.GetPresetIndex();
+        }
+
+    TInt previousChannel = iChIndex;
+    
+    for ( TInt i = iChIndex - 1; i >= 0; i-- )
+        {
+        if ( ChannelInUse( i ) )
+            {
+            previousChannel = i;
+            break;
+            }
+        }
+    if ( previousChannel == iChIndex )
+        {
+        for ( TInt i = KMaxNumberOfChannelListItems - 1; i > iChIndex; i-- )
+            {
+            if ( ChannelInUse( i ) )
+                {
+                previousChannel = i;
+                break;
+                }
+            }
+        }
+    return previousChannel;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::HandleControlEventL
+// Handles control event observing. In this case the interest
+// is only on the channel selection from the channel list.
+// Other events are not reported by the container,
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::HandleControlEventL( CCoeControl* aControl,
+                                                         TCoeEvent aEventType )
+    {
+    if ( aControl == iContainer )
+        {
+        if ( aEventType == MCoeControlObserver::EEventRequestFocus )
+            {
+            // Don't display MSK when display is faded.
+            if ( !iFaded && !AknLayoutUtils::PenEnabled() )
+                {
+                // event sent if up or down arrow keys are pressed
+           	    if ( ( CurrentlyPlayingChannel() == CurrentlySelectedChannel() ) )
+                    {
+                    SetContextMenu( R_FMRADIO_SCAN_STATIONS_CTX_MENUBAR_SAVE );
+                    }
+                else
+                    {
+                	SetContextMenu( R_FMRADIO_SCAN_STATIONS_CTX_MENUBAR );
+                    }
+                }
+            else if ( ChannelInUse( CurrentlySelectedChannel() ) )
+                {
+                PlayCurrentlySelectedChannelL();
+                }
+            }
+        else if ( aEventType == MCoeControlObserver::EEventStateChanged
+                && ChannelInUse( CurrentlySelectedChannel() ) )
+            {
+            PlayCurrentlySelectedChannelL();
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::DoDeactivate
+// Deactivate the channel list view
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::DoDeactivate()
+    {
+    FTRACE( FPrint( _L("CFMRadioScanLocalStationsView::DoDeactivate") ) );
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( AppUi() );
+    
+    if ( iToolbar )
+        {
+        // hide toolbar so it is not visible when activating view again
+        iToolbar->SetToolbarVisibility( EFalse );
+        }
+
+    if ( appUi->RadioEngine() )
+    	{
+        iRadioEngine.RdsReceiver().RemoveObserver( this );
+    	}
+    if ( iContainer )
+        {
+        appUi->RemoveFromViewStack( *this, iContainer );
+        }
+
+    iScanAndSaveActivated = EFalse;
+    
+    // If exiting, iRadioEngine is no longer valid object
+    if( appUi->RadioEngine() )
+        {
+        appUi->RadioEngine()->CancelScanLocalStationsScan();
+        // Stop seek doesn't get called automatically as this is not active view anymore
+        TRAP_IGNORE( StopSeekL() )
+        }
+    
+    delete iContainer;
+    iContainer = NULL;
+	// release allocated memory for scanned stations
+    iScannedChannels.ResetAndDestroy();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::DynInitMenuPaneL
+// Sets the state of menu items dynamically according to the
+// state of application data.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::DynInitMenuPaneL( TInt aResourceId,
+                                                      CEikMenuPane* aMenuPane )
+    {
+    if ( aResourceId == R_FMRADIO_SEARCH_STATIONS_OPTIONS_MENU ) // Main menu
+        {
+        if ( iRadioEngine.IsAudioRoutingPossible() )
+            {
+            if ( iRadioEngine.GetAudioOutput() == CRadioEngine::EFMRadioOutputIHF )
+                {
+                // Delete existing menu option and add a new one
+                aMenuPane->DeleteMenuItem( EFMRadioCmdActivateIhf );
+                if ( iRadioEngine.IsHeadsetConnected() )
+                    {
+                    aMenuPane->SetItemTextL( EFMRadioCmdDeactivateIhf, R_QTN_FMRADIO_OPTIONS_DEACTIVATE );
+                    }
+                }
+            else
+                {
+                // Delete existing menu option and add a new one
+                aMenuPane->DeleteMenuItem( EFMRadioCmdDeactivateIhf );
+                aMenuPane->SetItemTextL( EFMRadioCmdActivateIhf, R_QTN_FMRADIO_OPTIONS_ACTIVATE );
+                }
+            }
+        else
+            {
+            aMenuPane->SetItemDimmed( EFMRadioCmdDeactivateIhf, ETrue );
+            aMenuPane->SetItemDimmed( EFMRadioCmdActivateIhf, ETrue );
+            }
+        
+        TInt scannedChannelCount = iScannedChannels.Count();
+        
+        if ( scannedChannelCount < 2 )
+            {
+            aMenuPane->DeleteMenuItem( EFMRadioCmdSaveAllChannels );
+            }
+
+        if ( scannedChannelCount < 1)
+            {
+            aMenuPane->SetItemDimmed( EFMRadioCmdSaveChannel, ETrue );
+            }
+        
+        // if help is not enabled, disable help option
+        if ( !FeatureManager::FeatureSupported( KFeatureIdHelp ) )
+            {
+            aMenuPane->SetItemDimmed( EAknCmdHelp, ETrue );
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::LayoutChangedL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::LayoutChangedL( TInt aType )
+    {
+    if( iContainer )
+        {
+        iContainer->SetRect( ClientRect() );
+        iContainer->HandleResourceChange( aType );
+        }
+    }
+
+// ---------------------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::SetMiddleSoftKeyLabelL
+// Sets middle softkey label.
+// ---------------------------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::SetMiddleSoftKeyLabelL( const TInt aResourceId,
+                                                      const TInt aCommandId )
+    {
+    if ( !AknLayoutUtils::PenEnabled() )
+        {
+        CEikButtonGroupContainer* cbaGroup = Cba();
+        if ( cbaGroup )
+            {
+            cbaGroup->RemoveCommandFromStack( KMSKControlID, iCurrentMSKCommandId );
+            HBufC* middleSKText = StringLoader::LoadLC( aResourceId, iCoeEnv );
+            TPtr mskPtr = middleSKText->Des();
+            cbaGroup->AddCommandToStackL(
+                KMSKControlID,
+                aCommandId,
+                mskPtr );
+            CleanupStack::PopAndDestroy( middleSKText );
+            iCurrentMSKCommandId = aCommandId;
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::SetMiddleSoftKeyIconL
+// Sets middle softkey icon.
+// ---------------------------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::SetMiddleSoftKeyIconL()
+    {
+    if ( !AknLayoutUtils::PenEnabled() )
+        {
+        CEikButtonGroupContainer* cbaGroup = Cba();
+        CFbsBitmap* bitmap = NULL;
+        CFbsBitmap* mask = NULL;
+        if ( cbaGroup )
+            {
+            TFileName mbmFileName;
+            TFindFile finder( iCoeEnv->FsSession() );
+            TInt err = finder.FindByDir( KFMRadioBmpFile, KDC_APP_BITMAP_DIR );
+            if ( err == KErrNone )
+                {
+                mbmFileName.Copy( finder.File() );
+                }
+
+            AknsUtils::CreateColorIconL(
+                AknsUtils::SkinInstance(),
+                KAknsIIDQgnPropMskMenu,
+                KAknsIIDQsnComponentColors,
+                EAknsCIQsnComponentColorsCG13,
+                bitmap,
+                mask,
+                mbmFileName,
+                EMbmFmradioQgn_prop_msk_menu,
+                EMbmFmradioQgn_prop_msk_menu_mask,
+                KRgbBlack );
+
+            CleanupStack::PushL( bitmap );
+            CleanupStack::PushL( mask );
+
+            cbaGroup->RemoveCommandFromStack( KMSKControlID, iCurrentMSKCommandId );
+            cbaGroup->AddCommandToStackL(
+                KMSKControlID,
+                EAknSoftkeyContextOptions,
+                *bitmap,
+                *mask );
+
+            iCurrentMSKCommandId = EAknSoftkeyContextOptions;
+
+            CleanupStack::PopAndDestroy( 2, bitmap );
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::SaveAllChannelsL
+// Saves all the scanned channels into Radio Engine's presets.
+// -----------------------------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::SaveAllChannelsL()
+    {
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+    
+    if ( appUi->NumberOfChannelsStored() > 0 )
+        {
+        //We have some tuned channels,
+        //so we have to check does the user want to
+        //add new channes or replace the old ones.
+        TInt numberOfEmptySlots = KMaxNumberOfChannelListItems - appUi->NumberOfChannelsStored();
+        if( numberOfEmptySlots >= iScannedChannels.Count() )
+            {
+            //more vacant than new channels
+            //we can add or replace
+            TInt index(0);
+            CAknListQueryDialog* query = new (ELeave) CAknListQueryDialog( &index );
+            query->PrepareLC( R_FMRADIO_LISTQUERY_SAVE_ALL_REPLACE_APPEND );
+            if( query->RunLD() )
+                {
+                const TInt KIndexOfSaveAllReplaceExistingCmd = 0;
+                const TInt KIndexOfSaveAllAppendCmd = 1;
+                if( index == KIndexOfSaveAllReplaceExistingCmd )
+                    {
+                    SaveFoundChannelsToPresetsL( EReplace );
+                    }
+                else if( index == KIndexOfSaveAllAppendCmd )
+                    {
+                    SaveFoundChannelsToPresetsL( EAppend );
+                    }
+                }
+            else
+                {
+                ShowToolbar( ETrue );
+                }
+            }
+        else
+            {
+            //no room for all the channels
+            if( numberOfEmptySlots == 0 )
+                {
+                CAknQueryDialog* query = CAknQueryDialog::NewL();
+                if ( query->ExecuteLD( R_FMRADIO_REPLACE_EXISTING_CHANNELS_QUERY ) )
+                    {
+                    SaveFoundChannelsToPresetsL( EReplace );
+                    }
+                else
+                    {
+                    ShowToolbar( ETrue );
+                    }
+                }
+            else
+                {
+                TInt index(0);
+                CAknListQueryDialog* query = new (ELeave) CAknListQueryDialog( &index );
+                query->PrepareLC( R_FMRADIO_LISTQUERY_SAVE_ALL_REPLACE_APPEND_LIST_ALMOST_FULL );
+                if( query->RunLD() )
+                    {
+                    const TInt KIndexOfSaveAllAppendCmd = 0;
+                    const TInt KIndexOfSaveAllReplaceExistingCmd = 1;
+                    if( index == KIndexOfSaveAllReplaceExistingCmd )
+                        {
+                        SaveFoundChannelsToPresetsL( EReplace );
+                        }
+                    else if( index == KIndexOfSaveAllAppendCmd )
+                        {
+                        SaveFoundChannelsToPresetsL( EAppend );
+                        }
+                    }
+                else
+                    {
+                    ShowToolbar( ETrue );
+                    }   
+                }
+            }
+        }
+    else
+        {
+        //No previous channels
+        SaveFoundChannelsToPresetsL( EReplace );
+        }
+    }
+
+// -----------------------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::ShowConfirmationQueryL
+// Get confirmation from user.
+// -----------------------------------------------------------------------------------------------
+//
+TInt CFMRadioScanLocalStationsView::ShowConfirmationQueryL(TInt aResText, TInt aResQuery) 
+	{
+	TInt accepted = EFalse;
+    HBufC* prompt = StringLoader::LoadLC( aResText, iEikonEnv );
+    CAknQueryDialog* queryDlg = CAknQueryDialog::NewL();
+    accepted = queryDlg->ExecuteLD( aResQuery, *prompt );
+    CleanupStack::PopAndDestroy( prompt );
+    return accepted;
+    }
+
+// -----------------------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::StopSeekL
+// Invoked by AppUi when a seek is completed or aborted.
+// -----------------------------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::StopSeekL()
+    {
+    FTRACE( FPrint( _L("CFMRadioScanLocalStationsView::StopSeekL") ) );
+
+    if ( iTuneRequested )
+        {
+        iTuneRequested = EFalse;
+
+        // if tune request comes from scan all (= ResetListAndStartScanL )
+        // then start the whole scan
+        if ( iScanAndSaveActivated )
+            {
+            AppUi()->HandleCommandL( EFMRadioCmdScanLocalStationsScan );
+            }
+        else
+            {
+            iRadioEngine.SetMuteOn( EFalse );
+            }
+        }
+    else if ( iScanAndSaveActivated )
+        {
+        // No channels found or user has canceled search before any channels are found
+        if ( iRadioEngine.GetTunedFrequency() == iLowerFrequencyBound &&
+                iScannedChannels.Count() == 0 )
+            {
+            CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+
+            if ( appUi->IsStartupWizardRunning() )
+                {                
+                //no stations are found in Wizard
+                if (iCancelType == EFMRadioCancelScanDefault)
+                    {
+                    HBufC* string = NULL; 
+                    string = StringLoader::LoadLC( R_QTN_FMRADIO_NO_STATIONS_FOUND, iEikonEnv );
+                    CAknInformationNote* note = new ( ELeave ) CAknInformationNote( ETrue ); // waiting
+                    note->ExecuteLD( *string );
+                    CleanupStack::PopAndDestroy( string );
+                    }
+
+                iScanAndSaveActivated = EFalse;
+
+                RemoveScanningInProgressNoteL();
+                RestoreRadio();
+                appUi->AutoTuneInMainView(ETrue);
+                
+                ActivateMainViewL();
+                }
+            else
+                {
+                if( iContainer )
+                    {
+                    HBufC* listEmptyText = NULL; 
+                    listEmptyText = StringLoader::LoadLC( R_QTN_FMRADIO_LIST_NO_STATIONS_FOUND, iEikonEnv );
+                    iContainer->SetStationListEmptyTextL( *listEmptyText );
+                    CleanupStack::PopAndDestroy( listEmptyText );
+                    
+                    iContainer->ResetChannelListL();
+                    }
+
+                iScanAndSaveActivated = EFalse;
+                Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_BACK ); 
+                Cba()->DrawDeferred(); // Redraw softkeys
+                RemoveScanningInProgressNoteL();
+
+                UpdateToolbar();
+                ShowToolbar( ETrue );
+                RestoreRadio();
+                }
+            }
+        else
+            {
+            AddTunedFrequencyToListL();
+            }
+        }
+    else
+        {
+        RemoveScanningInProgressNoteL();
+        TBool restoreFrequency = EFalse;
+        TInt tunedFrequency = iRadioEngine.GetTunedFrequency();
+        
+        if ( tunedFrequency == iLowerFrequencyBound &&
+                iScannedChannels.Count() == 0 )
+            {
+            restoreFrequency = ETrue;
+            }
+        UpdateToolbar();
+        RestoreRadio( restoreFrequency );
+        
+        // update now playing index if the tuning is triggered from accessory 
+        TInt frequencyIndex = FrequencyIndex( tunedFrequency );
+        
+        if ( frequencyIndex != KErrNotFound )
+            {
+            SetNowPlayingChannelL( frequencyIndex );
+            SetLastListenedChannel( frequencyIndex );
+            }
+        else // frequency is not in the list, remove now playing channel status
+            {
+            SetNowPlayingChannelL( KErrNotFound );
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::RestoreRadio
+// Restores the radio after scanning
+// -----------------------------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::RestoreRadio( TBool aTuneInitialFrequency )
+    {
+    FTRACE( FPrint( _L("CFMRadioScanLocalStationsView::RestoreRadio") ) );
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+    // if iInitialTunedFrequency is 0, radio has already been restored
+    if ( iInitialTunedFrequency )
+        {
+        if ( aTuneInitialFrequency )
+            {
+            iTuneRequested = ETrue;
+            iRadioEngine.Tune( iInitialTunedFrequency );
+            }
+        iInitialTunedFrequency = 0;
+        }
+    appUi->SetStartupWizardRunning( EFalse );
+    }
+
+// -----------------------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::AddTunedFrequencyToListL
+// Updates found channels to the list.
+// -----------------------------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::AddTunedFrequencyToListL()
+    {
+    FTRACE( FPrint( _L("CFMRadioScanLocalStationsView::AddTunedFrequencyToListL") ) );
+    TInt tunedFrequency = iRadioEngine.GetTunedFrequency();
+    
+    if ( KErrNotFound == FrequencyIndex( tunedFrequency ) )
+        {
+        // the frequency is new and may be added
+        CFMRadioPreset* channel = CFMRadioPreset::NewL();
+        CleanupStack::PushL( channel );
+        channel->SetPresetFrequency( tunedFrequency );
+        // Make the name invalid by default so that possibly dynamic PS name won't get saved
+        channel->SetPresetNameValid( EFalse );
+        
+        TInt freqIndex = SortedFrequencyListIndex( tunedFrequency );
+        
+        if ( freqIndex < ( iScannedChannels.Count() - 1 ) )
+            {
+            iScannedChannels.InsertL( channel, freqIndex );
+            }
+        else
+            {
+            iScannedChannels.AppendL( channel );
+            }
+        CleanupStack::Pop( channel );
+        
+        // update a radiostation slot in the list
+        // check if there is place
+        if ( iContainer )
+            {
+            iContainer->InsertScannedChannelToListL( freqIndex, tunedFrequency );
+            iContainer->DrawDeferred();
+            }
+        // scan for another frequency
+        AppUi()->HandleCommandL( EFMRadioCmdScanLocalStationsScan );
+        }
+    else
+        {
+        //stop scanning
+        iScanAndSaveActivated = EFalse;
+        Cba()->SetCommandSetL( R_AVKON_SOFTKEYS_OPTIONS_BACK ); 
+        Cba()->DrawDeferred(); // Redraw softkeys
+
+        RemoveScanningInProgressNoteL();
+        SetMiddleSoftKeyIconL();
+        SetContextMenu( R_FMRADIO_SCAN_STATIONS_CTX_MENUBAR_SAVE );
+
+        if ( iContainer )
+            {
+            iContainer->UpdateLastListenedChannel( 0 ); // select the first channel
+            PlayCurrentlySelectedChannelL();
+            iContainer->DrawDeferred();
+            }
+        
+        CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+
+        if ( appUi->IsStartupWizardRunning() )
+            {
+            appUi->SetStartupWizardRunning( EFalse );
+
+            if ( iScanCancelled )
+                {
+                iScanCancelled = EFalse;
+                ActivateMainViewL();
+                }
+            else
+                {
+                SaveAllChannelsL();
+                }
+            }
+        else
+            {
+            UpdateToolbar();
+            ShowToolbar( ETrue );
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::ResetCountersL
+// Called when a new scan is activated.
+// -----------------------------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::ResetListAndStartScanL()
+    {
+    User::LeaveIfNull( iContainer );
+    iNowPlayingIndex = KErrNotFound;
+    ShowToolbar( EFalse );
+    iContainer->SetStationListEmptyTextL( KNullDesC );
+    iScanAndSaveActivated = ETrue;	
+    DisplayScanningInProgressNoteL();
+
+    iInitialTunedFrequency = 0;
+    iScanCancelled = EFalse;
+    iCancelType = EFMRadioCancelScanDefault;
+    iScannedChannels.ResetAndDestroy();
+    iContainer->InitializeChannelListL();
+    
+    //mute radio
+    if ( !iRadioEngine.IsMuteOn() )
+        {
+        iRadioEngine.SetMuteOn( ETrue );
+        }
+
+    //update upper and lower frequency bands
+    iRadioEngine.GetFrequencyBandRange( iLowerFrequencyBound, iUpperFrequencyBound );
+
+    iInitialTunedFrequency = iRadioEngine.GetTunedFrequency();
+
+    if ( iRadioEngine.GetTunedFrequency() != iLowerFrequencyBound )
+        {
+        iTuneRequested = ETrue;
+        iRadioEngine.Tune( iLowerFrequencyBound );
+        }
+    else
+        {
+        AppUi()->HandleCommandL( EFMRadioCmdScanLocalStationsScan );
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioScanLocalStationsContainer::DisplayScanningInProgressNoteL
+// Display a wait note while the channel fill is occuring.
+// ---------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::DisplayScanningInProgressNoteL()
+    {
+    iScanningNote = new ( ELeave ) CAknWaitDialog( reinterpret_cast<CEikDialog**>( &iScanningNote ) );
+    iScanningNote->SetCallback( this );
+    
+    CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+    
+    if ( appUi->IsStartupWizardRunning() )
+        {
+        iScanningNote->PrepareLC( R_FMRADIO_SEARCH_STATIONS_WAIT_CANCEL_NOTE );
+        }
+    else
+        {
+        iScanningNote->PrepareLC( R_FMRADIO_SEARCH_STATIONS_WAIT_NOTE );
+        }
+    
+    iScanningNote->RunLD();
+    }	
+
+// ---------------------------------------------------------
+// CFMRadioScanLocalStationsContainer::RemoveScanningInProgressNoteL
+// Remove and destroy the scanning fill note.
+// ---------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::RemoveScanningInProgressNoteL()
+    {
+    FTRACE(FPrint(_L("CFMRadioScanLocalStationsView::RemoveScanningInProgressNoteL")));
+    if ( iScanningNote )
+        {
+        iScanningNote->ProcessFinishedL(); // Inform seek note to stop and hide it        
+        iScanningNote = NULL;
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioScanLocalStationsContainer::DialogDismissedL
+// Called when user cancels waiting note or process finishes
+// ---------------------------------------------------------
+//	
+void CFMRadioScanLocalStationsView::DialogDismissedL( TInt  aButtonId ) 	
+	{
+	FTRACE(FPrint(_L("CFMRadioScanLocalStationsView::DialogDismissedL")));	
+	iScanningNote = NULL;
+	if ( aButtonId == EAknSoftkeyCancel )
+   		{
+      	// cancel any process in here    	
+   		/*Dialog get this button ID when dismissed, if headset is pulled off
+   		we don't want to change the cancel type*/
+   		if( iCancelType != EFMRadioCancelScanByHeadsetDisconnect)
+   			{
+   	   		SetScanCanceled(EFMRadioCancelScanBySoftkey);
+   			}
+   		iRadioEngine.CancelScanLocalStationsScan(); 
+  		}
+	}
+
+void CFMRadioScanLocalStationsView::SetScanCanceled( TFMRadioCancelScanType aType )
+	{
+	CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+	
+	if ( appUi->IsStartupWizardRunning() )
+	    {
+	    FTRACE(FPrint(_L("CFMRadioScanLocalStationsView::SetScanCanceled")));	
+	    iScanCancelled = ETrue;
+	    iCancelType = aType;
+	    }
+	else
+		{
+		iScanCancelled = EFalse;
+		iCancelType = EFMRadioCancelScanDefault;
+		}
+	}
+
+TFMRadioCancelScanType CFMRadioScanLocalStationsView::CancelType()
+	{
+	return iCancelType;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioScanLocalStationsContainer::SaveFoundChannelsToPresets
+// Save scanned channels to presets 
+// ---------------------------------------------------------
+//	
+void CFMRadioScanLocalStationsView::SaveFoundChannelsToPresetsL( TSavingMode aSavingMode )
+	{
+	FTRACE(FPrint(_L("CFMRadioScanLocalStationsView::SaveFoundChannelsToPresetsL Mode %d"), aSavingMode ) );
+	CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+	
+	//store as much as the list is keeping
+	TInt limit;	
+	TInt chCount = iScannedChannels.Count();
+	
+	if ( chCount >= KMaxNumberOfChannelListItems )
+		{
+		limit = KMaxNumberOfChannelListItems;
+		}
+	else
+		{
+		limit = chCount;
+		}
+	
+	TInt savedChannelCount = 0;	
+	
+    if ( aSavingMode == EAppend ) 
+        {
+        /** Append found channels to preset list */		
+        for ( TInt freqIx = 0; KMaxNumberOfChannelListItems > iObserver.Channels().Count() && 
+            chCount > freqIx; freqIx++ )
+            {
+            const TDesC& name = iScannedChannels[ freqIx ]->PresetNameValid() ? 
+                    iScannedChannels[ freqIx ]->PresetName() : KNullDesC;
+
+		    iObserver.AddChannelToListL( name,
+                                         iScannedChannels[ freqIx ]->PresetFrequency() );
+						
+			savedChannelCount++;
+
+			}
+		
+		iObserver.UpdateChannelsL( EStoreAllToRepository, 0, 0 );
+
+		}
+	else // Replace
+		{
+		iObserver.UpdateChannelsL( ERemoveAllFromRepository, 0, 0  );
+		
+		for ( TInt index = 0; index < limit; index++ )
+			{
+            const TDesC& name = iScannedChannels[ index ]->PresetNameValid() ? 
+                    iScannedChannels[ index ]->PresetName() : KNullDesC;
+			iObserver.AddChannelToListL( name,
+                                         iScannedChannels[ index ]->PresetFrequency() );
+			savedChannelCount++;
+			}
+		iObserver.UpdateChannelsL( EStoreAllToRepository, 0, 0 );
+		}
+	
+    // display note about how many many channels were saved to the preset list
+    HBufC* string = NULL;                    
+    string = StringLoader::LoadLC( R_QTN_FMRADIO_STATIONS_SAVED, savedChannelCount, iEikonEnv );        
+    CAknConfirmationNote* note = new ( ELeave ) CAknConfirmationNote( ETrue ); // waiting
+    note->ExecuteLD( *string );
+    CleanupStack::PopAndDestroy( string );
+    
+    ActivateMainViewL();
+    }
+
+// ---------------------------------------------------------
+// CFMRadioScanLocalStationsView::PlayCurrentlySelectedChannel
+// Play currently selected channel from scan local stations list
+// ---------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::PlayCurrentlySelectedChannelL()
+    {
+    FTRACE(FPrint(_L("CFMRadioScanLocalStationsView::PlayCurrentlySelectedChannelL")));
+    
+    TInt selectedChannel = CurrentlySelectedChannel();    
+    if ( ChannelInUse( selectedChannel ) )
+        {
+        TInt selectedFrequency = iScannedChannels[ selectedChannel ]->PresetFrequency();
+        
+        if ( iRadioEngine.GetTunedFrequency() != selectedFrequency )
+            {
+            CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+            iTuneRequested = ETrue;
+            SetNowPlayingChannelL( selectedChannel );
+            SetLastListenedChannel( selectedChannel );
+            appUi->TuneL( selectedFrequency );
+            }
+        else
+            {
+            SetNowPlayingChannelL( selectedChannel );
+            SetLastListenedChannel( selectedChannel );
+            iRadioEngine.SetMuteOn( EFalse );
+            }
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioScanLocalStationsView::ShowToolbar
+// Sets toolbar visibility.
+// ---------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::ShowToolbar( TBool aVisible )
+	{
+	if ( iToolbar && AknLayoutUtils::PenEnabled() )
+		{						
+		iToolbar->SetToolbarVisibility( aVisible );
+		iToolbar->UpdateBackground();
+		iToolbar->DrawDeferred();			
+		// just to make sure container has the right rect when toolbar is displayed
+		if ( aVisible && iContainer )
+			{
+			iContainer->SetRect( ClientRect() );	
+			}		
+		}
+	}
+		
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::RdsDataProgrammeService
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::RdsDataProgrammeService( const TDesC& aProgramService )
+    {
+    FTRACE(FPrint(_L("CFMRadioScanLocalStationsView::RdsDataProgrammeService")));
+    if ( iContainer && !iTuneRequested && aProgramService.Length() > 0 )
+        {
+        TInt tunedChannel = CurrentlyPlayingChannel();
+        
+        TRAP_IGNORE
+            (
+            if ( ChannelInUse( tunedChannel ) )
+                {
+                iContainer->UpdateChannelListContentL( tunedChannel,
+                        aProgramService,
+                        iScannedChannels[ tunedChannel ]->PresetFrequency(),
+                        ETrue,
+                        ETrue );
+
+                // update PS name also to the list containing the scanned preset values
+                iScannedChannels[ tunedChannel ]->SetPresetNameL( aProgramService );
+                iContainer->DrawDeferred();
+                }
+            )
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::RdsDataPsNameIsStatic
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::RdsDataPsNameIsStatic( TBool aStatic )
+    {
+    TInt tunedChannel = CurrentlyPlayingChannel();
+    if( ChannelInUse( tunedChannel ) )
+        {
+        iScannedChannels[ tunedChannel ]->SetPresetNameValid( aStatic );
+        }
+    }
+
+// ---------------------------------------------------------
+// CFMRadioScanLocalStationsView::RdsDataRadioText
+// ---------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::RdsDataRadioText( const TDesC&/* aRadioText */)
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::RdsAfSearchBegin
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::RdsAfSearchBegin()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::RdsAfSearchEnd
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::RdsAfSearchEnd( TUint32 /*aFrequency*/, TInt /*aError*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::RdsAfSearchStateChange
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::RdsAfSearchStateChange( TBool /*aEnabled*/ )
+    { 
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::RdsAvailable
+// ---------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::RdsAvailable( TBool /*aAvailable*/ )
+    {
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::PrepareToolbar
+// Prepare toolbar for displaying basic radio command buttons
+// --------------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::PrepareToolbar()
+	{
+    if ( AknLayoutUtils::PenEnabled() )
+        {
+        iToolbar = Toolbar();   	
+        iToolbar->SetToolbarVisibility( EFalse );
+        // Set observer
+        iToolbar->SetToolbarObserver( this );
+        }
+    }
+	
+// --------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::OfferToolbarEventL
+// Handle commands from toolbar.
+// --------------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::OfferToolbarEventL( TInt aCommandId )
+    {
+    switch ( aCommandId )
+        {
+        case EFMRadioToolbarButtonCmdSaveAll:
+            {
+            HandleCommandL( EFMRadioCmdSaveAllChannels );
+            break;
+            }
+        case EFMRadioToolbarButtonCmdScan:
+            {
+            HandleCommandL( EFMRadioCmdScanLocalStationsScan );
+            break;
+            }
+        case EFMRadioToolbarButtonCmdToggleIhf:
+            {
+            if ( iRadioEngine.GetAudioOutput() == CRadioEngine::EFMRadioOutputHeadset )
+                {
+                AppUi()->HandleCommandL( EFMRadioCmdActivateIhf );
+                }
+            else
+                {
+                AppUi()->HandleCommandL( EFMRadioCmdDeactivateIhf );
+                }
+            break;
+            }
+        default:
+            {
+            break;
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::SetToolbarDimmedState
+// set toolbar buttons dimmed state
+// --------------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::SetToolbarDimmedState( const TBool aState )
+	{
+    if ( iToolbar && AknLayoutUtils::PenEnabled() )	
+        {
+        iToolbar->SetDimmed( aState );
+        if ( !aState )
+            {
+            UpdateToolbar();
+            }
+        iToolbar->DrawDeferred();
+        }
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::UpdateToolbar
+// Set save buttons dimming state
+// --------------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::UpdateToolbar()
+    {
+    if ( iContainer && iToolbar && AknLayoutUtils::PenEnabled() )
+        {
+        if ( iRadioEngine.IsAudioRoutingPossible() )
+            {
+                if ( iRadioEngine.IsHeadsetConnected() )
+                    {
+                    CAknButton* centerButton = NULL;    
+                    centerButton = static_cast<CAknButton*>( iToolbar->ControlOrNull( EFMRadioToolbarButtonCmdToggleIhf ) );    
+
+                    iToolbar->SetItemDimmed( EFMRadioToolbarButtonCmdToggleIhf, EFalse, ETrue );
+                    
+                    if ( iRadioEngine.GetAudioOutput() == CRadioEngine::EFMRadioOutputIHF )
+                        {
+                        if ( centerButton )
+                            {
+                            centerButton->SetCurrentState( 1, ETrue );
+                            }
+                        }
+                    else
+                        {
+                        if ( centerButton )
+                            {
+                            centerButton->SetCurrentState( 0, ETrue );
+                            }
+                        }
+                    }
+                else
+                    {
+                    iToolbar->SetItemDimmed( EFMRadioToolbarButtonCmdToggleIhf, ETrue, ETrue );
+                    }
+                }
+            else
+                {
+                iToolbar->SetItemDimmed( EFMRadioToolbarButtonCmdToggleIhf, ETrue, ETrue );
+                }
+
+        TInt chCount = iScannedChannels.Count();
+        if ( chCount == 0 )
+            { //dim save buttons
+            iToolbar->SetItemDimmed( EFMRadioToolbarButtonCmdSaveAll, ETrue, ETrue );
+            }
+        else if ( chCount == 1 )
+            { //dim 'save all' button.
+            iToolbar->SetItemDimmed( EFMRadioToolbarButtonCmdSaveAll, ETrue, ETrue );
+            }
+            else
+            { //undim both
+            iToolbar->SetItemDimmed( EFMRadioToolbarButtonCmdSaveAll, EFalse, ETrue );
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::IsFrequencyScanned
+// check if the frequency is already found
+// --------------------------------------------------------------------------------
+//
+TInt CFMRadioScanLocalStationsView::FrequencyIndex( TInt aFrequency )
+    {
+    TInt frequencyIndex = KErrNotFound;
+    TInt chCount = iScannedChannels.Count();
+    
+    for ( TInt i = 0; i < chCount; i++ )
+        {
+        if ( aFrequency == iScannedChannels[ i ]->PresetFrequency() )
+            {
+            frequencyIndex = i;
+            break;
+            }
+        }
+    return frequencyIndex;
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::HandleOneChannelSaveL
+// Handle single channel save
+// --------------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::HandleOneChannelSaveL()
+    {    
+    TInt currentPresetCount = iObserver.Channels().Count();
+    TInt chIndex = iContainer->CurrentlySelectedChannel();
+    TBool continueWithSave = ETrue;
+    
+    if ( !ChannelInUse( chIndex ) )
+        {
+        User::Leave( KErrNotFound );
+        }
+    // check if the channel list is full and show replace query if necessary
+    if ( currentPresetCount == KMaxNumberOfChannelListItems )
+        {
+        CAknQueryDialog* query = CAknQueryDialog::NewL();
+        if ( query->ExecuteLD( R_FMRADIO_REPLACE_EXISTING_CHANNELS_QUERY ) )
+            {
+            iObserver.UpdateChannelsL( ERemoveAllFromRepository, 0, 0  );
+            }
+        else
+            {
+            continueWithSave = EFalse;
+            }
+        }
+    if ( continueWithSave )
+        {
+        const TDesC& name = iScannedChannels[ chIndex ]->PresetNameValid() ? 
+                iScannedChannels[ chIndex ]->PresetName() : KNullDesC;
+        TInt presetFrequency = iScannedChannels[ chIndex ]->PresetFrequency();
+        iObserver.AddChannelToListL( name, 
+                                     presetFrequency );
+        iObserver.UpdateChannelsL( EStoreAllToRepository, 0, 0 );
+
+        TBool updateNowPlayingIcon = EFalse;
+        TInt tunedIndex = CurrentlyPlayingChannel();
+        // update now playing icon and list index
+        if ( chIndex == tunedIndex )
+            {
+            // channel is going be deleted so now playing index is not in the list
+            iNowPlayingIndex = KErrNotFound;
+            }
+        else if ( chIndex < tunedIndex )
+            {
+            iNowPlayingIndex = tunedIndex - 1;
+            iContainer->HideNowPlayingIconL( tunedIndex, ETrue );
+            updateNowPlayingIcon = ETrue;
+            }
+         else
+            {
+            // NOP
+            }
+        
+        // remove also from the UI list
+        iContainer->RemoveChannelListContentL( chIndex );
+        
+        if ( updateNowPlayingIcon )
+            {
+            iContainer->UpdateNowPlayingIconL( tunedIndex - 1 );
+            }
+        // received PS name is shown                                
+        if ( name.Length() > 0 )
+            {
+            HBufC* nameSavedString = StringLoader::LoadLC( R_QTN_FMRADIO_SAVING_DONE_ONE, name, iEikonEnv );
+            CAknConfirmationNote* saveInfoNote = new ( ELeave ) CAknConfirmationNote( ETrue ); // waiting
+            saveInfoNote->ExecuteLD( *nameSavedString );
+            CleanupStack::PopAndDestroy( nameSavedString );  
+            }
+        else // show frequency
+            {
+            TReal frequency = static_cast<TReal>( presetFrequency / static_cast<TReal>( KHzConversionFactor ) );
+            TRealFormat format( KFrequencyMaxLength, iRadioEngine.DecimalCount() );
+            TBuf<KFrequencyMaxLength> frequencyString;
+            frequencyString.Num( frequency, format );
+            AknTextUtils::LanguageSpecificNumberConversion( frequencyString );
+
+            HBufC* freqSavedString = StringLoader::LoadLC( R_QTN_FMRADIO_SAVING_DONE_ONE_NO_NAME, frequencyString, iEikonEnv );
+            CAknConfirmationNote* saveInfoNote = new ( ELeave ) CAknConfirmationNote( ETrue ); // waiting
+            saveInfoNote->ExecuteLD( *freqSavedString );
+            CleanupStack::PopAndDestroy( freqSavedString );
+            }
+        // channel info is removed after save
+        delete iScannedChannels[ chIndex ];
+        iScannedChannels.Remove( chIndex );
+        iScannedChannels.Compress();
+        }
+    UpdateToolbar();
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::ActivateMainViewL
+// Activates main view
+// --------------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::ActivateMainViewL()
+    {
+    CAknViewAppUi* appUi = AppUi();
+    
+    if ( !appUi->IsForeground() )
+        {
+        // don't bring radio automatically to the foreground
+        // if the view is about to change
+        // and we are still in the background
+        appUi->SetCustomControl( 1 );
+        appUi->ActivateLocalViewL( KFMRadioMainViewId );
+        appUi->SetCustomControl( 0 );
+        }
+    else
+        {
+        appUi->ActivateLocalViewL( KFMRadioMainViewId );
+        }
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::SetContextMenu
+// --------------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::SetContextMenu( TInt aMenuTitleResourceId )
+    {
+    if ( !AknLayoutUtils::PenEnabled() )
+        {
+        CEikMenuBar* menubar = MenuBar();
+        if ( menubar )
+            {
+            menubar->SetContextMenuTitleResourceId( aMenuTitleResourceId );
+            menubar->SetMenuType( CEikMenuBar::EMenuContext );
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::HandleScanListRemConEventL
+// --------------------------------------------------------------------------------
+//
+void CFMRadioScanLocalStationsView::HandleScanListRemConEventL( TAccessoryEvent aEvent )
+    {
+    TInt scannedChannelCount = iScannedChannels.Count();
+
+    if ( scannedChannelCount >= 1 )
+        {
+        TInt selectedChannelIndex = CurrentlySelectedChannel();
+        TInt nextChannellIndex = 0;
+        
+        if ( aEvent == EForward )
+            {
+            nextChannellIndex = selectedChannelIndex + 1;
+            
+            if ( nextChannellIndex >= scannedChannelCount )
+                {
+                // go around the the list to the first channnel
+                nextChannellIndex = 0;
+                }
+            }
+        else if ( aEvent == ERewind )
+            {
+            nextChannellIndex = selectedChannelIndex - 1;
+        
+            if ( nextChannellIndex < KMinNumberOfChannelListItems )
+                {
+                // jump to the last item
+                nextChannellIndex = scannedChannelCount - 1;
+                }
+            }
+        // check that index is really a valid one
+        if ( ChannelInUse( nextChannellIndex ) )
+            {
+            TInt nextChannelFrequency = iScannedChannels[ nextChannellIndex ]->PresetFrequency();
+            // tune if necessary
+            if ( iRadioEngine.GetTunedFrequency() != nextChannelFrequency )
+                {
+                CFMRadioAppUi* appUi = static_cast<CFMRadioAppUi*>( iCoeEnv->AppUi() );
+                appUi->TuneL( nextChannelFrequency );
+                }
+            }
+        }
+    }
+
+// --------------------------------------------------------------------------------
+// CFMRadioScanLocalStationsView::SortedFrequencyListIndex
+// --------------------------------------------------------------------------------
+//
+TInt CFMRadioScanLocalStationsView::SortedFrequencyListIndex( TInt aFrequency )
+    {
+    TInt channelCount = iScannedChannels.Count();
+    TInt sortedIndex = 0;
+    
+    for ( TInt i = 0; i < channelCount; i++ )
+        {
+        TInt presetFreq = iScannedChannels[i]->PresetFrequency();
+        
+        if ( aFrequency > presetFreq )
+            {
+            sortedIndex = i + 1;
+            }
+        else if ( aFrequency < presetFreq )
+            {
+            sortedIndex = i;
+            break;
+            }        
+        }
+    return sortedIndex;
+    }
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradio/src/fmradiosvkevents.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,384 @@
+/*
+* 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: 
+*  Class which implements handling Side Volume Key events (SVK).
+*  This class implements methods of MRemConCoreApiTargetObserver
+*
+*
+*/
+
+
+
+// INCLUDE FILES
+#include <remconcoreapitarget.h>
+#include <remconcoreapitargetobserver.h>
+#include <RemConCallHandlingTarget.h>
+#include <RemConCallHandlingTargetObserver.h>
+#include <remconinterfaceselector.h>
+#include <aknconsts.h>                      // KAknStandardKeyboardRepeatRate
+#include <aknViewAppUi.h>
+
+#include "fmradiosvkevents.h"
+
+
+// CONSTANTS
+const TInt KVolumeControlExpiryPeriod = 2000000;
+const TInt KVolumeFirstChangePeriod = KAknStandardKeyboardRepeatRate;
+const TInt KVolumeChangePeriod = KAknStandardKeyboardRepeatRate;
+const TInt KVolumeChangeUp = 1;
+const TInt KVolumeChangeDown = -1;
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// ----------------------------------------------------------------------------
+// CFMRadioSvkEvents
+// ----------------------------------------------------------------------------
+//
+CFMRadioSvkEvents* CFMRadioSvkEvents::NewL( MFMRadioSvkEventsObserver& aObserver )
+    {
+#ifdef _DEBUG
+	RDebug::Print(_L("CFMRadioSvkEvents::NewL"));
+#endif
+    CFMRadioSvkEvents* self = new ( ELeave ) CFMRadioSvkEvents( aObserver );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ----------------------------------------------------------------------------
+// CFMRadioSvkEvents
+// ----------------------------------------------------------------------------
+//
+CFMRadioSvkEvents::CFMRadioSvkEvents( MFMRadioSvkEventsObserver& aObserver ) :
+    iObserver( aObserver )
+    {
+    }
+
+
+// ----------------------------------------------------------------------------
+// CFMRadioSvkEvents::~CFMRadioSvkEvents
+// ----------------------------------------------------------------------------
+//
+CFMRadioSvkEvents::~CFMRadioSvkEvents()
+    {
+#ifdef _DEBUG
+	RDebug::Print(_L("CFMRadioSvkEvents::~CFMRadioSvkEvents"));
+#endif
+    delete iRemoveTimer;
+    delete iVolumeTimer;
+    delete iInterfaceSelector;
+    iCoreTarget = NULL; // For LINT. Owned by iInterfaceSelector
+    iCallTarget = NULL; // For LINT. Owned by iInterfaceSelector
+    }
+
+// ----------------------------------------------------------------------------
+// ConstructL
+// ----------------------------------------------------------------------------
+//
+void CFMRadioSvkEvents::ConstructL( )
+    {
+#ifdef _DEBUG
+	RDebug::Print(_L("CFMRadioSvkEvents::ConstructL"));
+#endif
+
+    iTargetOpen = EFalse;
+    iInterfaceSelector = CRemConInterfaceSelector::NewL();
+
+    // owned by iInterfaceSelector
+    iCoreTarget = CRemConCoreApiTarget::NewL( *iInterfaceSelector, *this );
+    iCallTarget = CRemConCallHandlingTarget::NewL(*iInterfaceSelector, *this);
+
+    if (!iTargetOpen)
+    {
+    	iInterfaceSelector->OpenTargetL();
+    	iTargetOpen = ETrue ;
+    }
+
+    // Remote control server command repeat timer.
+    iVolumeTimer = CPeriodic::NewL( EPriorityNormal );
+    iRemoveTimer = CPeriodic::NewL( EPriorityNormal );
+    }
+
+// ----------------------------------------------------------------------------
+// CFMRadioSvkEvents::MrccatoCommand
+// Handles side volume key events.
+// ----------------------------------------------------------------------------
+//
+void CFMRadioSvkEvents::MrccatoCommand( TRemConCoreApiOperationId   aOperationId,
+                                    TRemConCoreApiButtonAction  aButtonAct )
+    {
+#ifdef _DEBUG
+	RDebug::Print(_L("CFMRadioSvkEvents::MrccatoCommand, Operation ID [%d]"), aOperationId);
+#endif
+    switch ( aOperationId )
+        {
+        case ERemConCoreApiVolumeUp: //  Volume Up
+        	{
+            HandleVolumeButtons( aButtonAct, KVolumeChangeUp ); 
+            break;
+        	}
+        case ERemConCoreApiVolumeDown: //  Volume Down
+        	{
+            HandleVolumeButtons( aButtonAct, KVolumeChangeDown ); 
+            break;
+        	}
+        case ERemConCoreApiBackward: //  Backward
+            {
+			iObserver.FMRadioHeadsetEvent( ERewind );
+            break;
+            }
+		case ERemConCoreApiForward: //   Forward
+            {
+			iObserver.FMRadioHeadsetEvent( EForward );
+            break;
+            }
+        case ERemConCoreApiRewind: //  Tune down
+            {
+            if ( aButtonAct == ERemConCoreApiButtonPress )
+            	{
+            	TuneChannel( EFMRadioCmdSeekDown );
+            	}
+            break;
+            }
+		case ERemConCoreApiFastForward: //   Tune up
+            {
+            if ( aButtonAct == ERemConCoreApiButtonPress )
+             	{
+             	TuneChannel( EFMRadioCmdSeekUp );
+             	}
+            break;
+            }
+        case ERemConCoreApiPausePlayFunction:        
+        	{
+        	iObserver.FMRadioHeadsetEvent( EPausePlay );
+        	break;
+        	}
+        case ERemConCoreApiStop:
+        	{
+        	iObserver.FMRadioHeadsetEvent( EStop );
+        	break;	
+        	}            
+        default :
+            {
+            // Don’t Panic or do anything here. Other events such as Stop, Rewind, Forward will fall here.
+            break;
+            }
+        }
+    }
+
+
+// ----------------------------------------------------------------------------
+// StartRemoveTimerL
+//
+// ----------------------------------------------------------------------------
+//
+void CFMRadioSvkEvents::StartRemoveTimerL( )
+    {
+#ifdef _DEBUG
+	RDebug::Print(_L("CFMRadioSvkEvents::StartRemoveTimerL" ));
+#endif
+    iRemoveTimer->Cancel();
+    iRemoveTimer->Start(    KVolumeControlExpiryPeriod,
+                            KVolumeControlExpiryPeriod,
+                            TCallBack( RemoveControl, this ) );
+    }
+
+// ----------------------------------------------------------------------------
+// CancelRemoveTimer
+// ----------------------------------------------------------------------------
+//
+void CFMRadioSvkEvents::CancelRemoveTimer( )
+    {
+    iRemoveTimer->Cancel();
+    }
+
+// ----------------------------------------------------------------------------
+// DoChangeVolume
+//
+// ----------------------------------------------------------------------------
+//
+void CFMRadioSvkEvents::DoChangeVolume( )
+    {
+#ifdef _DEBUG
+	RDebug::Print(_L("CFMRadioSvkEvents::DoChangeVolume" ));
+#endif
+    TRAP_IGNORE( iObserver.FMRadioSvkChangeVolumeL( iChange ) );
+    iRemoveTimer->Cancel();
+    iRemoveTimer->Start(   KVolumeControlExpiryPeriod,
+                            KVolumeControlExpiryPeriod,
+                            TCallBack( RemoveControl, this ) );
+    }
+
+
+// ----------------------------------------------------------------------------
+// TuneChannel
+//
+// ----------------------------------------------------------------------------
+//
+void CFMRadioSvkEvents::TuneChannel( TFMRadioCommandIds aDirection )
+    {
+	CAknViewAppUi* appUi = static_cast<CAknViewAppUi*>( CCoeEnv::Static()->AppUi() ); 
+    TRAP_IGNORE( appUi->HandleCommandL( aDirection ) );
+    }
+
+// ----------------------------------------------------------------------------
+// RemoveControlL
+//
+// ----------------------------------------------------------------------------
+//
+void CFMRadioSvkEvents::RemoveControlL( )
+    {
+    iRemoveTimer->Cancel();
+    iObserver.FMRadioSvkRemoveVolumeL( );
+    }
+
+
+
+// ----------------------------------------------------------------------------
+// ChangeVolume
+//
+// ----------------------------------------------------------------------------
+//
+TInt CFMRadioSvkEvents::ChangeVolume( TAny* aObject )
+    {
+    // cast, and call non-static function
+    static_cast<CFMRadioSvkEvents*>( aObject )->DoChangeVolume( );
+    return KErrNone;
+    }
+
+// ----------------------------------------------------------------------------
+// RemoveControl
+//
+// ----------------------------------------------------------------------------
+//
+TInt CFMRadioSvkEvents::RemoveControl( TAny* aObject )
+    {
+    // cast, and call non-static function
+    TRAP_IGNORE( static_cast<CFMRadioSvkEvents*>( aObject )->RemoveControlL() );
+    return KErrNone;
+    }
+
+
+// ---------------------------------------------------------
+// CFMRadioSvkEvents::AnswerCall
+// ---------------------------------------------------------
+//
+void CFMRadioSvkEvents::AnswerCall()
+    {
+    }
+
+// ---------------------------------------------------------
+// CFMRadioSvkEvents::AnswerEndCall
+// ---------------------------------------------------------
+//
+void CFMRadioSvkEvents::AnswerEndCall()
+    {
+	iObserver.FMRadioHeadsetEvent(EForward);
+    }
+
+// ---------------------------------------------------------
+// CFMRadioSvkEvents::DialCall
+// ---------------------------------------------------------
+//
+void CFMRadioSvkEvents::DialCall( const TDesC8& /*aTelNumber*/ )
+    {
+    }
+
+// ---------------------------------------------------------
+// CFMRadioSvkEvents::EndCall
+// ---------------------------------------------------------
+//
+void CFMRadioSvkEvents::EndCall()
+    {
+    }
+
+// ---------------------------------------------------------
+// CFMRadioSvkEvents::GenerateDTMF
+// ---------------------------------------------------------
+//
+void CFMRadioSvkEvents::GenerateDTMF( const TChar /*aChar*/ )
+    {
+    }
+
+// ---------------------------------------------------------
+// CFMRadioSvkEvents::LastNumberRedial
+// ---------------------------------------------------------
+//
+void CFMRadioSvkEvents::LastNumberRedial()
+    {
+    }
+
+// ---------------------------------------------------------
+// CFMRadioSvkEvents::MultipartyCalling
+// ---------------------------------------------------------
+//
+void CFMRadioSvkEvents::MultipartyCalling( const TDesC8& /*aData*/ )
+    {
+    }
+
+// ---------------------------------------------------------
+// CFMRadioSvkEvents::SpeedDial
+// ---------------------------------------------------------
+//
+void CFMRadioSvkEvents::SpeedDial( const TInt /*aIndex*/ )
+    {
+    }
+
+// ---------------------------------------------------------
+// CFMRadioSvkEvents::VoiceDial
+// ---------------------------------------------------------
+//
+void CFMRadioSvkEvents::VoiceDial( const TBool /*aActivate*/ )
+    {
+    }
+// ---------------------------------------------------------
+// CFMRadioSvkEvents::HandleVolumeButtons
+// ---------------------------------------------------------
+//
+void CFMRadioSvkEvents::HandleVolumeButtons( TRemConCoreApiButtonAction aButtonAct, TInt aDirection  )
+	{
+	switch( aButtonAct )
+        {
+        case ERemConCoreApiButtonPress:
+            {
+            // Volume up hold down for 0,6 seconds
+            iVolumeTimer->Cancel();
+            iVolumeTimer->Start( KVolumeFirstChangePeriod,
+                                 KVolumeChangePeriod,
+                                 TCallBack( ChangeVolume, this ) );
+       	    iChange = aDirection;
+       		DoChangeVolume( );
+            break;
+            }
+        case ERemConCoreApiButtonRelease:
+            {
+            iVolumeTimer->Cancel();
+            break;
+            }
+        case ERemConCoreApiButtonClick:
+            {
+            iChange = aDirection;
+            DoChangeVolume( );
+            break;
+            }
+        default:
+            {
+            // Never hits this
+            break;
+            }
+        }
+	}
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioactionhandler/group/bld.inf	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,32 @@
+/*
+* 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:  Component definition for the 
+*               FM Radio Action Handler plugin.
+*
+*/
+
+#include <platform_paths.hrh>
+
+// Platforms the component needs to be built on
+//
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+fmradioactionhandler.mmp
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioactionhandler/group/fmradioactionhandler.mmp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,58 @@
+/*
+* 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: Project definition file for project
+*              FM Radio Action Handler plugin. 
+*
+*/
+
+// To get the APP_LAYER_SYSTEMINCLUDE-definition
+#include <platform_paths.hrh>
+#include <data_caging_paths.hrh>
+#include "../resources/fmradioactionhandler.hrh"	
+
+TARGET          fmradioactionhandler.dll
+TARGETTYPE      PLUGIN
+UID             0x10009D8D KFMRadioActionHandlerDllUid 
+
+CAPABILITY      CAP_ECOM_PLUGIN
+VENDORID        VID_DEFAULT
+
+PAGED
+
+SOURCEPATH      ../resources
+START RESOURCE 2001f498.rss
+TARGET  fmradioactionhandler.rsc
+TARGETPATH ECOM_RESOURCE_DIR
+END
+
+
+APP_LAYER_SYSTEMINCLUDE
+
+USERINCLUDE     ../inc
+USERINCLUDE     ../resources
+USERINCLUDE     ../../fmradio/inc
+USERINCLUDE     ../../fmradioengine/inc
+
+SOURCEPATH      ../src
+SOURCE          fmradioactionhandler.cpp
+
+LIBRARY         ecom.lib
+LIBRARY         euser.lib
+LIBRARY	    	liwservicehandler.lib
+LIBRARY	    	ws32.lib
+LIBRARY		apgrfx.lib
+LIBRARY		apparc.lib
+
+DEBUGLIBRARY    flogger.lib
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioactionhandler/inc/fmradioactionhandler.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,111 @@
+/*
+* 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:  Declaration for the class CFMRadioActionHandler.
+*
+*/
+
+#ifndef FMRADIOACTIONHANDLER_H
+#define FMRADIOACTIONHANDLER_H
+
+#include <ahplugin.h>
+
+/**
+ * Action handler provides LIW -based interface for external use (e.g. Homescreen) 
+ * 
+ * The action handler communicates with FM Radio via FM Radio's Publish & Subscribe API.
+ * 
+ * @lib fmradioactionhandler.lib
+ */
+NONSHARABLE_CLASS( CFMRadioActionHandler ) : public CAHPlugin
+    {
+public:
+    /**
+     * Two-phased constructor. 
+     */
+    static CFMRadioActionHandler* NewL();
+
+    /**
+     * Destructor
+     */
+    ~CFMRadioActionHandler();
+    
+    // From base class CAHPlugin
+    TInt ExecuteActionL( const CLiwMap* aMap );
+    
+private:
+    /**
+     * C++ constructor.
+     */
+    CFMRadioActionHandler();
+    
+    /**
+     * Second phase constructor.
+     */
+    void ConstructL();
+    
+private:
+    /**
+     * Invokes step to previous preset.
+     */
+    void StepPrevious();
+    
+    /**
+     * Invokes step to next preset. 
+     */
+    void StepNext();
+    
+    /**
+     * Mutes radio.
+     */
+    void Mute();
+    
+    /**
+     * Unmutes radio.
+     */
+    void Unmute();
+    
+    /**
+     * Invokes seek up.
+     */
+    void SeekUp();
+    
+    /**
+     * Invokes seek down.
+     */
+    void SeekDown();
+
+    /**
+     * Invokes to go to now playing view.
+     */
+    void StartToNowPlayingL();
+    
+    /**
+     * Generates start now playing command tail.
+     * 
+     * @return start now playing command tail. 
+     */
+    const TPtrC8 GenerateStartNowPlayingCommandTail();
+    
+    /**
+     * Extracts the value of the given mapname to given string.
+     * Reserves memory to argument aString.
+     * 
+     * @param aMap The map containing the mapname-string pairs.
+     * @param aString Descriptor where the value is extracted.
+     * @param aMapName The searched map name. 
+     */
+    TInt ExtractStringL( const CLiwMap* aMap, RBuf& aString, const TDesC8& aMapName );
+    };
+
+#endif /* FMRADIOACTIONHANDLER_H*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioactionhandler/inc/fmradioactionhandlerdefs.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,32 @@
+/*
+* 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:  Definitions for the FM Radio Action Handler.
+*
+*/
+
+#ifndef FMRADIOACTIONHANDLERDEFS_H
+#define FMRADIOACTIONHANDLERDEFS_H
+
+#include <e32base.h>
+
+_LIT8( KFMRadioCommand, "command" );
+_LIT( KFMRadioCommandValueStepPrevious, "stepprevious" );
+_LIT( KFMRadioCommandValueStepNext, "stepnext" );
+_LIT( KFMRadioCommandValueMute, "mute" );
+_LIT( KFMRadioCommandValueUnmute, "unmute" );
+_LIT( KFMRadioCommandValueSeekUp, "seekup" );
+_LIT( KFMRadioCommandValueSeekDown, "seekdown" );
+_LIT( KFMRadioCommandValueStartNowPlaying, "startnowplaying" );
+
+#endif /* FMRADIOACTIONHANDLERDEFS_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioactionhandler/resources/2001f498.rss	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,55 @@
+/*
+* 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 plugin registration resource for FM Radio Action Handler Plugin.
+*
+*/
+
+#include <ahpluginuids.hrh>
+#include <ecom/registryinfov2.rh>
+
+#include "fmradioactionhandler.hrh"
+
+// ---------------------------------------------------------------------------
+// Resource information for the ECOM DLL.
+// ---------------------------------------------------------------------------
+//
+RESOURCE REGISTRY_INFO theInfo
+    {
+    resource_format_version = RESOURCE_FORMAT_VERSION_2;
+    
+    dll_uid = KFMRadioActionHandlerDllUid;
+
+    interfaces = 
+        {
+        INTERFACE_INFO
+            {
+            // AH plugin interface
+            interface_uid = KAHPluginInterfaceUid;
+
+            implementations = 
+                {
+                // FM Radio Action handler AH plugin implementation
+                IMPLEMENTATION_INFO
+                    {
+                    implementation_uid = KFMRadioActionHandlerImplementationUid;
+                    version_no         = 1;
+                    display_name       = "";
+                    default_data       = "";
+                    opaque_data        = "";
+                    rom_only           = 0;
+                    }
+                };
+            }
+        };
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioactionhandler/resources/fmradioactionhandler.hrh	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,27 @@
+/*
+* 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: Definitions for the FM Radio Action Handler plugin.
+*
+*/
+
+#ifndef FMRADIOACTIONHANDLER_HRH
+#define FMRADIOACTIONHANDLER_HRH
+
+// Ecom DLL UID for FM Radio Action Handler plugin.
+#define KFMRadioActionHandlerDllUid 0x2001F498
+
+// Ecom implementation UID for FM Radio Action Handler plugin.
+#define KFMRadioActionHandlerImplementationUid 0x2001FCB8
+
+#endif /* FMRADIOACTIONHANDLER_HRH */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioactionhandler/src/fmradioactionhandler.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,263 @@
+/*
+* 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: Implementation for the FM Radio Action Handler Plugin.
+*
+*/
+
+#include <e32cmn.h>
+#include <e32property.h>
+#include <e32std.h>
+#include <w32std.h>
+#include <ecom/implementationproxy.h>
+#include <liwvariant.h>
+#include <apgtask.h>
+#include <apgcli.h>
+#include <apacmdln.h>
+#include <fmradiocommandlineparams.h>
+#include <fmradiointernalpskeys.h>
+#include <fmradiouids.h>
+
+#include "fmradioactionhandler.h"
+#include "fmradioactionhandler.hrh"
+#include "fmradioactionhandlerdefs.h"
+
+// ---------------------------------------------------------
+// CFMRadioActionHandler::NewL
+// ---------------------------------------------------------
+//
+CFMRadioActionHandler* CFMRadioActionHandler::NewL()
+    {
+    CFMRadioActionHandler* self = new ( ELeave ) CFMRadioActionHandler(); 
+    CleanupStack::PushL( self );
+    
+    self->ConstructL();
+    
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioActionHandler::~CFMRadioActionHandler
+// ---------------------------------------------------------
+//
+CFMRadioActionHandler::~CFMRadioActionHandler()
+    {
+    }
+
+// ---------------------------------------------------------
+// CFMRadioActionHandler::CFMRadioActionHandler
+// ---------------------------------------------------------
+//
+CFMRadioActionHandler::CFMRadioActionHandler()
+    {
+    }
+    
+// ---------------------------------------------------------
+// CFMRadioActionHandler::ConstructL
+// ---------------------------------------------------------
+//
+void CFMRadioActionHandler::ConstructL()
+    {
+    }
+
+// ---------------------------------------------------------
+// CFMRadioActionHandler::ExecuteActionL
+// ---------------------------------------------------------
+//
+TInt CFMRadioActionHandler::ExecuteActionL( const CLiwMap* aMap )
+    {
+    TInt retValue( KErrNone );
+    RBuf command;
+    CleanupClosePushL( command );
+    
+    retValue = ExtractStringL( aMap, command, KFMRadioCommand);
+    if ( retValue == KErrNone )
+        {
+        if ( !command.CompareF( KFMRadioCommandValueStepPrevious ) )
+            {
+            StepPrevious();
+            }
+        else if ( !command.CompareF( KFMRadioCommandValueStepNext ) )
+            {
+            StepNext();
+            }
+        else if ( !command.CompareF( KFMRadioCommandValueMute) )
+            {
+            Mute();
+            }
+        else if ( !command.CompareF( KFMRadioCommandValueUnmute ) )
+            {
+            Unmute();
+            }
+        else if ( !command.CompareF( KFMRadioCommandValueSeekUp ) )
+            {
+            SeekUp();
+            }
+        else if ( !command.CompareF( KFMRadioCommandValueSeekDown ) )
+            {
+            SeekDown();
+            }
+        else if ( !command.CompareF( KFMRadioCommandValueStartNowPlaying ) )
+            {
+            StartToNowPlayingL();
+            }
+        else
+            {
+            retValue = KErrNotSupported;
+            }
+        }
+    CleanupStack::PopAndDestroy( &command );
+    return retValue;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioActionHandler::StepPrevious
+// ---------------------------------------------------------
+//
+void CFMRadioActionHandler::StepPrevious()
+    {
+    RProperty::Set( KFMRadioPSUid, KFMRadioPSControlStepToChannel, EFMRadioPSStepToChannelDown );
+    }
+
+// ---------------------------------------------------------
+// CFMRadioActionHandler::StepNext
+// ---------------------------------------------------------
+//
+void CFMRadioActionHandler::StepNext()
+    {
+    RProperty::Set( KFMRadioPSUid, KFMRadioPSControlStepToChannel, EFMRadioPSStepToChannelUp );
+    }
+
+// ---------------------------------------------------------
+// CFMRadioActionHandler::Mute
+// ---------------------------------------------------------
+//
+void CFMRadioActionHandler::Mute()
+    {
+    RProperty::Set( KFMRadioPSUid, KFMRadioPSControlSetRadioMuteState, EFMRadioPSMuteStateOn );
+    }
+
+// ---------------------------------------------------------
+// CFMRadioActionHandler::Unmute
+// ---------------------------------------------------------
+//
+void CFMRadioActionHandler::Unmute()
+    {
+    RProperty::Set( KFMRadioPSUid, KFMRadioPSControlSetRadioMuteState, EFMRadioPSMuteStateOff );    
+    }
+
+// ---------------------------------------------------------
+// CFMRadioActionHandler::SeekUp
+// ---------------------------------------------------------
+//
+void CFMRadioActionHandler::SeekUp()
+    {
+    //RProperty::Set( KFMRadioPSUid, KFMRadioPSControlSeek, EFMRadioPSSeekUp );
+    }
+
+// ---------------------------------------------------------
+// CFMRadioActionHandler::SeekDown
+// ---------------------------------------------------------
+//
+void CFMRadioActionHandler::SeekDown()
+    {
+    //RProperty::Set( KFMRadioPSUid, KFMRadioPSControlSeek, EFMRadioPSSeekDown );
+    }
+
+// ---------------------------------------------------------
+// CFMRadioActionHandler::StartToNowPlayingL
+// ---------------------------------------------------------
+//
+void CFMRadioActionHandler::StartToNowPlayingL()
+    {
+    RWsSession wsSession;
+                
+    User::LeaveIfError(wsSession.Connect() );
+    CleanupClosePushL( wsSession );
+    
+    TApaTaskList taskList( wsSession );
+    TUid appUid = TUid::Uid( KUidFMRadioApplication );
+    TApaTask fmRadioTask = taskList.FindApp( appUid );
+    
+    const TInt KFMRadioViewIdLength = 3;
+    RBuf8 params;
+    params.CreateL( KFMRadioCommandActivateView().Length() + KFMRadioViewIdLength );
+    params.Copy( KFMRadioCommandActivateView );
+    params.Append( _L(" ") );
+    params.AppendNum( KFMRadioMainViewId.iUid );
+    params.CleanupClosePushL();
+    
+    if ( !fmRadioTask.Exists() )
+        {
+        RApaLsSession apaSession;
+        CleanupClosePushL( apaSession );
+                
+        User::LeaveIfError( apaSession.Connect() );
+        User::LeaveIfError( apaSession.GetAllApps() );
+                
+        TApaAppInfo appInfo;
+        User::LeaveIfError( apaSession.GetAppInfo( appInfo, appUid ) );
+                
+        CApaCommandLine* startParams = CApaCommandLine::NewLC();
+        startParams->SetExecutableNameL( appInfo.iFullName );
+        startParams->SetCommandL( EApaCommandRun ); 
+        startParams->SetTailEndL( params );
+        User::LeaveIfError( apaSession.StartApp( *startParams ) );
+        CleanupStack::PopAndDestroy( 2, &apaSession );
+        }
+    else
+        {
+        User::LeaveIfError( fmRadioTask.SendMessage( appUid, params ) );
+        }
+    CleanupStack::PopAndDestroy( 2 );
+    }
+
+// ---------------------------------------------------------
+// CFMRadioActionHandler::ExtractStringLC
+// ---------------------------------------------------------
+//
+TInt CFMRadioActionHandler::ExtractStringL( const CLiwMap* aMap, RBuf& aString, const TDesC8& aMapName )
+    {
+    TInt err( KErrNotFound );
+    TLiwVariant variant;
+    variant.PushL();
+    TPtrC tempString( KNullDesC );    
+    if ( aMap->FindL( aMapName, variant ) )
+        {
+        variant.Get( tempString );
+        aString.Close();
+        aString.CreateL( tempString );
+        err = KErrNone;
+        }
+    CleanupStack::PopAndDestroy( &variant );    
+    return err;
+    }
+
+/** Provides a key-value pair table, that is used to identify the correct construction function for the requested interface. */
+const TImplementationProxy KFMRadioActionHandlerImplementationTable[] =
+    {
+    IMPLEMENTATION_PROXY_ENTRY( KFMRadioActionHandlerImplementationUid, CFMRadioActionHandler::NewL )
+    };
+
+const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount );
+
+// ---------------------------------------------------------------------------
+// Returns the implementations provided by this ECOM plugin DLL.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
+    {
+    aTableCount = sizeof( KFMRadioActionHandlerImplementationTable ) / sizeof( TImplementationProxy );
+    return KFMRadioActionHandlerImplementationTable;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/bwins/fmradioengineacu.def	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,77 @@
+EXPORTS
+	?GetAudioMode@CRadioEngine@@QBEHXZ @ 1 NONAME ; int CRadioEngine::GetAudioMode(void) const
+	?PublishChannelNameL@CFMRadioPubSub@@QBEXABVTDesC16@@@Z @ 2 NONAME ; void CFMRadioPubSub::PublishChannelNameL(class TDesC16 const &) const
+	?IsFlightModeEnabled@CRadioEngine@@QBEHXZ @ 3 NONAME ; int CRadioEngine::IsFlightModeEnabled(void) const
+	?GetTunedFrequency@CRadioEngine@@QBEHXZ @ 4 NONAME ; int CRadioEngine::GetTunedFrequency(void) const
+	?RtPlusAlbum@CFMRadioRdsReceiverBase@@QBEABVTDesC16@@XZ @ 5 NONAME ; class TDesC16 const & CFMRadioRdsReceiverBase::RtPlusAlbum(void) const
+	?PublishApplicationRunningStateL@CFMRadioPubSub@@QBEXW4TFMRadioPSApplicationRunningState@@@Z @ 6 NONAME ; void CFMRadioPubSub::PublishApplicationRunningStateL(enum TFMRadioPSApplicationRunningState) const
+	?SetRdsAfSearchEnable@CRadioEngine@@QAEXH@Z @ 7 NONAME ; void CRadioEngine::SetRdsAfSearchEnable(int)
+	?SetAudioOutput@CRadioEngine@@QAEXW4TFMRadioAudioOutput@1@@Z @ 8 NONAME ; void CRadioEngine::SetAudioOutput(enum CRadioEngine::TFMRadioAudioOutput)
+	?SetVolume@CRadioEngine@@QAEXH@Z @ 9 NONAME ; void CRadioEngine::SetVolume(int)
+	?MusicStoreNoteDisplayed@CRadioEngine@@QAEHXZ @ 10 NONAME ; int CRadioEngine::MusicStoreNoteDisplayed(void)
+	?ScanUp@CRadioEngine@@QAEXXZ @ 11 NONAME ; void CRadioEngine::ScanUp(void)
+	?IsMuteOn@CRadioEngine@@QBEHXZ @ 12 NONAME ; int CRadioEngine::IsMuteOn(void) const
+	?RegionIdAtIndex@CRadioEngine@@QBE?AW4TFMRadioRegionSetting@@H@Z @ 13 NONAME ; enum TFMRadioRegionSetting CRadioEngine::RegionIdAtIndex(int) const
+	?GetRegionL@CRadioEngine@@QBE?AW4TFMRadioRegionSetting@@XZ @ 14 NONAME ; enum TFMRadioRegionSetting CRadioEngine::GetRegionL(void) const
+	?TunePresetL@CRadioEngine@@QAEXH@Z @ 15 NONAME ; void CRadioEngine::TunePresetL(int)
+	?Tune@CRadioEngine@@QAEXHW4TRadioMode@1@@Z @ 16 NONAME ; void CRadioEngine::Tune(int, enum CRadioEngine::TRadioMode)
+	?IsRadioOn@CRadioEngine@@QAEHXZ @ 17 NONAME ; int CRadioEngine::IsRadioOn(void)
+	?RemoveObserver@CFMRadioRdsReceiverBase@@QAEXPAVMFMRadioRdsObserver@@@Z @ 18 NONAME ; void CFMRadioRdsReceiverBase::RemoveObserver(class MFMRadioRdsObserver *)
+	?GetAudioOutput@CRadioEngine@@QBE?AW4TFMRadioAudioOutput@1@XZ @ 19 NONAME ; enum CRadioEngine::TFMRadioAudioOutput CRadioEngine::GetAudioOutput(void) const
+	?FrequencySetByRdsAf@CRadioEngine@@QBEHXZ @ 20 NONAME ; int CRadioEngine::FrequencySetByRdsAf(void) const
+	?GetPresetNameAndFrequencyL@CRadioEngine@@QAEXHAAVTDes16@@AAH@Z @ 21 NONAME ; void CRadioEngine::GetPresetNameAndFrequencyL(int, class TDes16 &, int &)
+	?DeletePresetL@CRadioEngine@@QAEXH@Z @ 22 NONAME ; void CRadioEngine::DeletePresetL(int)
+	?AutomaticSwitchingEnabled@CFMRadioRdsReceiverBase@@QBEHXZ @ 23 NONAME ; int CFMRadioRdsReceiverBase::AutomaticSwitchingEnabled(void) const
+	?SignalAvailable@CFMRadioRdsReceiverBase@@QBEHXZ @ 24 NONAME ; int CFMRadioRdsReceiverBase::SignalAvailable(void) const
+	?PublishRDSRadioTextL@CFMRadioPubSub@@QBEXABVTDesC16@@@Z @ 25 NONAME ; void CFMRadioPubSub::PublishRDSRadioTextL(class TDesC16 const &) const
+	?ProgrammeServiceNameType@CFMRadioRdsReceiverBase@@QBE?AW4TFMRadioProgrammeSeviceType@1@XZ @ 26 NONAME ; enum CFMRadioRdsReceiverBase::TFMRadioProgrammeSeviceType CFMRadioRdsReceiverBase::ProgrammeServiceNameType(void) const
+	?AddObserver@CFMRadioRdsReceiverBase@@QAEXPAVMFMRadioRdsObserver@@@Z @ 27 NONAME ; void CFMRadioRdsReceiverBase::AddObserver(class MFMRadioRdsObserver *)
+	?RadioOn@CRadioEngine@@QAEXXZ @ 28 NONAME ; void CRadioEngine::RadioOn(void)
+	?IsInCall@CRadioEngine@@QBEHXZ @ 29 NONAME ; int CRadioEngine::IsInCall(void) const
+	?FillListWithRegionDataL@CRadioEngine@@QBEXAAVCDesC16Array@@@Z @ 30 NONAME ; void CRadioEngine::FillListWithRegionDataL(class CDesC16Array &) const
+	?SetControlEventObserver@CFMRadioPubSub@@QAEXPAVMFMRadioControlEventObserver@@@Z @ 31 NONAME ; void CFMRadioPubSub::SetControlEventObserver(class MFMRadioControlEventObserver *)
+	?FrequencyStepSize@CRadioEngine@@QBEKXZ @ 32 NONAME ; unsigned long CRadioEngine::FrequencyStepSize(void) const
+	?SetMuteOn@CRadioEngine@@QAEXH@Z @ 33 NONAME ; void CRadioEngine::SetMuteOn(int)
+	?GetPresetNameL@CRadioEngine@@QAEAAV?$TBuf@$0CA@@@H@Z @ 34 NONAME ; class TBuf<32> & CRadioEngine::GetPresetNameL(int)
+	?NewL@CRadioEngine@@SAPAV1@AAVMRadioEngineStateChangeCallback@@@Z @ 35 NONAME ; class CRadioEngine * CRadioEngine::NewL(class MRadioEngineStateChangeCallback &)
+	?CancelScanLocalStationsScan@CRadioEngine@@QAEXXZ @ 36 NONAME ; void CRadioEngine::CancelScanLocalStationsScan(void)
+	?GetRTPlusSupportLevel@CRadioEngine@@QAE?AW4TFMRadioRTPlusLevel@@XZ @ 37 NONAME ; enum TFMRadioRTPlusLevel CRadioEngine::GetRTPlusSupportLevel(void)
+	?SetCurrentPresetIndex@CRadioEngine@@QAEXH@Z @ 38 NONAME ; void CRadioEngine::SetCurrentPresetIndex(int)
+	?IsAudioRoutingPossible@CRadioEngine@@QBEHXZ @ 39 NONAME ; int CRadioEngine::IsAudioRoutingPossible(void) const
+	?GetMaxVolume@CRadioEngine@@QBEHXZ @ 40 NONAME ; int CRadioEngine::GetMaxVolume(void) const
+	?RtPlusSong@CFMRadioRdsReceiverBase@@QBEABVTDesC16@@XZ @ 41 NONAME ; class TDesC16 const & CFMRadioRdsReceiverBase::RtPlusSong(void) const
+	?UpdatedStartupCount@CRadioEngine@@QBEHXZ @ 42 NONAME ; int CRadioEngine::UpdatedStartupCount(void) const
+	?RadioOff@CRadioEngine@@QAEXXZ @ 43 NONAME ; void CRadioEngine::RadioOff(void)
+	?SetRegionIdL@CRadioEngine@@QBEXH@Z @ 44 NONAME ; void CRadioEngine::SetRegionIdL(int) const
+	?PresetUrlL@CRadioEngine@@QAEHHAAVTDes16@@@Z @ 45 NONAME ; int CRadioEngine::PresetUrlL(int, class TDes16 &)
+	?GetVolume@CRadioEngine@@QBEHXZ @ 46 NONAME ; int CRadioEngine::GetVolume(void) const
+	?PublishStateL@CFMRadioPubSub@@QBEXH@Z @ 47 NONAME ; void CFMRadioPubSub::PublishStateL(int) const
+	?RequestTunerControl@CRadioEngine@@QBEXXZ @ 48 NONAME ; void CRadioEngine::RequestTunerControl(void) const
+	?PublishPresetCountL@CFMRadioPubSub@@QBEXH@Z @ 49 NONAME ; void CFMRadioPubSub::PublishPresetCountL(int) const
+	?SetMusicStoreNoteDisplayed@CRadioEngine@@QAEXXZ @ 50 NONAME ; void CRadioEngine::SetMusicStoreNoteDisplayed(void)
+	?PubSubL@CRadioEngine@@QBEAAVCFMRadioPubSub@@XZ @ 51 NONAME ; class CFMRadioPubSub & CRadioEngine::PubSubL(void) const
+	?SetTunerModeOn@CRadioEngine@@QAEXXZ @ 52 NONAME ; void CRadioEngine::SetTunerModeOn(void)
+	?IsOfflineProfileL@CRadioEngine@@QAEHXZ @ 53 NONAME ; int CRadioEngine::IsOfflineProfileL(void)
+	??1CRadioEngine@@UAE@XZ @ 54 NONAME ; CRadioEngine::~CRadioEngine(void)
+	?PublishFrequencyL@CFMRadioPubSub@@QBEXK@Z @ 55 NONAME ; void CFMRadioPubSub::PublishFrequencyL(unsigned long) const
+	?RegionId@CRadioEngine@@QBEHXZ @ 56 NONAME ; int CRadioEngine::RegionId(void) const
+	?RadioSettings@CRadioEngine@@QAEAAVTRadioSettings@@XZ @ 57 NONAME ; class TRadioSettings & CRadioEngine::RadioSettings(void)
+	?RtPlusArtist@CFMRadioRdsReceiverBase@@QBEABVTDesC16@@XZ @ 58 NONAME ; class TDesC16 const & CFMRadioRdsReceiverBase::RtPlusArtist(void) const
+	?GetRadioMode@CRadioEngine@@QBE?AW4TRadioMode@1@XZ @ 59 NONAME ; enum CRadioEngine::TRadioMode CRadioEngine::GetRadioMode(void) const
+	?GetPresetIndex@CRadioEngine@@QBEHXZ @ 60 NONAME ; int CRadioEngine::GetPresetIndex(void) const
+	?SetAudioMode@CRadioEngine@@QAEXW4TFMRadioAudioMode@1@@Z @ 61 NONAME ; void CRadioEngine::SetAudioMode(enum CRadioEngine::TFMRadioAudioMode)
+	?DecimalCount@CRadioEngine@@QBEHXZ @ 62 NONAME ; int CRadioEngine::DecimalCount(void) const
+	?ScanDown@CRadioEngine@@QAEXXZ @ 63 NONAME ; void CRadioEngine::ScanDown(void)
+	?GetPresetFrequencyL@CRadioEngine@@QBEHH@Z @ 64 NONAME ; int CRadioEngine::GetPresetFrequencyL(int) const
+	?SaveUrlToPresetL@CRadioEngine@@QAEXHABVTDesC16@@@Z @ 65 NONAME ; void CRadioEngine::SaveUrlToPresetL(int, class TDesC16 const &)
+	?CancelScan@CRadioEngine@@QAEXXZ @ 66 NONAME ; void CRadioEngine::CancelScan(void)
+	?IsRdsAfSearchEnabled@TRadioSettings@@QAEHXZ @ 67 NONAME ; int TRadioSettings::IsRdsAfSearchEnabled(void)
+	?GetFrequencyBandRange@CRadioEngine@@QAEHAAH0@Z @ 68 NONAME ; int CRadioEngine::GetFrequencyBandRange(int &, int &)
+	?SetPresetNameFrequencyL@CRadioEngine@@QAEXHABV?$TBuf@$0CA@@@H@Z @ 69 NONAME ; void CRadioEngine::SetPresetNameFrequencyL(int, class TBuf<32> const &, int)
+	?InitializeRadio@CRadioEngine@@QAEXXZ @ 70 NONAME ; void CRadioEngine::InitializeRadio(void)
+	?ProgrammeService@CFMRadioRdsReceiverBase@@QBEABVTDesC16@@XZ @ 71 NONAME ; class TDesC16 const & CFMRadioRdsReceiverBase::ProgrammeService(void) const
+	?RtPlusProgramUrl@CFMRadioRdsReceiverBase@@QBEABVTDesC16@@XZ @ 72 NONAME ; class TDesC16 const & CFMRadioRdsReceiverBase::RtPlusProgramUrl(void) const
+	?IsHeadsetConnected@CRadioEngine@@QBEHXZ @ 73 NONAME ; int CRadioEngine::IsHeadsetConnected(void) const
+	?PublishRDSProgramServiceL@CFMRadioPubSub@@QBEXABVTDesC16@@@Z @ 74 NONAME ; void CFMRadioPubSub::PublishRDSProgramServiceL(class TDesC16 const &) const
+	?RdsReceiver@CRadioEngine@@QAEAAVCFMRadioRdsReceiverBase@@XZ @ 75 NONAME ; class CFMRadioRdsReceiverBase & CRadioEngine::RdsReceiver(void)
+
Binary file fmradio/fmradioengine/cenrep/2001b25e.cre has changed
Binary file fmradio/fmradioengine/cenrep/2001b25e.txt has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/data/fmradioengine.rss	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,189 @@
+/*
+* 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: Resource file for fmradioengine  
+*
+*/
+//  RESOURCE IDENTIFIER
+NAME    FMEN
+
+//  INCLUDES
+#include <uikon.rh>
+
+#include <fmradio.loc>
+#include "fmradioengine.hrh"
+
+//  RESOURCE DEFINITIONS 
+
+// ---------------------------------------------------------
+//   
+//    
+//    Resource signature
+//
+// ---------------------------------------------------------
+//
+
+RESOURCE RSS_SIGNATURE { }
+
+// Non-operator customisable settings
+
+
+STRUCT RADIO_REGION
+    {
+    WORD id;
+    WORD stepsize;
+    LONG minfrequency;
+    LONG maxfrequency;
+    WORD decimalcount;
+    LTEXT countrycodes[] = {""};
+    LTEXT regionname;
+    LTEXT regionsettingname;
+    }
+
+STRUCT RADIO_REGION_ARRAY
+    {
+    LLINK regions[];
+    }
+
+// ---------------------------------------------------------
+//
+//    r_radio_regions_all
+//    Array of all the supported regions
+//
+// ---------------------------------------------------------
+//
+RESOURCE RADIO_REGION_ARRAY r_radio_regions_all
+    {
+    regions = 
+        {
+        r_radio_region_america,
+        r_radio_region_japan,
+        r_radio_region_default
+        };
+    }
+
+// ---------------------------------------------------------
+//
+//    r_radio_regions_without_japan
+//    Array of supported regions without Japan
+//
+// ---------------------------------------------------------
+//
+RESOURCE RADIO_REGION_ARRAY r_radio_regions_without_japan
+    {
+    regions = 
+        {		
+        r_radio_region_america,
+        r_radio_region_default
+        };
+    }
+    
+// ---------------------------------------------------------
+//
+//    r_radio_region_japan
+//    Region settings for Japan
+//    Check country codes from: 
+//    "COMPLEMENT TO ITU-T RECOMMENDATION E.212, LIST OF MOBILE COUNTRY OR GEOGRAPHICAL AREA CODES"
+// ---------------------------------------------------------
+//
+RESOURCE RADIO_REGION r_radio_region_japan
+    {
+    id = EFMRadioRegionJapan;
+    stepsize = 100;
+    minfrequency = 76000;
+    maxfrequency = 90000;
+    decimalcount = 1;
+    countrycodes = 
+        {
+        "440",
+        "441"
+        };
+    regionname = qtn_fmradio_reg_japan;
+    }
+
+// ---------------------------------------------------------
+//
+//    r_radio_region_america
+//    Region settings for America
+//    "COMPLEMENT TO ITU-T RECOMMENDATION E.212, LIST OF MOBILE COUNTRY OR GEOGRAPHICAL AREA CODES"
+//
+// ---------------------------------------------------------
+//
+RESOURCE RADIO_REGION r_radio_region_america
+    {
+    id = EFMRadioRegionAmerica;
+    stepsize = 200;
+    minfrequency = 88100;
+    maxfrequency = 107900;
+    decimalcount = 1;
+    countrycodes = 
+        {
+        "302",  // Canada
+        "310",  // USA
+        "311",  // USA
+        "312",  // USA
+        "313",  // USA
+        "314",  // USA
+        "315",  // USA
+        "316",  // USA
+        "332",  // USA
+        "334",  // Mexico
+        "338",  // Jamaica
+        "342",  // Barbados
+        "344",  // Antigua and Barbuda
+        "352",  // Grenada
+        "360",  // Saint Vincent and the Grenadines
+        "364",  // Bahamas
+        "366",  // Common Wealth of Dominica
+        "370",  // Dominican Republic
+        "372",  // Haiti
+        "374",  // Trinidad and Tobago
+        "368",  // Cuba
+        "702",  // Belize
+        "704",  // Guatemala
+        "706",  // El Salvador
+        "708",  // Honduras
+        "710",  // Nicaragua
+        "712",  // Costa Rica
+        "714",  // Panama
+        "716",  // Peru
+        "724",  // Brazil
+        "730",  // Chile
+        "732",  // Colombia
+        "734",  // Venezuela
+        "736",  // Bolivia
+        "738",  // Guyana
+        "740",  // Ecuador
+        "744",  // Paraguay
+        "746",  // Suriname
+        "748"   // Uruguay
+        };
+    regionname = qtn_fmradio_reg_america;
+    }
+
+// ---------------------------------------------------------
+//
+//    r_radio_region_default
+//    Region settings for default region
+//
+// ---------------------------------------------------------
+//
+RESOURCE RADIO_REGION r_radio_region_default
+    {
+    id = EFMRadioRegionDefault;
+    stepsize = 50;
+    minfrequency = 87500;
+    maxfrequency = 108000;
+    decimalcount = 2;
+    regionname = qtn_fmradio_reg_other;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/eabi/fmradioengineacu.def	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,91 @@
+EXPORTS
+	_ZN12CRadioEngine10CancelScanEv @ 1 NONAME
+	_ZN12CRadioEngine10PresetUrlLEiR6TDes16 @ 2 NONAME
+	_ZN12CRadioEngine11RdsReceiverEv @ 3 NONAME
+	_ZN12CRadioEngine11TunePresetLEi @ 4 NONAME
+	_ZN12CRadioEngine12SetAudioModeENS_17TFMRadioAudioModeE @ 5 NONAME
+	_ZN12CRadioEngine13DeletePresetLEi @ 6 NONAME
+	_ZN12CRadioEngine13RadioSettingsEv @ 7 NONAME
+	_ZN12CRadioEngine14GetPresetNameLEi @ 8 NONAME
+	_ZN12CRadioEngine14SetAudioOutputENS_19TFMRadioAudioOutputE @ 9 NONAME
+	_ZN12CRadioEngine14SetTunerModeOnEv @ 10 NONAME
+	_ZN12CRadioEngine15InitializeRadioEv @ 11 NONAME
+	_ZN12CRadioEngine16SaveUrlToPresetLEiRK7TDesC16 @ 12 NONAME
+	_ZN12CRadioEngine17IsOfflineProfileLEv @ 13 NONAME
+	_ZN12CRadioEngine20SetRdsAfSearchEnableEi @ 14 NONAME
+	_ZN12CRadioEngine21GetFrequencyBandRangeERiS0_ @ 15 NONAME
+	_ZN12CRadioEngine21GetRTPlusSupportLevelEv @ 16 NONAME
+	_ZN12CRadioEngine21SetCurrentPresetIndexEi @ 17 NONAME
+	_ZN12CRadioEngine23MusicStoreNoteDisplayedEv @ 18 NONAME
+	_ZN12CRadioEngine23SetPresetNameFrequencyLEiRK4TBufILi32EEi @ 19 NONAME
+	_ZN12CRadioEngine26GetPresetNameAndFrequencyLEiR6TDes16Ri @ 20 NONAME
+	_ZN12CRadioEngine26SetMusicStoreNoteDisplayedEv @ 21 NONAME
+	_ZN12CRadioEngine27CancelScanLocalStationsScanEv @ 22 NONAME
+	_ZN12CRadioEngine4NewLER31MRadioEngineStateChangeCallback @ 23 NONAME
+	_ZN12CRadioEngine4TuneEiNS_10TRadioModeE @ 24 NONAME
+	_ZN12CRadioEngine6ScanUpEv @ 25 NONAME
+	_ZN12CRadioEngine7RadioOnEv @ 26 NONAME
+	_ZN12CRadioEngine8RadioOffEv @ 27 NONAME
+	_ZN12CRadioEngine8ScanDownEv @ 28 NONAME
+	_ZN12CRadioEngine9IsRadioOnEv @ 29 NONAME
+	_ZN12CRadioEngine9SetMuteOnEi @ 30 NONAME
+	_ZN12CRadioEngine9SetVolumeEi @ 31 NONAME
+	_ZN12CRadioEngineD0Ev @ 32 NONAME
+	_ZN12CRadioEngineD1Ev @ 33 NONAME
+	_ZN12CRadioEngineD2Ev @ 34 NONAME
+	_ZN14CFMRadioPubSub23SetControlEventObserverEP28MFMRadioControlEventObserver @ 35 NONAME
+	_ZN14TRadioSettings20IsRdsAfSearchEnabledEv @ 36 NONAME
+	_ZN23CFMRadioRdsReceiverBase11AddObserverEP19MFMRadioRdsObserver @ 37 NONAME
+	_ZN23CFMRadioRdsReceiverBase14RemoveObserverEP19MFMRadioRdsObserver @ 38 NONAME
+	_ZNK12CRadioEngine10GetRegionLEv @ 39 NONAME
+	_ZNK12CRadioEngine12DecimalCountEv @ 40 NONAME
+	_ZNK12CRadioEngine12GetAudioModeEv @ 41 NONAME
+	_ZNK12CRadioEngine12GetMaxVolumeEv @ 42 NONAME
+	_ZNK12CRadioEngine12GetRadioModeEv @ 43 NONAME
+	_ZNK12CRadioEngine12SetRegionIdLEi @ 44 NONAME
+	_ZNK12CRadioEngine14GetAudioOutputEv @ 45 NONAME
+	_ZNK12CRadioEngine14GetPresetIndexEv @ 46 NONAME
+	_ZNK12CRadioEngine15RegionIdAtIndexEi @ 47 NONAME
+	_ZNK12CRadioEngine17FrequencyStepSizeEv @ 48 NONAME
+	_ZNK12CRadioEngine17GetTunedFrequencyEv @ 49 NONAME
+	_ZNK12CRadioEngine18IsHeadsetConnectedEv @ 50 NONAME
+	_ZNK12CRadioEngine19FrequencySetByRdsAfEv @ 51 NONAME
+	_ZNK12CRadioEngine19GetPresetFrequencyLEi @ 52 NONAME
+	_ZNK12CRadioEngine19IsFlightModeEnabledEv @ 53 NONAME
+	_ZNK12CRadioEngine19RequestTunerControlEv @ 54 NONAME
+	_ZNK12CRadioEngine19UpdatedStartupCountEv @ 55 NONAME
+	_ZNK12CRadioEngine22IsAudioRoutingPossibleEv @ 56 NONAME
+	_ZNK12CRadioEngine23FillListWithRegionDataLER12CDesC16Array @ 57 NONAME
+	_ZNK12CRadioEngine7PubSubLEv @ 58 NONAME
+	_ZNK12CRadioEngine8IsInCallEv @ 59 NONAME
+	_ZNK12CRadioEngine8IsMuteOnEv @ 60 NONAME
+	_ZNK12CRadioEngine8RegionIdEv @ 61 NONAME
+	_ZNK12CRadioEngine9GetVolumeEv @ 62 NONAME
+	_ZNK14CFMRadioPubSub13PublishStateLEi @ 63 NONAME
+	_ZNK14CFMRadioPubSub17PublishFrequencyLEm @ 64 NONAME
+	_ZNK14CFMRadioPubSub19PublishChannelNameLERK7TDesC16 @ 65 NONAME
+	_ZNK14CFMRadioPubSub19PublishPresetCountLEi @ 66 NONAME
+	_ZNK14CFMRadioPubSub20PublishRDSRadioTextLERK7TDesC16 @ 67 NONAME
+	_ZNK14CFMRadioPubSub25PublishRDSProgramServiceLERK7TDesC16 @ 68 NONAME
+	_ZNK14CFMRadioPubSub31PublishApplicationRunningStateLE33TFMRadioPSApplicationRunningState @ 69 NONAME
+	_ZNK23CFMRadioRdsReceiverBase10RtPlusSongEv @ 70 NONAME
+	_ZNK23CFMRadioRdsReceiverBase11RtPlusAlbumEv @ 71 NONAME
+	_ZNK23CFMRadioRdsReceiverBase12RtPlusArtistEv @ 72 NONAME
+	_ZNK23CFMRadioRdsReceiverBase15SignalAvailableEv @ 73 NONAME
+	_ZNK23CFMRadioRdsReceiverBase16ProgrammeServiceEv @ 74 NONAME
+	_ZNK23CFMRadioRdsReceiverBase16RtPlusProgramUrlEv @ 75 NONAME
+	_ZNK23CFMRadioRdsReceiverBase24ProgrammeServiceNameTypeEv @ 76 NONAME
+	_ZNK23CFMRadioRdsReceiverBase25AutomaticSwitchingEnabledEv @ 77 NONAME
+	_ZTI12CRadioEngine @ 78 NONAME
+	_ZTI14CFMRadioPubSub @ 79 NONAME
+	_ZTI18CRadioStateHandler @ 80 NONAME
+	_ZTI24CFMRadioPropertyObserver @ 81 NONAME
+	_ZTI25CCentralRepositoryHandler @ 82 NONAME
+	_ZTI27CFMRadioSystemEventDetector @ 83 NONAME
+	_ZTV12CRadioEngine @ 84 NONAME
+	_ZTV14CFMRadioPubSub @ 85 NONAME
+	_ZTV18CRadioStateHandler @ 86 NONAME
+	_ZTV24CFMRadioPropertyObserver @ 87 NONAME
+	_ZTV25CCentralRepositoryHandler @ 88 NONAME
+	_ZTV27CFMRadioSystemEventDetector @ 89 NONAME
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/group/backup_registration.xml	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,6 @@
+<?xml version="1.0" standalone="yes"?>
+<backup_registration version="1.0">
+    <proxy_data_manager sid = "0x10202BE9" />
+    <restore requires_reboot = "no"/>
+</backup_registration>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/group/bld.inf	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,50 @@
+/*
+* Copyright (c) 2002-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:  Project build file for FMRadioEngine
+*
+*/
+
+
+#include <platform_paths.hrh>
+
+// Platforms the component needs to be built on
+//
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+// Source files which are copied to their following destinations
+../inc/fmradiointernalpskeys.h APP_LAYER_PLATFORM_EXPORT_PATH(fmradiointernalpskeys.h)
+
+//Backup registartion file
+backup_registration.xml  z:/private/2001b25e/backup_registration.xml
+
+// iby file
+../rom/fmradioengine.iby	CORE_APP_LAYER_IBY_EXPORT_PATH(fmradioengine.iby)
+
+// *.mmp files required for building the needed component
+//
+PRJ_MMPFILES
+fmradioengine.mmp
+
+
+// *.mmp files required for building any test programs
+//
+//PRJ_TESTMMPFILES
+//../internal/fmradioenginetest/tfmradioengine.mmp
+
+
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/group/fmradioengine.mmp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,91 @@
+/*
+* Copyright (c) 2002-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:  Project file for FMRadioEngine
+*
+*/
+
+
+#include <platform_paths.hrh>
+#include <data_caging_paths.hrh>
+#include "../../inc/fmradiovariant.hrh"
+
+TARGET        fmradioengine.dll
+TARGETTYPE    DLL
+CAPABILITY    CAP_GENERAL_DLL ReadUserData
+VENDORID      VID_DEFAULT
+UID           0x1000008D 0x2001B25E
+
+VERSION       10.0
+
+PAGED
+
+SOURCEPATH      ../data
+START RESOURCE  fmradioengine.rss
+HEADER
+TARGETPATH      RESOURCE_FILES_DIR
+LANGUAGE_IDS
+END  // RESOURCE
+
+
+SOURCEPATH    ../src
+SOURCE        fmradioengine.cpp
+SOURCE        fmradioenginecentralrepositoryhandler.cpp
+SOURCE        fmradioengineradiosettings.cpp
+SOURCE        fmradioengineradiostatehandler.cpp
+SOURCE        fmradiomobilenetworkinfolistener.cpp
+SOURCE        fmradiopropertyobserver.cpp
+SOURCE        fmradiopubsub.cpp
+SOURCE        fmradiordsreceiver.cpp
+SOURCE        fmradiordsreceiverbase.cpp
+SOURCE        fmradiordsreceiversimulator.cpp
+SOURCE        fmradioregion.cpp
+SOURCE        fmradiosystemeventdetector.cpp
+SOURCE        fmradioaccessoryconnection.cpp
+
+#ifndef __ACCESSORY_FW
+SOURCE        fmradioenginedosserverobserver.cpp
+#endif
+
+USERINCLUDE   ../cenrep
+USERINCLUDE   ../src
+USERINCLUDE   ../inc
+USERINCLUDE   ../../inc
+
+APP_LAYER_SYSTEMINCLUDE
+SYSTEMINCLUDE /epoc32/include/mmf/common
+#ifdef __FMRADIO_ADVANCED_AUTO_RESUME
+SYSTEMINCLUDE   /epoc32/include/internal
+#endif // __FMRADIO_ADVANCED_AUTO_RESUME
+
+LIBRARY radio_utility.lib
+LIBRARY fmpresetutility.lib
+LIBRARY cenrepnotifhandler.lib
+LIBRARY centralrepository.lib
+LIBRARY euser.lib
+LIBRARY estor.lib
+LIBRARY audiooutputrouting.lib
+LIBRARY cone.lib
+LIBRARY efsrv.lib
+LIBRARY bafl.lib
+LIBRARY etel.lib
+LIBRARY etelmm.lib
+LIBRARY commsdat.lib
+LIBRARY accclient.lib
+LIBRARY accpolicy.lib
+
+DEBUGLIBRARY    flogger.lib
+
+#ifdef __ACCESSORY_FW
+DEFFILE fmradioengineac.def
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/debug.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,53 @@
+/*
+* 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:  Central place for nice debug-type macros & functions
+*
+*/
+
+
+#ifndef DEBUG_H
+#define DEBUG_H
+
+//INCLUDES
+#include <f32file.h>
+#ifdef _DEBUG
+#define FTRACE(a) {a;}
+#define FDEBUGVAR(a) a
+#else
+#define FTRACE(a)
+#define FDEBUGVAR(a)
+#endif // _DEBUG
+
+
+    /**
+    * Declare the FPrint function
+    * @since Series 60 2.7
+    * @return none
+    */
+inline void FPrint(const TRefByValue<const TDesC> 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);
+   #ifdef _DEBUG
+   RDebug::Print(aFmt, tmpInt, tmpInt2, tmpInt3);
+   #endif
+   }
+
+#endif // DEBUG_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradioaccessoryconnection.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,99 @@
+/*
+* 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:  Observer of accessory connection.
+*
+*/
+
+#ifndef CFMRADIOACCESSORYCONNECTION_H
+#define CFMRADIOACCESSORYCONNECTION_H
+
+class TAccPolGenericIDArray;
+class MFMRadioHeadsetEventObserver;
+
+#include <e32base.h> // For CActive, link against: euser.lib
+#include <AccessoryServer.h> //For RAccessoryServer session
+#include <AccessoryConnection.h> //For RAccessoryConnection subsession
+
+NONSHARABLE_CLASS( CFMRadioAccessoryConnection ) : public CActive
+    {
+public:
+    // Cancel and destroy
+    ~CFMRadioAccessoryConnection();
+    
+    // Two-phased constructor.
+    static CFMRadioAccessoryConnection* NewL();
+    /**
+     * Sets observer. The observer will be notified when headset has been 
+     * pressed or headset is connected/disconnected.
+     *
+     * @param aObserver Observer
+     */
+    void SetObserver( MFMRadioHeadsetEventObserver* aObserver );
+    
+    /**
+     * Public boolean getter, return ETrue if 
+     * a wired headset is connected
+     */
+    TBool WiredHeadsetConnected();
+private:
+    /**
+     * C++ default constructor.
+     */
+    CFMRadioAccessoryConnection();
+    
+    /**
+     * Static constructor.
+     */
+    void ConstructL();
+    
+    /**
+     * Private boolean getter, return ETrue if 
+     * a wired headset is found in array of connected accessories
+     */
+    TBool WiredHeadsetInArrayL();
+    
+    /**
+     * Private boolean getter, return ETrue if 
+     * a wired headset is found in first index of
+     * array of connected accessories.
+     */
+    TBool WiredHeadsetFirstInArrayL();
+    
+    /**
+     * From CActive
+     *
+     * @see CActive::RunL()
+     */
+    void RunL();
+    
+    /**
+     * From CActive
+     *
+     * @see CActive::DoCancel()
+     */        
+    void DoCancel();
+    
+private:
+    /** 
+     * Instance that gets notifications of the headset state changes 
+     */
+    MFMRadioHeadsetEventObserver* iObserver;
+    TBool iWiredHeadsetConnected;
+    TInt iAccessoryCount;
+    RAccessoryServer iAccessoryServer;
+    RAccessoryConnection iAccessoryConnection;
+    TAccPolGenericIDArray iAccessoryArray;
+    };
+#endif // CFMRADIOACCESSORYCONNECTION_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradioaudioutils.hrh	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,30 @@
+/*
+* 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: FM Radio audio related definitions
+*
+*/
+
+#ifndef FMRADIOAUDIOUTILS_HRH
+#define FMRADIOAUDIOUTILS_HRH
+
+/**
+* Output sources.
+*/
+enum TFMRadioOutputDestination
+	{
+	EFMRadioHeadset = 0,  /**< Headset in use. */
+	EFMRadioSpeaker = 1   /**< Speaker in use. */
+	};
+
+#endif // FMRADIOAUDIOUTILS_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradiocontroleventobserver.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,191 @@
+/*
+* 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:  Declaration for the control event observer interface
+*
+*/
+
+#ifndef MFMRADIOCONTROLEVENTOBSERVER_H
+#define MFMRADIOCONTROLEVENTOBSERVER_H
+
+#include "fmradioaudioutils.hrh"
+#include "fmradiosystemutils.h"
+
+/**
+ *  MFMRadioControlEventObserver
+ *
+ *  MFMRadioControlEventObserver defines observer interface for FM Radio control events.
+ */
+class MFMRadioControlEventObserver
+    {
+    
+public:
+        
+    /**
+     * Called when "step to channel" request occurs.
+     *
+     * @param aDirection EFMRadioUp for stepping up, EFMRadioDown for stepping down
+     */
+    virtual void StepToChannelL( TFMRadioTuneDirection aDirection ) = 0;
+    
+    /**
+     * Called when "set channel" request occurs.
+     *
+     * @param aChannelId Channel id to set
+     */
+    virtual void SetChannelL( TInt aChannelId ) = 0;
+    
+    /**
+     * Called when "seek" request occurs.
+     *
+     * @param aDirection If EFMRadioUp seeks up, otherwise seeks down
+     */
+    virtual void SeekL( TFMRadioTuneDirection aDirection ) = 0;
+
+    /**
+     * Called when "step to frequency up" request occurs.
+     *
+     * @param aDirection EFMRadioUp for stepping up, EFMRadioDown for stepping down
+     */
+    virtual void StepToFrequencyL( TFMRadioTuneDirection aDirection ) = 0;
+    
+    /**
+     * Called when "set frequency" request occurs.
+     *
+     * @param aFreq Frequency to set
+     */
+    virtual void SetFrequencyL( TUint32 aFreq ) = 0;
+    
+    /**
+     * Called when "adjust volume" request occurs.
+     *
+     * @param aDirection If EFMRadioDecVolume decreases, otherwise increases 
+     * volume
+     */
+    virtual void AdjustVolumeL( TFMRadioVolumeSetDirection aDirection ) = 0;
+    
+    /**
+     * Called when "mute" request occurs.
+     * 
+     * @param aMute if ETrue mutes, else unmutes radio
+     */
+    virtual void MuteL( TBool aMute ) = 0;
+
+    /**
+    * Called when "play" request occurs.
+    *
+    * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
+    */
+    virtual void PlayL( TBool aDownPressed ) = 0;
+
+    /**
+     * Called when "pause" request occurs.
+     *
+     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
+     */
+    virtual void PauseL(TBool aDownPressed ) = 0;
+
+    /**
+     * Called when "play", "pause" or "pauseplay" request occurs.
+     *
+     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
+     */
+    virtual void PausePlayL( TBool aDownPressed ) = 0;
+    
+    /**
+     * Called when "stop" request occurs.
+     *
+     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
+     */
+    virtual void StopL( TBool aDownPressed ) = 0;
+    
+    /**
+     * Called when "forward" request occurs.
+     *
+     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
+     */
+    virtual void ForwardL( TBool aDownPressed ) = 0;
+    
+    /**
+     * Called when "fast forward" request occurs.
+     *
+     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
+     */
+    virtual void FastForwardL( TBool aDownPressed ) = 0;
+    
+    /**
+     * Called when "backward" request occurs.
+     *
+     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
+     */
+    virtual void BackwardL( TBool aDownPressed ) = 0;
+    
+    /**
+     * Called when "rewind" request occurs.
+     *
+     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
+     */
+    virtual void RewindL( TBool aDownPressed ) = 0;
+    
+    /**
+     * Called when "channel up" request occurs.
+     *
+     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
+     */
+    virtual void ChannelUpL( TBool aDownPressed ) = 0;
+    
+    /**
+     * Called when "channel down" request occurs.
+     *
+     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
+     */
+    virtual void ChannelDownL( TBool aDownPressed ) = 0;
+    
+    /**
+     * Called when "volume up" request occurs.
+     *
+     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
+     */
+    virtual void VolumeUpL( TBool aDownPressed ) = 0;
+    
+    /**
+     * Called when "volume down" request occurs.
+     *
+     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
+     */
+    virtual void VolumeDownL( TBool aDownPressed ) = 0;
+    
+    /**
+     * Called when "change view" request occurs
+     *
+     * @param aViewId the id of activated view
+     * @param aForceChange if ETrue, view changing is forced and state 
+     * of FM Radio is not checked
+     */
+    virtual void ChangeViewL(TUid aViewId, TBool aForceChange) = 0;
+    
+    /**
+     * Called when output source is changed
+     * @param aDestination the current output source
+     */
+    virtual void SetAudioOutputDestinationL(TFMRadioOutputDestination aDestination) = 0;
+    
+    /**
+     * Called when headset button answer/end call is pressed
+     */
+    virtual void AnswerEndCallL() = 0;
+    };
+
+#endif      // MFMRADIOCONTROLEVENTOBSERVER_H   
+            
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradioengine.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,845 @@
+/*
+* 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:  The class implements the core functionality of the
+*                Radio Engine
+*
+*/
+
+
+#ifndef FMRADIOENGINE_H
+#define FMRADIOENGINE_H
+
+#include <e32base.h>
+#include <fmradiointernalpskeys.h>
+#include <RadioUtility.h>
+#include <RadioFmTunerUtility.h>
+#include <RadioPlayerUtility.h>
+#include <RadioPresetUtility.h>
+#include <RadioFmPresetUtility.h>
+
+#include "fmradiosystemeventdetectorobserver.h"
+#include "fmradionetworkchangeobserver.h"
+#include "fmradiordsobserver.h"
+#include "fmradioengine.hrh"
+#include "fmradioheadseteventobserver.h"
+
+#ifndef __ACCESSORY_FW
+#include <DosSvrServices.h>
+#endif
+
+// CONSTANTS
+const TUint8 KPresetNameLength = 32;
+const TInt KDefaultRadioFrequency = 87500000;
+_LIT(KFMRadioEngineResourceFile, "fmradioengine.rsc");
+const TInt KFMRadioFreqMultiplier = 1000;
+
+// FORWARD DECLARATIONS
+class CAudioOutput;
+class CCentralRepositoryHandler;
+class CDesC16Array;
+class CFMRadioAccessoryConnection;
+class CFMRadioContextPublisher;
+class CFMRadioMobileNetworkInfoListener;
+class CFMRadioPubSub;
+class CFMRadioRdsReceiverBase;
+class CFMRadioSystemEventDetector;
+class CRadioStateHandler;
+class MRadioEngineStateChangeCallback;
+class TRadioSettings;
+
+#ifndef __ACCESSORY_FW
+class RDosServer;
+class CDosServerObserver;
+#endif
+
+// CLASS DECLARATION
+
+/**
+ * This class implements the core functionality of the Radio Engine
+ *
+ * @since S60 3.2
+ */
+class CRadioEngine : public CBase,
+                     public MRadioPlayerObserver,
+                     public MRadioFmTunerObserver,
+                     public MRadioPresetObserver,
+                     public MFMRadioSystemEventDetectorObserver,
+                     public MFMRadioNetworkChangeObserver,
+                     public MFMRadioRdsObserver,
+                     public MFMRadioHeadsetEventObserver
+
+    {
+public:
+
+    typedef TBuf<KPresetNameLength> TStationName;
+
+    enum TRadioMode
+        {
+        ERadioTunerMode,
+        ERadioPresetMode
+        };
+
+    enum TFMRadioAudioMode
+        {
+        EFMRadioStereo = 0,
+        EFMRadioMono
+        };
+
+    enum TFMRadioAudioOutput
+        {
+        EFMRadioOutputHeadset = 0,
+        EFMRadioOutputIHF
+        };
+    
+public:
+
+    /**
+    * Two-phased class constructor.
+    * @return pointer to CRadioEngine class instance
+    */
+    IMPORT_C static CRadioEngine* NewL( MRadioEngineStateChangeCallback& aCallback );
+    /**
+    * Destructor of CRadioEngine class.
+    */
+    IMPORT_C virtual ~CRadioEngine();
+
+public: // New functions
+
+    /**
+    * Set radio settings to their default values.
+    * @since Series 60 3.0
+    * @return none
+    */
+    IMPORT_C void InitializeRadio();
+    /**
+    * Retrieves the current radio mode .
+    * @since Series 60 3.0
+    * @return tune/preset
+    */
+    IMPORT_C TRadioMode GetRadioMode() const;
+
+    /**
+    * Gets the current audio mode.
+    * @since Series 60 3.0
+    * @return stereo/mono
+    * @retval 0 = stereo
+    * @retval 1 = mono
+    */
+    IMPORT_C TInt GetAudioMode() const;
+
+    /**
+    * Set the radio's audio mode.
+    * @since Series 60 3.0
+    * @param aAudioMode the new audio mode
+    * @return none
+    */
+    IMPORT_C void SetAudioMode( const TFMRadioAudioMode aAudioMode );
+
+    /**
+    * get the currently selected channel index.
+    * @since Series 60 3.0
+    * @return none
+    */
+    IMPORT_C TInt GetPresetIndex() const;
+
+    /**
+    * Update the channel located at the index to use the frequency specified.
+    * @since Series 60 3.0
+    * @param aIndex index into the channel array.
+    * @param aStationName name of the channel
+    * @param aFrequency frequency value to be used.
+    * @return none
+    */
+    IMPORT_C void SetPresetNameFrequencyL( TInt aIndex, const TStationName& aStationName, TInt aFrequency );
+
+    /**
+    * Retrieve the channel frequency at the index specified
+    * @since Series 60 3.0
+    * @param aIndex  index into the channel array.
+    * @return the frequency
+    */
+    IMPORT_C TInt GetPresetFrequencyL(TInt aIndex) const;
+
+    /**
+    * Retrieve the channel name at the index specified
+    * @since Series 60 3.0
+    * @param aIndex  index into the channel array.
+    * @return the channel name
+    */
+    IMPORT_C CRadioEngine::TStationName& GetPresetNameL( TInt aIndex );
+    
+    /**
+    * Retrieve the channel name and the frequency at the index specified
+    * @param aIndex station index
+    * @param aName stored station name
+    * @param aFrequency preset frequency
+    */
+    IMPORT_C void GetPresetNameAndFrequencyL( TInt aIndex, TDes& aName, TInt& aFrequency );
+
+    /**
+    * Starts the radio.
+    * @since Series 60 3.0
+    * @return none
+    */
+    IMPORT_C void RadioOn();
+
+    /**
+    * Stops the radio.
+    * @since Series 60 3.0
+    * @return none
+    */
+    IMPORT_C void RadioOff();
+
+    /**
+     * Returns the radio status
+     * @since ??
+     * @return ETrue = radio is on, EFalse = radio is off
+     */
+    IMPORT_C TBool IsRadioOn();
+    
+    /**
+     * Checks if offine profile is current active profile
+     * @since ??
+     * @return True / False
+     */
+    IMPORT_C TBool IsOfflineProfileL();
+    
+    /**
+    * Tune to the specified frequency
+    * @since Series 60 3.0
+    * @param aFrequency - frequency to lock onto.
+    * @param aRadioMode - The radio mode to be used. Tuner mode by default
+    * @return none
+    */
+    IMPORT_C void Tune( TInt aFrequency, TRadioMode aRadioMode = ERadioTunerMode );
+    
+    /*
+     * Sets tuner mode on i.e. preset channel is not active.
+     * Active preset Channel P&S data is also cleared.
+     * Useful for example when preset channel is deleted.
+     */
+    IMPORT_C void SetTunerModeOn();
+    
+    /**
+    * Scan up to the next available frequency.
+    * @since Series 60 3.0
+    * @return none
+    */
+    IMPORT_C void ScanUp();
+
+    /**
+    * Scan down to the last available frequency.
+    * @since Series 60 3.0
+    * @return none
+    */
+    IMPORT_C void ScanDown();
+
+    /**
+    * Cancel previously requested scan, and
+    * return to the already tuned frequency.
+    * @since Series 60 3.0
+    * @return none
+    */
+    IMPORT_C void CancelScan();
+
+    /**
+    * Sets the audio mute state
+    * @since Series 60 3.0
+    * @param aMuteOn - flag to determine whether mute should be turned on or off
+    * @return none
+    */
+    IMPORT_C void SetMuteOn(TBool aMuteOn);
+
+    /**
+    * Gets the audio mute state
+    * @since Series 60 3.0
+    * @return ETrue or EFalse to indicate whether mute is currently on.
+    */
+    IMPORT_C TBool IsMuteOn() const;
+
+    /**
+    * Sets the volume level of the FM radio
+    * @since Series 60 3.0
+    * @param aVolume - the volume to be used.
+    * @return none
+    */
+    IMPORT_C void SetVolume(TInt aVolume);
+
+    /**
+    * Gets the volumelevel.
+    * @since Series 60 3.0
+    * @return the current volume
+    */
+    IMPORT_C TInt GetVolume() const;
+
+    /**
+    * Gets the max volumelevel.
+    * @since Series 60 3.0
+    * @return the max volume
+    */
+    IMPORT_C TInt GetMaxVolume() const;
+
+    /**
+    * Sets the audio Output
+    * @since Series 60 3.0
+    * @param aAudioOutput - where should the audio be routed?
+    * @return none
+    */
+    IMPORT_C void SetAudioOutput( const TFMRadioAudioOutput aAudioOutput );
+
+    /**
+    * Sets the rds af search enabled
+    * @param aEnabled ETrue if rds af search is enabled; EFalse otherwise.
+    * @return none
+    */
+    IMPORT_C void SetRdsAfSearchEnable( TBool aEnabled );
+     
+     /**
+     * Check whether flight mode is currently enabled
+     * @since Series 60 3.0
+     * @return ETrue or EFalse dependent on whether flightmode is enabled
+     */
+     IMPORT_C TBool IsRdsAfSearchEnabled() const;
+     
+     /**
+      * @return reference to settings
+      */
+     IMPORT_C TRadioSettings& RadioSettings( );
+     
+    /**
+    * Retrieve the current audio output
+    * @since Series 60 3.0
+    * @return EFMRadioOutputIHF or EFMRadioOutputHeadset
+    */
+    IMPORT_C TFMRadioAudioOutput GetAudioOutput() const;
+
+    /**
+    * Tunes to the chosen channel.
+    * @since Series 60 3.0
+    * @param aIndex - the index number of the channel you wish to tune to.
+    * @return none
+    */
+    IMPORT_C void TunePresetL(TInt aIndex);
+
+    /**
+    * Retrieves the current frequency.
+    * @since Series 60 3.0
+    * @return the frequency
+    */
+    IMPORT_C TInt GetTunedFrequency() const;
+
+    /**
+    * Check whether flight mode is currently enabled
+    * @since Series 60 3.0
+    * @return ETrue or EFalse dependent on whether flightmode is enabled
+    */
+    IMPORT_C TBool IsFlightModeEnabled() const;
+
+    /**
+    * Get the frequency range (in Hertz) of the specified band.
+    * This function should be used to enquire the frequency range
+    * of the bands that GetCapabilities reports as supported.
+    * @since Series 60 3.0
+    * @param aBottomFrequency The variable to set to the lowest frequency allowed
+    * @param aTopFrequency The variable to set to the highest frequency allowed
+    * @return A standard system error code
+    **/
+    IMPORT_C TInt GetFrequencyBandRange( TInt& aBottomFrequency, TInt& aTopFrequency );
+
+    /**
+    * Check whether call is in progress
+    * @since Series 60 3.1
+    * @return ETrue or EFalse to indicate whether call is in progress
+    */
+    IMPORT_C TBool IsInCall() const;
+    
+    /**
+    * Has the frequency been set by RDS AF search or not.
+    *
+    * @return ETrue if frequency was set by RDS AF, otherwise EFalse
+    */
+    IMPORT_C TBool FrequencySetByRdsAf() const;
+
+    /**
+    * Getter for RDS receiver
+    *
+    * @return Reference to CFMRadioRdsReceiver
+    */
+    IMPORT_C CFMRadioRdsReceiverBase& RdsReceiver();
+    /**
+    * Notifies UI that the headset button has been pressed
+    */
+    void HandleHeadsetButtonPress();
+    /**
+    * Switches the engine into flight mode, and notifies the UI of
+    * the change in status.
+    */
+    void HandleFlightModeEnabled();
+    /**
+    * Switches the engine out of flight mode, and notifies the UI of
+    * the change in status
+    */
+    void HandleFlightModeDisabled();
+    /**
+    * Calls the User Interface callback function, indicating the event code and
+    * error code.
+    */
+    void HandleCallback(TInt aEventCode, TInt aErrorCode );
+
+    /**
+    * Gets the headset status
+    * @return ETrue if headset connected
+    */
+    IMPORT_C TBool IsHeadsetConnected() const;
+
+    /**
+     * From MRadioPlayerObserver.
+     * Called when Radio state changed.
+     *
+     * @since S60 3.2
+     * @param aState Radio player state
+     * @param aError A standard system error code, only used when aState is ERadioPlayerIdle
+     */
+    void MrpoStateChange( TPlayerState aState, TInt aError );
+
+    /**
+     * From MRadioPlayerObserver.
+     * Called when volume changes. This may be caused by other applications.
+     *
+     * @since S60 3.2
+     * @param aVolume Current volume.
+     */
+    void MrpoVolumeChange( TInt aVolume );
+
+    /**
+     * From MRadioPlayerObserver.
+     * Called when mute setting changes. This may be caused by other applications.
+     *
+     * @since S60 3.2
+     * @param aMute ETrue indicates audio is muted.
+     */
+    void MrpoMuteChange( TBool aMute );
+
+    /**
+     * From MRadioPlayerObserver.
+     * Called when mute setting changes. This may be caused by other applications.
+     *
+     * Called when balance setting changes. This may be caused by other applications.
+     *
+     * @since S60 3.2
+     * @param aLeftPercentage
+     *        Left speaker volume percentage. This can be any value from zero to 100.
+     *        Zero value means left speaker is muted.
+     * @param aRightPercentage
+     *        Right speaker volume percentage. This can be any value from zero to 100.
+     *        Zero value means right speaker is muted.
+     */
+    void MrpoBalanceChange( TInt aLeftPercentage, TInt aRightPercentage );
+
+
+    /**
+     * From MRadioFmTunerObserver.
+     * Called when Request for tuner control completes.
+     *
+     * @since S60 3.2
+     * @param aError A standard system error code or FM tuner error (TFmRadioTunerError).
+     */
+    void MrftoRequestTunerControlComplete( TInt aError );
+
+    /**
+     * From MRadioFmTunerObserver.
+     * Set frequency range complete event. This event is asynchronous and is received after
+     * a call to CRadioFmTunerUtility::SetFrequencyRange.
+     *
+     * @since S60 3.2
+     * @param aError A standard system error code or FM tuner error (TFmRadioTunerError).
+     */
+    void MrftoSetFrequencyRangeComplete( TInt aError );
+
+    /**
+     * From MRadioFmTunerObserver.
+     * Set frequency complete event. This event is asynchronous and is received after a call to
+     * CRadioFmTunerUtility::SetFrequency.
+     *
+     * @since S60 3.2
+     * @param aError A standard system error code or FM tuner error (TFmRadioTunerError).
+     */
+    void MrftoSetFrequencyComplete( TInt aError );
+
+    /**
+     * From MRadioFmTunerObserver.
+     * Station seek complete event. This event is asynchronous and is received after a call to
+     * CRadioFmTunerUtility::StationSeek.
+     *
+     * @since S60 3.2
+     * @param aError A standard system error code or FM tuner error (TFmRadioTunerError).
+     * @param aFrequency The frequency(Hz) of the radio station that was found.
+     */
+    void MrftoStationSeekComplete( TInt aError, TInt aFrequency );
+
+    /**
+     * From MRadioFmTunerObserver.
+     * Called when FM Transmitter status changes (if one is present in the device). Tuner receiver
+     * is forced to be turned off due to hardware conflicts when FM transmitter is activated.
+     *
+     * @since S60 3.2
+     * @param aActive ETrue if FM transmitter is active; EFalse otherwise.
+     */
+    void MrftoFmTransmitterStatusChange( TBool aActive );
+
+    /**
+     * From MRadioFmTunerObserver.
+     * Called when antenna status changes.
+     *
+     * @since S60 3.2
+     * @param aAttached ETrue if antenna is attached; EFalse otherwise.
+     */
+    void MrftoAntennaStatusChange( TBool aAttached );
+
+    /**
+     * From MRadioFmTunerObserver.
+     * Called when offline mode status changes.
+     * @since S60 3.2
+     *
+     * @param aOfflineMode ETrue if offline mode is enabled; EFalse otherwise.
+     */
+    void MrftoOfflineModeStatusChange( TBool aOfflineMode );
+
+    /**
+     * From MRadioFmTunerObserver.
+     * Called when the frequency range changes. This may be caused by other applications.
+     *
+     * @since S60 3.2
+     * @param aBand New frequency range.
+     */
+    void MrftoFrequencyRangeChange(TFmRadioFrequencyRange aBand );
+
+    /**
+     * From MRadioFmTunerObserver.
+     * Called when the tuned frequency changes. This may be caused by other
+     * applications or RDS if AF/TA is enabled.
+     *
+     * @since S60 3.2
+     * @param aNewFrequency The new tuned frequency(Hz).
+     */
+    void MrftoFrequencyChange( TInt aNewFrequency );
+
+    /**
+     * From MRadioFmTunerObserver.
+     * Called when the forced mono status change. This may be caused by other applications.
+     *
+     * @since S60 3.2
+     * @param aForcedMono ETrue if forced mono mode is enabled; EFalse otherwise.
+     */
+    void MrftoForcedMonoChange( TBool aForcedMono );
+
+    /**
+     * From MRadioFmTunerObserver.
+     * Called when the squelch (muting the frequencies without broadcast) status change.
+     * This may be caused by other applications.
+     *
+     * @since S60 3.2
+     * @param aSquelch ETrue if squelch is enabled; EFalse otherwise.
+     */
+    void MrftoSquelchChange( TBool aSquelch );
+
+    /**
+     * From MRadioPresetObserver.
+     * Called when a preset changes.
+     *
+     * NOTE: EPresetDeleted with aIndex == 0, indicates that all presets have been deleted.
+     *
+     * @since S60 3.2
+     * @param aChange Change event type
+     * @param aIndex Index to the preset that has changed. Zero means all presets.
+     */
+    void MrpeoPresetChanged( TPresetChangeEvent aChange, TInt aIndex );
+     /**
+ 	* From base class MFMRadioSystemEventDetectorObserver
+	* This callback notifies when networks comes up.
+	*/
+	void NetworkUpCallbackL();
+	/**
+	* From base class MFMRadioSystemEventDetectorObserver
+	* This callback notifies when network goes down.
+	*/
+	void NetworkDownCallbackL();
+	
+	/**
+	* From base class MFMRadioSystemEventDetectorObserver
+	* This callback notifies when audio resources become available.
+	*/
+	void AudioResourcesAvailableL();
+	
+	/**
+    * From base class MFMRadioSystemEventDetectorObserver
+	* This callback notifies when audio auto resuming is forbidden.
+	*/
+	void AudioAutoResumeForbiddenL();
+	/**
+	* From base class MFMRadioSystemEventDetectorObserver
+	* This callback notifies when call becomes active.
+	*/
+	void CallActivatedCallbackL();
+
+	/**
+	* From base class MFMRadioSystemEventDetectorObserver
+	* This callback notifies when call becomes deactive.
+	*/
+	void CallDeactivatedCallbackL();	
+	/**
+    * From base class MFMRadioNetworkChangeObserver
+    * 
+    * @see MFMRadioNetworkChangeObserver::NetworkIdChanged();
+    */
+    void NetworkIdChanged();
+
+    // from base class MFMRAdioRdsObserver
+    void RdsDataProgrammeService( const TDesC& aProgramService );
+    void RdsDataPsNameIsStatic( TBool aStatic );
+    void RdsDataRadioText( const TDesC& aRadioText );
+    void RdsDataRadioTextPlus( const TInt aRTPlusClass, const TDesC& aRadioTextPlus );
+    
+    void RdsAfSearchBegin();
+    void RdsAfSearchEnd( TUint32 aFrequency, TInt aError );
+    void RdsAfSearchStateChange( TBool aEnabled );
+    void RdsAvailable( TBool aAvailable );
+    	
+	// from MFMRadioHeadsetEventObserver
+	void HeadsetAccessoryConnectedCallbackL();
+	void HeadsetAccessoryDisconnectedCallbackL();
+		
+	/**
+    * Initialize fmradioengine resource file information
+    */
+	void InitializeResourceLoadingL();	
+	/**
+    * Convert FMRadio region info to frequency range used by fmradiotunerutility
+    * @param aRegionId fmradio region
+    * @return frequency range used by fmradiotunerutility
+    */
+	TFmRadioFrequencyRange TunerFrequencyRangeForRegionId( const TInt aRegionId ) const;
+	/**
+    * Determine current region
+    * @return fmradio region
+    */
+	IMPORT_C TFMRadioRegionSetting GetRegionL() const;
+	/**
+    * fill the given list with fmradio regions
+	* @param aArray array to add regions
+    */
+	IMPORT_C void FillListWithRegionDataL( CDesC16Array& aArray ) const;
+	/**
+    * Returns region from the array of supported regions
+    * @param aIndex index for region
+    * @return fmradio region
+    */
+	IMPORT_C TFMRadioRegionSetting RegionIdAtIndex( const TInt aIndex ) const;
+	/**
+    * Returns current region Id
+    * @return current region Id.
+    */
+	IMPORT_C TInt RegionId() const;
+	/**
+    * Change current region
+    * @param aRegion region to set
+    */
+	IMPORT_C void SetRegionIdL( TInt aRegion ) const;
+	/**
+    * Request tuner control from fmradiotunerutility
+    */
+	IMPORT_C void RequestTunerControl() const;
+	/**
+    * Returns decimal count for current region MHz information
+    * @return decimal count for current region
+    */
+	IMPORT_C TInt DecimalCount() const;
+	/**
+    * Return step size for tuning.
+    * @return step size
+    */
+	IMPORT_C TUint32 FrequencyStepSize() const;
+	/**
+    * Returns a reference to P&S interface.
+    * Method leaves if iPubSub is not allocated
+    *
+    * @return PS& interface.
+    */	
+	IMPORT_C CFMRadioPubSub& PubSubL() const;
+	/**
+	* increases startup count by one and returns amount of app startups.
+	* 
+	* @return app startup count
+	*/
+	IMPORT_C TInt UpdatedStartupCount() const;
+	/**
+    * Cancel seek and notify UI
+    */
+    IMPORT_C void CancelScanLocalStationsScan();
+	/**
+     * Is routing between loudspeaker and headset possible
+     *
+     * @return ETrue, if routing is possible
+     */
+    IMPORT_C TBool IsAudioRoutingPossible() const;
+	
+    /**
+     * Has RT+ interaction tutorial dialog been shown to user.
+     * 
+     * @return ETrue after the first time user sees the dialog.
+     */
+    IMPORT_C TBool MusicStoreNoteDisplayed();
+    
+    /**
+     * Sets music store tutorial note displayed value to true.
+     * It needs to be false only before supported RT+ features
+     * become available for the first time.
+     */
+    IMPORT_C void SetMusicStoreNoteDisplayed();
+    
+    /**
+     * Get level of support for RT+ interactions.
+     * Values are defined in fmradioengine.hrh:TFMRadioRTPlusLevel.
+     * 
+     * @return which interactions are supported as a TFMRadioRTPlusLevel value
+     */
+    IMPORT_C TFMRadioRTPlusLevel GetRTPlusSupportLevel();
+        
+    /**
+     * Sets the currently active preset index
+     * @param aIndex new active preset index
+     */    
+    IMPORT_C void SetCurrentPresetIndex( const TInt aIndex );
+    
+    /* Gets saved preset url.
+     * @param aIndex channel index
+     * @param aUrl string to be modified with saved url
+     * @return error code. KErrNotFound if no url is saved or KErrOverflow
+     * if the aUrl is not big enough. See TFmPresetName
+     */
+    IMPORT_C TInt PresetUrlL( TInt aIndex, TDes& aUrl );
+    
+    /*
+     * Delete preset. With index -1 all preset are reseted
+     * @param aIndex index to delete
+     */
+    IMPORT_C void DeletePresetL( TInt aIndex ); 
+    
+    /*
+     * Saves given url to preset
+     * @param aIndex channel index
+     * @param aUrl url to save 
+     */
+    IMPORT_C void SaveUrlToPresetL( TInt aIndex, const TDesC& aUrl );
+    
+private:
+
+    /**
+    * Default class constructor.
+    */
+    CRadioEngine( MRadioEngineStateChangeCallback& aCallback );
+
+    /**
+    * Second phase class constructor.
+    */
+    void ConstructL();
+    
+    /**
+     * Updates the frequency into settings and P&S
+     * 
+     * @param aFrequency The frequency to be set
+     */
+    void StoreAndPublishFrequency( TInt aFrequency );
+    
+    // internal radio engine states
+    enum TRadioEngineState
+        {
+        EStateRadioOff,
+        EStateRadioOn,
+        };
+    
+    // internal state of the tuner control
+    enum TRadioTunerControlState
+        {
+        EStateRadioTunerControlUninitialized,
+        EStateRadioTunerControlOn,
+        EStateRadioTunerControlOff
+        };
+    
+private:
+   
+    // The Radio Utility
+    CRadioUtility* iRadioUtility; // own
+    // The Tuner Utility
+    CRadioFmTunerUtility* iFmTunerUtility;
+    // The Player Utility
+    CRadioPlayerUtility* iPlayerUtility;
+    // The Preset Utility
+    CRadioFmPresetUtility* iPresetUtility; // own
+    // Receives and notifies of the RDS data
+    CFMRadioRdsReceiverBase* iRdsReceiver;  
+    // Capabilities of the tuner
+    TFmTunerCapabilities iTunerCaps;
+    // Multiplier used to scale UI volume setting to volume level used by the player utility 
+    TReal iUiVolumeFactor;
+     // pointer to DosServerObserver
+#ifndef __ACCESSORY_FW
+    CDosServerObserver *iDosServerObserver; //own
+#endif
+    // Audio routing API
+    CAudioOutput* iAudioOutput; //own
+    // pointer to CCentralRepositoryHandler
+    CCentralRepositoryHandler* iCentralRepositoryHandler; // own
+    // Used to provide async behavior in some callbacks
+    CRadioStateHandler *iStateHandler;
+    // flag to indicate if a call is in progress
+    TBool iInCall;
+    // pointer to TRadioSettings
+    TRadioSettings* iRadioSettings; // own
+    // the current radio state
+    TRadioEngineState iCurrentRadioState;
+    // a reference of MRadioEngineStateChangeCallback object
+    MRadioEngineStateChangeCallback& iCallback;
+    // temperary frequency
+    TInt iTempFrequency;
+    // a flag indicating if tune prset is requestd
+    TBool iTunePresetRequested;
+    // Indicates a request to initialized the radio is pending
+    TBool iInitializeRadioRequestExists;
+    // Indicates if the tuner control has been granted.
+    TRadioTunerControlState iTunerControl;
+    // High and low frequency of the current band.
+    TInt iBottomFrequency;
+    TInt iTopFrequency;
+    // ETrue if frequency was set by RDS AF
+    TBool iFrequencySetByRdsAf;
+    //Listens changes in network availability
+    CFMRadioSystemEventDetector* iSystemEventDetector;
+    // for fmradio engine resource file
+    TInt iFMRadioEngineResourceOffset;
+    //Listens changes in network ID and country code 
+    CFMRadioMobileNetworkInfoListener* iNetworkInfoListener;
+    //P&S interaction interface for FMRadio actions.
+    CFMRadioPubSub* iPubSub;
+    // accessory observer
+    CFMRadioAccessoryConnection* iHeadsetObserver;
+    // for storing station name for method GetPresetNameL
+    TStationName iStationName;
+    // Local cache for tuning state so that it doesn't get published before should
+    TFMRadioPSTuningState iTuningState;
+    };
+
+#endif  //FMRADIOENGINE_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradioengine.hrh	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,38 @@
+/*
+* 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:  Declaration of radio related enumerations
+*
+*/
+
+
+#ifndef FMRADIOENGINE_HRH
+#define FMRADIOENGINE_HRH
+
+/** Regions*/
+enum TFMRadioRegionSetting
+    {
+    EFMRadioRegionNone = -1,
+    EFMRadioRegionDefault,
+    EFMRadioRegionJapan,
+    EFMRadioRegionAmerica,
+    EFMRadioRegionPoland
+    };
+
+enum TFMRadioRTPlusLevel
+    {
+    EFMRadioMusicStoreOnly = 0,
+    EFMRadioAllInteractions
+    };
+
+#endif // FMRADIOENGINE_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradioenginecentralrepositoryhandler.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,170 @@
+/*
+* 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:  Defines APIs to communicate with Central Repository
+*
+*/
+
+
+#ifndef FMRADIOENGINECENTRALREPOSITORYHANDLER_H
+#define FMRADIOENGINECENTRALREPOSITORYHANDLER_H
+
+//  INCLUDES
+#include "fmradioregion.h"
+
+// CONSTANTS
+const TInt KBufferLength = 20;
+const TInt KStreamBufferSize = 100;
+
+// Forward declare implementation class
+class TRadioSettings;
+class CRepository;
+
+// CLASS DECLARATION
+
+/**
+*  it is a wrapper of Central Repository, responsible for the operations that need to access 
+*  the central respositorhy.
+*
+*  @lib FMRadioEngine.lib
+*  @since Series 60 3.0_version
+*/
+class CCentralRepositoryHandler : public CBase
+    {
+    public:
+      	/**
+      	* Two-phased class constructor.
+      	* @param aRadioSettings  pointer to the CRadioSettings class
+      	*/
+        static CCentralRepositoryHandler* NewL(TRadioSettings& aRadioSettings);
+      	/**
+      	* Destructor of CCentralRepositoryHandler class.
+      	*/
+        virtual ~CCentralRepositoryHandler();
+    public:
+      	/**
+      	* Save all engine related persistent info back to Central Repository
+        * @since Series 60 3.0
+      	* @return none
+      	*/
+        void SaveEngineSettings();
+        
+	    TInt CountRegions() const;
+	    CFMRadioRegion& Region( TInt aIndex ) const;
+	    TInt RegionId() const;
+	    TUint32 FrequencyStepSize() const;
+	    TUint32 MaxFrequency() const;
+	    TUint32 MinFrequency() const;
+	    TInt DecimalCount() const;
+	    
+	    void SetRegionIdL( TInt aRegion );
+	    
+	    /**
+	     * Determines if RT+ interaction tutorial dialog has been shown.
+	     * See CFMRadioEngine::MusicStoreNoteDisplayed().
+	     */
+	    TBool MusicStoreNoteDisplayed();
+	    /**
+	     * Sets RT+ interaction tutorial dialog as displayed.
+	     * See CFMRadioEngine::SetMusicStoreNoteDisplayed().
+	     */
+	    void SetMusicStoreNoteDisplayed();
+	    /**
+	     * Gets supported RT+ interactions. See CFMradioEngine::GetRTPlusSupportLevel().
+	     */
+	    TInt GetRTPlusSupportLevel();
+	    
+	    /**
+		* Checks if offine profile is current active profile
+		* @return true/false 
+		*/
+		TBool IsOfflineProfileActiveL();
+		/**
+		* Increases startup time by one and returns amount of program startups.
+		* Also updates count to the repository.
+		*/
+		void IncreaseStartupCount() const;
+		/*
+		* Save headset volume level to the repository
+		*/
+		void SaveHeadsetVolumeSetting() const;
+		/*
+		* Save speaker volume level to the repository
+		*/
+		void SaveSpeakerVolumeSetting() const;
+		    
+    private:
+      	/**
+      	* Default class constructor.
+      	* @param aRadioSettings - pointer to the CRadioSettings class
+      	*/
+        CCentralRepositoryHandler(TRadioSettings& aRadioSettings);
+       	/**
+     	* Second phase class constructor.
+     	*/
+        void ConstructL();
+     	/**
+     	* Retrieves persistent settings from Central Repository.
+     	*/
+        void RetrieveInitialSettings();
+	    /**
+	    * Initializes the regions as defined in the resource file.
+	    */
+	    void InitializeRegionsL();
+	    
+	    /**
+        * Converts Region ID to index
+	    *
+        * @param aRegionId The region ID that is wanted to convert
+	    * @return The region index, KErrNotFound if no match found
+	    */
+	    TInt RegionIndexForId( TInt aRegionId ) const;
+
+	    /**
+	    * Updates the current region index
+	    *
+	    * @param aRegionId The new region ID
+	    */
+        void UpdateCurrentRegionIdx( TInt aRegionId );
+        /*
+        * Set emulator networkinfo
+        *
+        */
+        #ifdef __WINS__
+        void SetInitialSettings();
+       	#endif //__WINS__
+       	/**
+	    * Checks if frequency is in the current region range
+	    *
+	    * @param aFrequency Frequency to check
+	    */
+       	TBool IsFrequencyValid( TUint32 aFrequency ) const;
+       			       	
+	private: // data
+       	
+        // Handle to Central Repository server
+        CRepository* iCentralRepository; 
+        // Reference to RadioSetting object     
+        TRadioSettings* iRadioSettings;
+        /** The current region. */
+    	TInt iCurrentRegionIdx;    	    	
+    	/** The available regions. */     
+    	RPointerArray<CFMRadioRegion> iRegions;
+    	
+    	
+        
+    };
+
+#endif  // FMRADIOENGINECENTRALREPOSITORYHANDLER_H
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradioenginecrkeys.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,71 @@
+/*
+* 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:  Definition of central repository keys for FM Radio Engine.
+*
+*/
+
+
+#ifndef FMRADIOENGINECRKEYS_H
+#define FMRADIOENGINECRKEYS_H
+
+// FM Radio Engine UID
+const TUid KCRUidFMRadioEngine = {0x2001B25E};
+
+// Radio headset volume
+const TUint32 KRadioHeadsetVolume =  0x00000001;
+
+// Radio speaker volume
+const TUint32 KRadioSpeakerVolume = 0x00000002;
+
+// The last played radio frequency
+const TUint32 KFmRadioFrequency = 0x00000003;
+
+// The last played radio channel
+const TUint32 KFmRadioChannel = 0x00000004;
+
+// The radio mode before radio off 
+const TUint32 KFmRadioMode = 0x00000005;
+
+// Country code + network ID
+const TUint32 KFMRadioCREmulatorNetworkInfo =  0x00000006; 
+
+// number of startups
+const TUint32 KRadioCRStartupCount = 0x00000007;
+
+// currently active region
+const TUint32 KFMCRCurrentRegion = 0x00000008;
+
+// Japan region support on/off
+const TUint32 KFMCRJapanRegionAllowed = 0x00000050;
+
+// Rds af seacrh enabled
+const TUint32 KFMCRRdsAfSearchEnabled = 0x00000009;
+
+// The first preset channel's location in central repository
+const TUint32 KFmRadioPresetChannel1 = 0x0000000A;
+
+// Is note "'Music Store' got enabled..." viewed already?
+const TUint32 KRadioMusicStoreNoteDisplayed = 0x0000000B;
+
+// Which RT+ interactions are supported?
+const TUint32 KRadioRTPlusSupportLevel = 0x0000000C;
+
+// Application UID of the song recognition service
+const TUint32 KFmRadioSongRecognitionUid = 0x0000000D;
+
+#endif      // FMRADIOENGINECRKEYS_H
+
+// End of file
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradioenginedosserverobserver.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,81 @@
+/*
+* Copyright (c) 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:  Contains implementation of the CDosServerObserver class. which is the 
+*                       notification interface to the DOS Server.
+*
+*/
+
+#ifndef __DOSSERVEROBSERVER_H
+#define __DOSSERVEROBSERVER_H
+
+//  INCLUDES
+#include <DosSvrServices.h>
+
+#include "fmradioengineradiosettings.h"
+
+class CRadioEngine;
+
+// CLASS DECLARATION
+
+/**
+* This class implements theis the notification interface to the DOS Server.
+*/
+class CDosServerObserver : public CDosEventListenerBase
+    {
+	public:
+		virtual ~CDosServerObserver();
+		/**
+		* Two-phased class constructor.
+		* @param aEngine - pointer to the CRadioEngine instance (used for callbacks)
+		* @param aRadioSettings - pointer to the CRadioSettings class
+		* @return pointer to CDosServerObserver class instance
+		*/
+		static CDosServerObserver* NewL(CRadioEngine* aEngine, TRadioSettings* aRadioSettings);
+
+        /**
+        * Sets the current audio routing.
+		* @param aAudioOutput Audio output to be used
+		* @return Symbian error code
+        */
+ 
+        TInt SetAudioRouting(CRadioEngine::TFMRadioAudioOutput aAudioOutput);
+	
+		/**
+		* From CDosEventListenerBase 
+		* It notifies about a headset button state change
+		* @param aState State of button
+		*/
+		void HeadsetButtonChangedL(EPSButtonState aState);
+
+	private:
+		/**
+		* Default class constructor.
+		* @param aEngine - pointer to the CRadioEngine instance (used for callbacks)
+		* @param aRadioSettings - pointer to the CRadioSettings class
+		*/
+		CDosServerObserver(CRadioEngine* aEngine, TRadioSettings* aRadioSettings);
+		/**
+		* Second phase class constructor.
+		*/
+		void ConstructL();
+
+	private:
+		CRadioEngine *iEngine;
+		TRadioSettings *iRadioSettings;
+        RDosAudio iDosAudio;
+    };
+
+#endif  // __DOSSERVEROBSERVER_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradioengineradiosettings.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,326 @@
+/*
+* 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:  Contains implementation of the TRadioSettings class, which holds 
+*                       the RadioEngine settings.
+*
+*/
+
+
+#ifndef FMRADIOSETTINGS_H
+#define FMRADIOSETTINGS_H
+
+#include "fmradioengine.h"
+
+// CONSTANTS
+const TInt KDefaultRadioVolume = 3;
+
+// CLASS DECLARATION
+//class CRadioEngine;
+
+
+/**
+*  TRadioSettings class.
+*  Maintain the radio setting data.
+* 
+*/
+class TRadioSettings
+    {
+    public:
+        /**  
+        * default constructor.
+        */
+       TRadioSettings();
+   
+        /**
+        * return current headset volume.
+        * @since Series 60 2.7
+        * @return current headset volume
+        */
+       TInt HeadsetVolume() const; 
+        /**
+        * return current speaker volume.
+        * @since Series 60 2.7
+        * @return current speaker volume
+        */
+   	    TInt SpeakerVolume() const;
+        /**
+        * return current preset number.
+        * @since Series 60 2.7
+        * @return current preset number
+        */
+        TInt CurrentPreset() const; 
+        /**
+        * return current frequency.
+        * @since Series 60 2.7
+        * @return current frequency
+        */
+        TInt Frequency() const; 
+        /**
+        * return max frequency.
+        * @return max frequency
+        */
+        TUint32 MaxFrequency() const;
+	    /**
+        * return min frequency.
+        * @return min frequency
+        */
+        TUint32 MinFrequency() const;
+	    /**
+        * return step size for tuning.
+        * @return step size
+        */
+        TUint32 FrequencyStepSize() const;
+	    /**
+	    * Returns decimal count for current region MHz information  
+	    * @return decimal count for current region
+	    */
+	    TInt DecimalCount() const;	
+        /**
+        * return current audio mode.
+        * @since Series 60 2.7
+        * @return stereo/mono
+        */
+        CRadioEngine::TFMRadioAudioMode AudioMode() const; 
+        /**
+        * return current audio output destination.
+        * @since Series 60 2.7
+        * @return headset/IHF
+        */
+        CRadioEngine::TFMRadioAudioOutput AudioOutput() const;
+        /**
+        * check if radio is mute.
+        * @since Series 60 2.7
+        * @return true/false
+        */
+        TBool IsMuteOn() const;
+        /**
+        * check if radio is on.
+        * @since Series 60 2.7
+        * @return true/false
+        */
+        TBool IsRadioOn() const;
+        /**
+        * return radio mode.
+        * @since Series 60 2.7
+        * @return tune/preset mode
+        */
+        CRadioEngine::TRadioMode RadioMode() const; 
+        /**
+        * check if headset is connected.
+        * @since Series 60 2.7
+        * @return true/false
+        */
+        TBool IsHeadsetConnected() const; 
+        /**
+        * check if flight mode is enabled.
+        * @since Series 60 2.7
+        * @return true/false
+        */
+       TBool IsFlightModeEnabled() const;
+       /**
+        * Retrieves the RDS alternate frequency search setting
+        *
+        * @return ETrue if AF search is enabled, otherwise EFalse
+        */
+       IMPORT_C TBool IsRdsAfSearchEnabled();
+        /**
+        * set speaker volume.
+        * @since Series 60 2.7
+        * @param aVolume the new volume
+        * @return none
+        */
+       void SetSpeakerVolume(const TInt aVolume);
+        /**
+        * set headset volume.
+        * @since Series 60 2.7
+        * @param aVolume the new volume
+        * @return none
+        */
+       void SetHeadsetVolume(const TInt aVolume);
+        /**
+        * Set current preset number.
+        * @since Series 60 2.7
+        * @return current preset number
+        */
+       void SetCurrentPreset(const TInt aChannel);
+        /**
+        * set current frequency .
+        * @since Series 60 2.7
+        * @param aFrequency the frequency to be set
+        * @return none
+        */
+       void SetFrequency(const TInt aFrequency);
+        /**
+        * set max frequency.
+        * @param aMaxFrequency the frequency to be set
+        * @return none
+        */
+	   void SetMaxFrequency( const TUint32 aMaxFrequency );
+	    /**
+        * set min frequency.
+        * @param aMinFrequency the frequency to be set
+        * @return none
+        */
+	    void SetMinFrequency( const TUint32 aMinFrequency );
+	    /**
+        * set step size for manual tuning.
+        * @param aFrequencyStepSize frequency step
+        * @return none
+        */
+	    void SetFrequencyStepSize( const TUint32 aFrequencyStepSize );
+	    /**
+	    * Set decimal count for current region MHz information  
+	    * @param aDecimalCount decimals used
+	    * @return none
+	    */
+	    void SetDecimalCount( const TInt aDecimalCount );	
+        /**
+        * set audio mode.
+        * @since Series 60 2.7
+        * @param aAudioMode stereo/mono
+        * @return none
+        */
+       void SetAudioMode(CRadioEngine::TFMRadioAudioMode aAudioMode);
+        /**
+        * set audio output.
+        * @since Series 60 2.7
+        * @param aAudioOutput headset/IHF
+        */
+       void SetAudioOutput(const CRadioEngine::TFMRadioAudioOutput aAudioOutput );
+        /**
+        * set mute on.
+        * @since Series 60 2.7
+        * @return none
+        */
+       void SetMuteOn();
+        /**
+        * set mute on.
+        * @since Series 60 2.7
+        * @return none
+        */
+       void SetMuteOff();
+        /**
+        * set radio on.
+        * @since Series 60 2.7
+        * @return none
+        */
+       void SetRadioOn();
+        /**
+        * set radio off.
+        * @since Series 60 2.7
+        * @return none
+        */
+       void SetRadioOff();
+        /**
+        * set radio mode.
+        * @since Series 60 2.7
+        * @param aRadioMode preset/tune mode
+        * @return none
+        */
+       void SetRadioMode(const CRadioEngine::TRadioMode aRadioMode);
+        /**
+        * set headset connected.
+        * @since Series 60 2.7
+        * @return none
+        */
+       void SetHeadsetConnected();
+        /**
+        * set headset disconnected.
+        * @since Series 60 2.7
+        * @return none
+        */
+       void SetHeadsetDisconnected();
+        /**
+        * set flight mode.
+        * @since Series 60 2.7
+        * @param aEnabled true/false
+        * @return none
+        */
+       void SetFlightMode( TBool aEnabled );
+       /**
+       * set startup count
+       * @param aStartupCount number of app startups
+       */
+       void SetStartupCount( const TInt aStartupCount );
+       /**
+       * return startup count
+       * @return number of app startups
+       */
+	   TInt StartupCount() const;
+
+       /**
+        * Set rds af search enabled.
+        * @return none
+        */
+       void SetRdsAfSearchEnabled();
+       /**
+        * Set rds af search disabled.
+        * @return none
+        */
+       void SetRdsAfSearchDisabled();
+       /**
+        * Set Japan region support on/off.
+        * @param aAllowed true/false
+        * @return none
+        */
+       void SetJapanRegionAllowed( const TBool aAllowed );
+       /**
+        * Return status of the Japan region support
+        * @return ETrue if supported
+        */       
+       TBool IsJapanRegionAllowed() const;
+              
+    private: 
+        /// current headset volume level
+        TInt iFMRadioHeadsetVolume;
+        /// current speaker volume level
+        TInt iFMRadioSpeakerVolume;
+        /// currently selected channel.
+        TInt iCurrentPreset; 
+        /// current frequency
+        TInt iFrequency; 
+        // max frequency 
+        TUint32 iMaxFrequency;
+        //  min frequency
+        TUint32 iMinFrequency;
+        // step size
+        TUint32 iFrequencyStepSize;
+        // decimal count
+        TInt iDecimalCount;
+        /// stereo or mono
+        CRadioEngine::TFMRadioAudioMode iAudioMode; 
+        /// audio output
+        CRadioEngine::TFMRadioAudioOutput iAudioOutput;
+        /// current mute state
+        TBool iMuteOn;
+        //  radio on/off flag
+        TBool iRadioOn;
+        /// preset or direct frequency flag
+        CRadioEngine::TRadioMode iRadioMode; 
+        /// headset connected flag
+        TBool iIsHeadsetConnected; 
+        /// flight mode enabled flag
+        TBool iFlightModeEnabled;
+        // first startup case flag
+        TInt iStartupCount;        
+        //  rds af search enabled flag
+        TBool iRdsAfSearchEnabled;
+        //  Japan region support flag
+        TBool iJapanRegionAllowed;
+
+    };
+
+#endif  // FMRADIOSETTINGS_H
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradioengineradiostatehandler.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,96 @@
+/*
+* 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:  The class implements functions handling radio engine state changes 
+*
+*/
+
+
+#ifndef FMRADIOENGINERADIOSTATEHANDLER_H
+#define FMRADIOENGINERADIOSTATEHANDLER_H
+
+//INCLUDES
+#include "fmradioenginestatechangecallback.h"
+
+// CONSTANTS
+const TUint8 KRadioStateEventCallback     = 0x01;
+
+// FORWARD DECLARATIONS
+class CRadioEngine;
+
+
+// CLASS DECLARATION
+/**
+* This class implements the state machines for radio engine state transition.
+*/
+class CRadioStateHandler : public CActive
+    {
+    public:
+        /**
+        * Method for creating new instances of this class.
+        * @param aEngine a pointer to CRadioEngine
+        * @return - A pointer to new CRadioEngineTimer object
+        **/
+        static CRadioStateHandler *NewL(CRadioEngine* aEngine);
+        /**
+        * Destructor
+        **/
+        virtual ~CRadioStateHandler();
+    public:
+        /**
+        * Trigger the active object to call the client callback function.
+        * @since Series 60 2.7
+        * @return none
+        */
+        void Callback(MRadioEngineStateChangeCallback::TFMRadioNotifyEvent aEventCode, TInt aErrorCode );
+    private:
+        /**
+        * c++ default constructor
+        **/
+        CRadioStateHandler(CRadioEngine* aEngine);
+        /**
+        * 2nd phase constructor
+        **/
+        void ConstructL();
+        /**
+        * Cancel the timeout timer. This generally means that a response was received from the chip, so the 
+        * timeout is no longer needed or the state machine was transitioned.
+        * @since Series 60 2.7
+        * @return none
+        **/
+        void DoCancel();
+        /**
+        * State Change Request/timeout handler
+        * @since Series 60 2.7
+        * @return none
+        */
+        void RunL();
+        /**
+        * handle any errors that occur in the RunL
+        * @since Series 60 2.7
+        * @return none
+        */
+    	TInt RunError( TInt aError );
+    private:
+        // pointer to the session who's timeout we are mananging.
+        CRadioEngine* iEngine;            
+        // Temporary storage for event code
+        TInt iCallbackEventCode;
+        // Temporary storage for error code        
+        TInt iCallbackErrorCode;
+   
+    };  // FMRADIOENGINERADIOSTATEHANDLER_H   
+            
+// End of File
+    
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradioenginestatechangecallback.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,94 @@
+/*
+* 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:  Declaration of a simple interface to integrate the FM Radio
+*                 application engine and Ui.
+*                 Ui is derived from this class and Ui implements
+*                 the virtual method HandleRadioEngineCallBackL in class
+*                 CFMRadioAppUi. Radio engine then calls this virtual function
+*                 when it needs to pass information i.e. about its changed
+*                 state where Ui must react to. The traffic between Ui and
+*                 engine goes like:
+*                 Ui::RequestToEngine() -> Engine() -> Ui::DoAndShowItAndUpdateState()
+*
+*/
+
+
+#ifndef FMRADIOENGINESTATECHANGECALLBACK_H
+#define FMRADIOENGINESTATECHANGECALLBACK_H
+
+// Class declaration
+
+/**
+*  It is interface to integrate the FM Radio
+*  application engine and Ui.
+*  @lib FMRadioEngine.lib
+*  @since Series 60 2.7
+*/
+class MRadioEngineStateChangeCallback
+{
+    public:
+        /**
+        * Event codes for identifying the event that
+        * caused the change in engine's internal state.
+        * Also, the possible error context is determined
+        * from the event code. See the TFMRadioErrorCode
+        * decalaration below for further information.
+        */
+        enum TFMRadioNotifyEvent
+        {
+            // Radio functionality events
+            EFMRadioEventNone = 0x00,
+            EFMRadioEventTunerReady,
+            EFMRadioEventRadioOn,
+            EFMRadioEventRadioOff,
+            EFMRadioEventTune,
+            EFMRadioEventVolumeUpdated,
+            EFMRadioEventSetAudioMode,
+            EFMRadioEventSetAudioOutput,
+            EFMRadioEventHeadsetDisconnected,
+            EFMRadioEventHeadsetReconnected,
+            EFMRadioEventButtonPressed,
+            EFMRadioEventFlightModeEnabled,
+            EFMRadioEventFlightModeDisabled,
+            EFMRadioEventStandbyMode,
+            EFMRadioEventSetMuteState,
+            EFMRadioEventAudioResourceAvailable,
+            EFMRadioEventAudioResourcePaused,
+            EFMRadioEventAudioResourceLost,
+            EFMRadioEventCallStarted,
+            EFMRadioEventCallEnded,
+            EFMRadioEventFMRadioInitialized,
+            EFMRadioEventFMTransmitterOn,
+            EFMRadioEventFreqRangeChanged,
+            EFMRadioEventRDSNotSupported,
+            EFMRadioEventScanLocalStationsCanceled
+
+        };
+    public:
+        /**
+        * Interface method to get the callback from the
+        * radio engine to radio Ui.
+        *
+        * @param aEventCode Predefined code of the event which
+        *        caused the change in engine's internal state.
+        * @param aErrorCode Predefined code of the error if
+        *        one was generated. If no errors, value is 0x00 (NULL).
+        * @return none
+        */
+        virtual void HandleRadioEngineCallBack(TFMRadioNotifyEvent aEventCode, TInt aErrorCode ) = 0;
+};
+
+#endif  //FMRADIOENGINESTATECHANGECALLBACK_H
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradioheadseteventobserver.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,43 @@
+/*
+* 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:  headset event observer interface
+*
+*/
+
+
+#ifndef MFMRADIOHEADSETEVENTOBSERVER_H
+#define MFMRADIOHEADSETEVENTOBSERVER_H
+
+
+// CLASS DECLARATION
+
+class MFMRadioHeadsetEventObserver 
+    {
+
+    public: // New functions
+
+		/**
+		* This callback will notify of the Headset to be connected
+		*/        
+        virtual void HeadsetAccessoryConnectedCallbackL() = 0;
+
+		/**
+		* This callback will notify of the Headset to be disconnected
+		*/
+		virtual void HeadsetAccessoryDisconnectedCallbackL() = 0;
+    };
+
+#endif      // MFMRADIOHEADSETEVENTOBSERVER_H
+            
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradiointernalpskeys.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,298 @@
+/*
+* 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: P&S data for FMRadio
+*
+*/
+#ifndef FMRADIOINTERNALPSKEYS_H
+#define FMRADIOINTERNALPSKEYS_H
+
+#include <e32cmn.h>
+#include <fmradiouids.h>
+
+// FMRadio Application UID
+const TUid KFMRadioPSUid = { KUidFMRadioApplication };
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////
+///                                                                                                 ///
+/// Data properties. These properties are published by fmradio and used by other applications. ///
+///                                                                                                 ///
+///////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+* Currently active channel's ID.
+* Value <code>KErrNotFound</code> means that no preset channel is active.
+* Type <code>RProperty::EInt</code>.
+*/
+const TUint32 KFMRadioPSDataChannel = 0x00000000;
+
+/**
+* Currently active frequency.
+* Frequency unit is in kHz.
+* Type <code>RProperty::EInt</code>.
+*/
+const TUint32 KFMRadioPSDataFrequency = 0x00000001;
+    
+/**
+* Current power state of the radio.
+* Type <code>RProperty::EInt</code>.
+* @see TFMRadioPSRadioPowerState.
+*/
+const TUint32 KFMRadioPSDataRadioPowerState = 0x00000002;
+
+/**
+* Power state of the radio.
+*/
+enum TFMRadioPSRadioPowerState
+    {
+    EFMRadioPSRadioPowerStateUninitialized,  /**< The key is not yet initialized. */
+    EFMRadioPSRadioPowerOn,					/**< Radio power on. */
+    EFMRadioPSRadioPowerOff					/**< Radio power off. */
+    };
+
+/**
+* Current volume level.
+* Scale is from 1-10.
+* Type <code>RProperty::EInt</code>.
+*/
+const TUint32 KFMRadioPSDataVolume = 0x00000003;
+
+/**
+* Changing of this value means that channel
+* data of specified channel ID has changed.
+* The value remains indicating the last changed channel ID.
+* Value <code>KErrNone</code> means that no channel data has been changed yet.
+* Type <code>RProperty::EInt</code>.
+*/
+const TUint32 KFMRadioPSDataChannelDataChanged = 0x00000004;
+
+/**
+* The current tuning state.
+* Type <code>RProperty::EInt</code>.
+* @see TFMRadioPSTuningState.
+*/
+const TUint32 KFMRadioPSDataTuningState = 0x00000006;
+
+/**
+* Possible tuning states.
+*/
+enum TFMRadioPSTuningState 
+    {
+    EFMRadioPSTuningUninitialized,    /**< Currently not tuning. */
+    EFMRadioPSTuningStarted,			 /**< Tuning has been started an lasted less than one second. */
+    EFMRadioPSTuningContinues         /**< Tuning has taken more than one second. */
+    };
+
+/**
+* Current mute state of radio.
+* Type <code>RProperty::EInt</code>.
+* @see TFMRadioPSRadioMuteState.
+*/
+const TUint32 KFMRadioPSDataRadioMuteState = 0x00000007;
+
+/**
+* Mute state of radio.
+*/
+enum TFMRadioPSRadioMuteState
+    {
+    EFMRadioPSMuteStateUninitialized,    /**< The key has not yet been initialized. */
+    EFMRadioPSMuteStateOn,               /**< Radio mute state is on. */
+    EFMRadioPSMuteStateOff               /**< Radio mute state is off. */
+    };
+
+/**
+* Indicates if FM Radio is running or closing.
+* Type <code>RProperty::EInt</code>.
+* @see TFMRadioPSApplicationRunningState.
+*/
+const TUint32 KFMRadioPSDataApplicationRunning = 0x00000008;
+
+/**
+* FM Radio application running states.
+*/
+enum TFMRadioPSApplicationRunningState
+    {
+    EFMRadioPSApplicationUninitialized,  /**< FM Radio application's state is not yet initialized. */
+    EFMRadioPSApplicationRunning,        /**< FM Radio application is running. */
+    EFMRadioPSApplicationClosing         /**< FM Radio application is closing. */
+    };
+
+/**
+* Indicates the current antenna connectivity status.
+* Type <code>RProperty::EInt</code>.
+* @see TFMRadioPSHeadsetStatus
+*/
+const TUint32 KFMRadioPSDataHeadsetStatus = 0x00000009;
+
+/**
+* Current antenna status.
+*/
+enum TFMRadioPSHeadsetStatus
+    {
+    EFMRadioPSHeadsetUninitialized,  /**< The antenna status is uninitialized. */
+    EFMRadioPSHeadsetDisconnected,   /**< The antenna is disconnected. */
+    EFMRadioPSHeadsetConnected       /**< The antenna is connected. */
+    };
+
+/**
+* The current frequency decimal count.
+* Type <code>RProperty::EInt</code>.
+* @see TFMRadioPSFrequencyDecimalCount.
+*/
+const TUint32 KFMRadioPSDataFrequencyDecimalCount = 0x00000010;
+
+/**
+* The current frequency decimal count.
+*/
+enum TFMRadioPSFrequencyDecimalCount
+    {
+	EFMRadioPSFrequencyDecimalCountUninitialized,	/**< Frequency decimal count has not yet been initialized. */
+    EFMRadioPSFrequencyOneDecimal,     				/**< Frequency accuracy is one decimal. */
+    EFMRadioPSFrequencyTwoDecimals,    				/**< Frequency accuracy is two decimals. */
+    EFMRadioPSFrequencyThreeDecimals   				/**< Frequency accuracy is three decimals. */
+    };
+
+/**
+* Current moving state of application.
+* Note that even if user activates the moving state,
+* the move can be still canceled.
+* Type <code>RProperty::EInt</code>.
+* @see TFMRadioPSMovingState
+*/
+const TUint32 KFMRadioPSDataMovingState = 0x00000011;
+
+/**
+* The current moving state.
+*/
+enum TFMRadioPSMovingState
+    {
+    EFMRadioPSMovingStateUninitialized,      /**< Moving state is uninitialized. */
+    EFMRadioPSMovingStateOn,                 /**< User has activated moving state. */
+    EFMRadioPSMovingStatePerforming,         /**< User has performed a channel move. */
+    EFMRadioPSMovingStateOff                 /**< Moving state is off. */
+    };
+
+/**
+* Flag to indicate if we're connected to the network.
+*/
+const TUint32 KFMRadioPSDataNetworkConnected = 0x00000014;
+
+/**
+* Flag to indicate if loudspeaker is in use
+*/
+const TUint32 KFMRadioPSDataLoudspeakerStatus = 0x00000015;
+/**
+* Current speaker status.
+*/
+enum TFMRadioPSLoudspeakerStatus
+    {
+    EFMRadioPSLoudspeakerUninitialized,  /**< The speaker status is uninitialized. */
+    EFMRadioPSLoudspeakerNotInUse,   /**< The speaker is not in use. */
+    EFMRadioPSLoudpeakerInUse       /**< The speaker is in use. */
+    };
+
+/**
+* RDS Program Service information, property type is text.
+*/
+
+const TUint32 KFMRadioPSDataRDSProgramService = 0x00000016;
+
+/**
+* RDS Radio Text information.
+* Type <code>RProperty::EText</code>.
+*/
+const TUint32 KFMRadioPSDataRDSRadioText = 0x00000017;
+
+/**
+ * Name of the current channel.
+ * Type <code>RProperty::EText</code>.
+ */
+const TUint32 KFMRadioPSDataChannelName = 0x00000018;
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+///                                                                                                    ///
+/// Control properties. These properties are published by other applications and used by FMRadio. 	   ///
+///                                                                                                    ///
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+* Sets mute state on or off.
+* Type <code>RProperty::EInt</code>.
+* @see TFMRadioPSRadioMuteState.
+*/
+const TUint32 KFMRadioPSControlSetRadioMuteState = 0x00001006;
+
+
+/**
+* Increases or decreases volume level.
+* Type <code>RProperty::EInt</code>.
+* @see TFMRadioPSAdjustVolume.
+*/
+const TUint32 KFMRadioPSControlAdjustVolume = 0x00001005;
+
+/**
+* Volume step direction.
+*/
+enum TFMRadioPSAdjustVolume
+    {
+    EFMRadioPSAdjustVolumeUninitialized = 0, /**< The key has not yet been initialized. */
+    EFMRadioPSIncreaseVolume,				/**< Increase volume. */
+    EFMRadioPSDecreaseVolume					/**< Decrease volume. */
+    };
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+///                                                                                                    ///
+/// Control properties. These properties are published by other applications and used by FM Radio. ///
+///                                                                                                    ///
+//////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+/**
+* Steps up or down a channel in channel list.
+* Type <code>RProperty::EInt</code>.
+* @see TFMRadioPSStepToChannel.
+*/
+const TUint32 KFMRadioPSControlStepToChannel = 0x00001000;
+
+/**
+* Step direction of channel step.
+*/
+enum TFMRadioPSStepToChannel
+    {
+    EFMRadioPSStepToChannelUninitialized,    /**< Value of the key has not yet been initialized. */
+    EFMRadioPSStepToChannelUp,				/**< Step to next channel up. */
+    EFMRadioPSStepToChannelDown				/**< Step to next channel down. */
+    };
+    
+/**
+* Seeks to next active frequency up or down.
+* Type <code>RProperty::EInt</code>.
+* @see TFMRadioPSSeek.
+*/
+const TUint32 KFMRadioPSControlSeek = 0x00001002;
+
+/**
+* Seek direction.
+*/
+enum TFMRadioPSSeek
+    {
+    EFMRadioPSSeekUninitialized, /**< Value of the key has not yet been initialized. */
+    EFMRadioPSSeekUp,			/**< Seek up. */
+    EFMRadioPSSeekDown			/**< Seek down. */
+    };
+
+const TUint32 KFMRadioActiveIdlePresetListCount = 0x00001003;
+const TUint32 KFMRadioActiveIdlePresetListFocus = 0x00001004;
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradiomobilenetworkinfolistener.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,130 @@
+/*
+* 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:  Header file for CFMRadioMobileNetworkInfoListener.
+*
+*/
+
+
+#ifndef FMRADIOMOBILENETWORKINFOLISTENER_H
+#define FMRADIOMOBILENETWORKINFOLISTENER_H
+
+#include <e32base.h>
+#include <etelmm.h>
+
+
+const TInt KFMRadioCREmulatorCountryCodeLength = 3;
+namespace CommsDat { class CCDIAPRecord; }
+
+class MFMRadioNetworkChangeObserver;
+/**
+ * Listens changes in network ID and country code.
+ *
+ * @ingroup Utils
+ */
+NONSHARABLE_CLASS(CFMRadioMobileNetworkInfoListener) : public CActive
+    {
+public:
+
+    /**
+     * Creates a new mobile network info listener.
+     * @return   The newly created mobile network info listener.
+     */
+    static CFMRadioMobileNetworkInfoListener* NewL(
+                                    MFMRadioNetworkChangeObserver & aObserver);
+
+    /**
+     * Destructor.
+     */
+    ~CFMRadioMobileNetworkInfoListener();
+
+    /**
+     * Return current combined network ID and country code as TInt.
+     * @return   An integer composed of the current network ID and country code.
+     */
+    TInt CompoundNetworkId() const;
+
+	/**
+     * Returns current country code.
+     * @return   The current country code.
+     */
+    const TDesC& CountryCode() const;
+    
+    /**
+     * SubscriberId
+     * @return subscriber id
+     */
+    const TDesC& SubscriberId() const;
+    
+private:
+
+	/**
+     * Constructor.
+     */
+    CFMRadioMobileNetworkInfoListener(MFMRadioNetworkChangeObserver & aObserver);
+    
+    /**
+     * By default Symbian 2nd phase constructor is private.
+     */
+    void ConstructL();
+    
+    /**
+     * Saves fetched network info to local variables.
+     */
+    void SaveNetworkInfo();
+
+#ifdef __WINS__
+    /**
+     * Gets network info from Central Repository.
+     */
+    void GetCenRepNetworkInfoL();
+#endif
+
+// from base class CActive
+    void RunL();
+    void DoCancel();
+
+private:    // Data
+
+    /** interface to report a condition when network id has changed */
+    MFMRadioNetworkChangeObserver & iNetworkChangeObserver;
+#ifdef __WINS__
+    /** Central repository */
+    CRepository* iRepository;
+    /** Network info from repository */
+    HBufC* iEmulatorNetworkInfo;
+#else
+    /** Telephony server. */
+    RTelServer iTelServer;
+    /** Mobile phone. */
+    RMobilePhone iPhone;
+    /** Network info of mobile phone. */
+    RMobilePhone::TMobilePhoneNetworkInfoV1 iNetworkInfo;
+    /** Location of mobile phone. */
+    RMobilePhone::TMobilePhoneLocationAreaV1 iLocation;
+    /** Packaged network info object. */
+    RMobilePhone::TMobilePhoneNetworkInfoV1Pckg iNetworkInfoPckg;
+#endif		
+    /** Current network ID. */
+    RMobilePhone::TMobilePhoneNetworkIdentity iNetworkId;
+    /** Current country code. */
+    RMobilePhone::TMobilePhoneNetworkCountryCode iCountryCode;
+    /** Combined network ID and country code. */
+    TInt iCompoundNetworkId;
+    /** Previous known non-null combined country code */
+    TInt iPreviousCompoundNetworkId;
+    /** Subsriber (IMSI code) id that has been picked up at the startup */
+    HBufC* iSubscriberId;
+    };
+
+#endif // FMRADIOMOBILENETWORKINFOLISTENER_H   
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradionetworkchangeobserver.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,29 @@
+/*
+* 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: An interface for notifying about network id changes
+*
+*/
+/**
+ * An interface for notifying about network id changes
+ */
+class MFMRadioNetworkChangeObserver
+    {
+    
+public:
+
+    /**
+     * Used for notifying that the network id has changed 
+     */
+    virtual void NetworkIdChanged() = 0;
+    };
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradiopropertyobserver.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,264 @@
+/*
+* 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: Abstract interface for handling property change events.
+*
+*/
+
+
+#ifndef CFMRADIOPROPERTYOBSERVER_H
+#define CFMRADIOPROPERTYOBSERVER_H
+
+#include <e32base.h>
+#include <e32property.h>
+
+/**
+ * MFMRadioPropertyChangeObserver
+ *
+ * Abstract interface for handling property change events.
+ */
+class MFMRadioPropertyChangeObserver
+{
+
+public:
+ 
+    /**
+    * This is a callback function which is called when a property value of 
+    * type int is changed.
+    *
+    * @param aCategory UID of Publish And Subscribe category
+    * @param aKey subkey to specify the category event; to be used with 
+    * Publish And Subscribe
+    *
+    * @param aValue the new value
+    */
+    virtual void HandlePropertyChangeL(
+        const TUid& aCategory, 
+        const TUint aKey, 
+        const TInt aValue ) = 0;
+        
+	/**
+    * This is a callback function which is called when a property value of 
+    * type text is changed.
+    *
+    * @param aCategory UID of Publish And Subscribe category
+    * @param aKey subkey to specify the category event; to be used with 
+    * Publish And Subscribe
+    * @param aValue the new value
+    **/
+    virtual void HandlePropertyChangeL( 
+        const TUid& aCategory, 
+        const TUint aKey, 
+        const TDesC& aValue ) = 0;        
+        
+	/**
+    * This is a callback function which is called when a property value of 
+    * type byte array is changed.
+    *
+    * @param aCategory UID of Publish And Subscribe category
+    * @param aKey subkey to specify the category event; to be used with 
+    * Publish And Subscribe
+    * @param aValue the new value
+    **/
+    virtual void HandlePropertyChangeL( 
+        const TUid& aCategory, 
+        const TUint aKey, 
+        const TDesC8& aValue ) = 0;        
+                
+    /**
+    * This is a callback function which is called when a P&S components 
+    * returns an error
+    *
+    * @param aCategory UID of Publish And Subscribe category
+    * @param aKey subkey to specify the category event
+    * @param aError an error code
+    */
+    virtual void HandlePropertyChangeErrorL(
+        const TUid& aCategory, 
+        const TUint aKey, 
+        TInt aError) = 0;    
+};
+
+
+
+/**
+ * Observer class that observes changes of Property values and propogates 
+ * them further.
+ * The class defines a handle to a property, a single data value representing
+ * an item of state information.
+ *
+ */
+ class CFMRadioPropertyObserver : public CActive
+	{  
+	
+ public:
+
+    /**
+     * Property type. Cannot use RProperty::TType because EByteArray == EText.
+     */
+    enum TFMRadioPropertyType
+    	{
+    	EFMRadioPropertyInt, // Integral property type.
+    	EFMRadioPropertyByteArray, // Byte-array (8 bit), max size 512 bytes
+    	EFMRadioPropertyText // Text (16 bit), max size 512 bytes
+    	};
+    	
+    /**
+     * Two-phased constructor.
+     *
+     * @param aObserver a reference to the observer interface implementer
+     * @param aCategory UID of Publish And Subscribe category
+     * @param aKey subkey to specify the category event; to be used with 
+     * Publish And Subscribe
+     * @param aPropertyType property type to observe
+     */
+    static CFMRadioPropertyObserver* NewL(
+        MFMRadioPropertyChangeObserver& aObserver, 
+        const TUid& aCategory, 
+        const TUint aKey, 
+        const TFMRadioPropertyType aPropertyType);
+        
+    /**
+     * Two-phased constructor.
+     *
+     * @param aObserver a reference to the observer interface implementer
+     * @param aCategory UID of Publish And Subscribe category
+     * @param aKey subkey to specify the category event; to be used with 
+     * Publish And Subscribe
+     * @param aPropertyType property type to observe
+     */
+    static CFMRadioPropertyObserver* NewLC(
+        MFMRadioPropertyChangeObserver& aObserver, 
+        const TUid& aCategory, 
+        const TUint aKey, 
+        const TFMRadioPropertyType aPropertyType);
+
+    /**
+     * Destructor.
+     */
+    ~CFMRadioPropertyObserver();
+        
+    /**
+     * Subscribes the object to listen to the specified key. Does nothing if already active.
+     * Must be called after construction, or after calling Cancel().
+     */
+    void ActivateL();
+    
+    /**
+     * Returns current integer property value
+     * @param aUpdate ETrue if the cache value should be updated
+     * 
+     * @return int value
+     */	
+	TInt ValueInt( TBool aUpdate = EFalse );
+	
+	/**
+     * Returns current byte array property value
+     ** @param aUpdate ETrue if the cache value should be updated
+     * 
+     * @return byte array value
+     */	
+	const TDesC8& ValueDes8( TBool aUpdate = EFalse );
+	
+	/**
+     * Returns current text property value
+     * * @param aUpdate ETrue if the cache value should be updated
+     *
+     * @return text value
+     */	
+	const TDesC& ValueDes( TBool aUpdate = EFalse );
+		
+private:
+
+    /**
+     * C++ default constructor overload.
+     * Two-phased constructor.
+     *
+     * @param aObserver a reference to the observer interface implementer
+     * @param aCategory UID of Publish And Subscribe category
+     * @param aKey subkey to specify the category event; to be used with 
+     * Publish And Subscribe
+     * @param aPropertyType property type to observe
+     */
+	CFMRadioPropertyObserver(
+	    MFMRadioPropertyChangeObserver& aObserver, 
+	    const TUid& aCategory, 
+	    const TUint aKey, 
+	    const TFMRadioPropertyType aPropertyType);
+
+    /**
+     * By default Symbian 2nd phase constructor is private.
+     **/
+    void ConstructL(); 
+    
+    // from base class Cactive
+    /**
+     * From CActive
+     *
+     * @see CActive::RunL()
+     */
+    void RunL();
+
+    /**
+     * From CActive, 
+     * 
+     * @see CActive::DoCancel()
+     */
+    void DoCancel();
+
+private: // data
+
+ 	/** 
+ 	 * Value of a subscribed category property of type int. 
+ 	 */
+ 	TInt iValueInt;
+ 	
+ 	/** 
+ 	 * Value of a subscribed category property of type byte array. 
+ 	 */
+ 	HBufC8* iValueByteArray;
+ 	
+ 	/** 
+ 	 * Value of a subscribed category property of type text. 
+ 	 */
+ 	HBufC* iValueText;
+ 	
+    /** 
+     * Handle to Publish And Subscribe component
+     */ 
+    RProperty iProperty;
+    
+    /**
+     * Observer to be notified when particular Property value has changed
+     */
+    MFMRadioPropertyChangeObserver& iObserver;
+    
+    /** 
+     * UID of Publish And Subscribe category
+     */
+    TUid iCategory;
+    
+    /**
+     * Subkey to be used with Publish And Subscribe
+     */
+    TUint iKey;
+    
+    /** 
+     * Type of the observed property. 
+     */
+    TFMRadioPropertyType iPropertyType;
+    
+	};
+
+#endif  // CFMRADIOPROPERTYOBSERVER_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradiopubsub.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,219 @@
+/*
+* Copyright (c) 2005-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:  Header file for CFMRadioPubSub
+*
+*/
+
+
+#ifndef CFMRADIOPUBSUB_H
+#define CFMRADIOPUBSUB_H
+
+#include <fmradiointernalpskeys.h>
+
+#include "fmradiopropertyobserver.h"
+
+class MFMRadioControlEventObserver;
+
+/**
+ *  Publish&Subscribe interface of FMRadioEngine
+ */
+class CFMRadioPubSub : 	
+    public CBase,
+	public MFMRadioPropertyChangeObserver
+    {
+    
+public:  // Methods
+
+    /**
+     * Static constructor.
+     */
+    static CFMRadioPubSub* NewL();
+    
+    /**
+     * Destructor.
+     */
+    virtual ~CFMRadioPubSub();
+
+    /**
+     * Publishes active channel number to P&S.
+     *
+     * @param aChannelId The channel ID to publish.
+     */
+    void PublishChannelL( TInt aChannelId ) const;
+    
+    /**
+     * Publishes active frequency to P&S.
+     *
+     * @param aFreq The frequency to publish.
+     */
+    IMPORT_C void PublishFrequencyL( TUint32 aFreq ) const;
+
+	/**
+     * Publishes radio power state to P&S.
+     *
+     * @param aPowerOn The radio power state to publish.
+     */
+	IMPORT_C void PublishStateL( TBool aPowerOn ) const;
+
+	/**
+     * Publishes current volume level to P&S.
+     *
+     * @param aVol The current volume level to publish.
+     */
+	void PublishVolumeL( TInt aVol ) const;
+
+	/**
+     * Publishes changed channel number to P&S.
+     *
+     * @param aChannelId The channel ID to publish.
+     */
+	void PublishChannelDataChangedL(TInt aChannelId) const;
+
+	/**
+     * Publishes the tuning state to P&S.
+     * @param aTuningState The tuning state to publish.
+     */
+	void PublishTuningStateL( TFMRadioPSTuningState aTuningState ) const;
+
+	/**
+     * Publishes radio mute state to P&S.
+     *
+     * @param aMuted The radio mute state to publish.
+     */
+	void PublishRadioMuteStateL( TBool aMuted ) const;
+
+    /**
+     * Publishes application running state to P&S.
+     *
+     * @param aRunningState The application running state.
+     */
+    IMPORT_C void PublishApplicationRunningStateL( 
+        TFMRadioPSApplicationRunningState aRunningState ) const;
+
+    /**
+     * Publishes the antenna status to P&S.
+     *
+     * @param aAntennaStatus The antenna's status.
+     */
+    void PublishAntennaStatusL( TFMRadioPSHeadsetStatus aAntennaStatus ) const;
+    
+    /**
+     * Publishes the frequency decimal count to P&S.
+     * @param aDecimalCount The decimal count.
+     */
+    void PublishFrequencyDecimalCountL( 
+        TFMRadioPSFrequencyDecimalCount aDecimalCount ) const;
+
+    /**
+     * Publishes speaker status. Before state is set for first time it is in
+     * <code>EFMRadioPSLoudspeakerUninitialized</code> state.
+     *
+     * @param aLoudspeakerStatus Status of the speaker
+     */
+    void PublishLoudspeakerStatusL( TFMRadioPSLoudspeakerStatus aLoudspeakerStatus ) const;
+
+    /**
+     * Publishes RDS Program Service information.
+     *
+     * @param aProgramService Service text
+     */
+    IMPORT_C void PublishRDSProgramServiceL( const TDesC& aProgramService ) const;
+    IMPORT_C void PublishRDSRadioTextL( const TDesC& aRadioText ) const;
+    IMPORT_C void PublishChannelNameL( const TDesC& aName ) const;
+
+    IMPORT_C void PublishPresetCountL( TInt aVal ) const;
+    
+// from base class MFMRadioPropertyChangeObserver
+    void HandlePropertyChangeL( const TUid& aCategory, const TUint aKey, const TInt aValue );
+    void HandlePropertyChangeL( const TUid& aCategory, const TUint aKey, const TDesC8& aValue );
+    void HandlePropertyChangeL( const TUid& aCategory, const TUint aKey, const TDesC& aValue );
+    void HandlePropertyChangeErrorL( const TUid& aCategory, const TUint aKey, TInt aError );
+    
+	/**
+	 * Sets the UI side control event observer.
+	 * @param aControlEventObserver the observer for control events
+	 */
+	IMPORT_C void SetControlEventObserver( MFMRadioControlEventObserver* aControlEventObserver );
+
+private: //Methods
+
+	/**
+     * C++ default constructor.
+     */
+    CFMRadioPubSub();
+    
+    /**
+     * By default Symbian 2nd phase constructor is private.
+     */
+    void ConstructL();
+
+    /**
+     * Defines a property.
+     *
+     * @param aKey The key of the property.
+     * @param aAttr Attributes of the property.
+     * @param aDataProperty ETrue if the property is a data property, EFalse 
+     * if it is a control property
+     */
+    void DefinePropertyL( 
+        TUint aKey, 
+        TInt aAttr, 
+        TBool aDataProperty ) const;
+
+    /**
+     * Deletes a property.
+     *
+     * @param aKey The key of the property.
+     */
+    void DeleteProperty( TUint aKey ) const;        
+
+    /**
+     * Gets the integer value stored in a property.
+     *
+     * @param    aKey    The key of the property.
+     * @return   The value contained in the property.
+     */
+    TInt PropertyValueIntL( TUint aKey ) const;
+    
+    /**
+     * Sets the value in an integer property.
+     *
+     * @param    aKey    The key of the property.
+     * @param    aValue  The value to set.
+     */
+    void SetPropertyValueL( TUint aKey, TInt aValue ) const;
+
+    /**
+     * Sets the value in a text property.
+     *
+     * @param    aKey    The key of the property.
+     * @param    aValue  The value to set.
+     */
+    void SetPropertyValueL( TUint aKey, const TDesC& aValue ) const;
+
+private:    // Data
+
+    /** 
+     * Pointer to observer in UI side, can be NULL. Not owned. 
+     */
+	MFMRadioControlEventObserver*           iObserver;
+
+	/** 
+	 * An array of handlers to P&S interface. 
+	 */ 
+	RPointerArray<CFMRadioPropertyObserver> iPropertyArray;
+
+    };
+
+#endif      // CFMRADIOPUBSUB_H   
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradiordsobserver.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,83 @@
+/*
+* Copyright (c) 2006-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:  Observer interface for RDS events
+*
+*/
+
+
+#ifndef MFMRADIORDSOBSERVER_H
+#define MFMRADIORDSOBSERVER_H
+
+class MFMRadioRdsObserver
+    {
+public:
+
+    /**
+     * Programme Service data available
+     *
+     * @param aProgramService The new Programme Service data
+     */  
+    virtual void RdsDataProgrammeService( const TDesC& aProgramService ) = 0;
+    
+    /**
+     * Reports if the programme service name is detected as dynamically changing or not
+     *
+     * @param aStatic ETrue if the name is static, EFalse if it is dynamic
+     */  
+    virtual void RdsDataPsNameIsStatic( TBool aStatic ) = 0;
+    
+    /**
+     * Radio text data available
+     *
+     * @param aRadioText The new Radio text data
+     */  
+    virtual void RdsDataRadioText( const TDesC& aRadioText ) = 0;
+
+    /**
+     * Radio text plus data available
+     *
+     * @param aRTPlusClass The type of RT+ text
+     * @param aRadioTextPlus The new Radio text data
+     */  
+    virtual void RdsDataRadioTextPlus( const TInt aRTPlusClass, const TDesC& aRadioTextPlus ) = 0;
+       
+    /**
+     * Notifies of the beginning of Alternate Frequency search
+     */
+    virtual void RdsAfSearchBegin() = 0;
+    
+    /**
+     * Notifies of the completed Alternate Frequency search
+     *
+     * @param aFrequency The new frequency
+     * @param aError A standard system error code
+     */
+    virtual void RdsAfSearchEnd( TUint32 aFrequency, TInt aError ) = 0;
+
+    /**
+     * Notifies of the changed Alternate Frequency search state
+     *
+     * @param aEnabled ETrue if AF search was enabled, otherwise EFalse
+     */
+    virtual void RdsAfSearchStateChange( TBool aEnabled ) = 0;
+
+    /**
+     * Notifies of the status of RDS signal
+     * 
+     * @param aAvailable is RDS available
+     */
+    virtual void RdsAvailable( TBool aAvailable ) = 0;
+    };
+
+#endif // MFMRADIORDSOBSERVER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradiordsreceiver.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,71 @@
+/*
+* Copyright (c) 2006-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 RDS receiver implementation for FM Radio
+*
+*/
+
+
+#ifndef CFMRADIORDSRECEIVER_H
+#define CFMRADIORDSRECEIVER_H
+
+#include "fmradioengineradiosettings.h"
+#include "fmradiordsobserver.h"
+#include "fmradiordsreceiverbase.h"
+
+NONSHARABLE_CLASS( CFMRadioRdsReceiver ) : public CFMRadioRdsReceiverBase
+    {
+public:
+
+    /**
+     * The two-phased constructor
+     *
+     * @param aSettings The radio settings
+     */
+    static CFMRadioRdsReceiver* NewL( TRadioSettings& aSettings );
+
+    /**
+     * The destructor
+     */
+    virtual ~CFMRadioRdsReceiver();
+
+    // from CFMRadioRdsReceiverBase
+    void InitL( CRadioUtility& aRadioUtility, CFMRadioPubSub* aPubSub );
+    void SetAutomaticSwitchingL( TBool aEnable );
+    void StartReceiver();
+    void StopReceiver();
+
+private:
+
+    /**
+     * The default constructor
+     *
+     * @param aSettings The radio settings
+     */
+    CFMRadioRdsReceiver( TRadioSettings& aSettings );
+
+    /**
+     * Second phase constructor
+     */
+    void ConstructL();
+
+private: // data
+    
+    /** The RDS utility */
+    CRadioRdsUtility* iRdsUtility;
+
+    /** State of the RDS receiver */
+    TBool iStarted;
+    };
+
+#endif // CFMRADIORDSRECEIVER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradiordsreceiverbase.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,236 @@
+/*
+* Copyright (c) 2006-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 RDS receiver base class for FM Radio
+*
+*/
+
+
+#ifndef CFMRADIORDSRECEIVERBASE_H
+#define CFMRADIORDSRECEIVERBASE_H
+
+#include <RadioRdsUtility.h>
+
+#include "fmradiordsobserver.h"
+
+class TRadioSettings;
+class CRadioUtility;
+class CFMRadioPubSub;
+
+NONSHARABLE_CLASS( CFMRadioRdsReceiverBase ) : public CBase, public MRadioRdsObserver
+    {
+public:
+
+    enum TFMRadioProgrammeSeviceType
+        {
+        EFMRadioPSNameStaticAssumed = 0,// Default, determination is ongoing
+        EFMRadioPSNameStatic,           // PS name is static
+        EFMRadioPSNameDynamic           // PS name is dynamic
+        };
+    
+    /**
+     * The destructor
+     */
+    virtual ~CFMRadioRdsReceiverBase();
+
+    /**
+     * Initializes the RDS receiver
+     *
+     * @param aRadioUtility A reference to the radio utility
+     * @param aPubSub       Pointer to Publish&Subscribe object
+     */
+    virtual void InitL( CRadioUtility& aRadioUtility, CFMRadioPubSub* aPubSub ) = 0;
+
+    /**
+     * Adds an observer wich will be notified of the new RDS data
+     * If observer already exists, it is not added
+     *
+     * @param aObserver pointer of the observer instance.
+     */
+    IMPORT_C void AddObserver(MFMRadioRdsObserver* aObserver);
+
+    /**
+     * Removes the rds observer.
+     */
+    IMPORT_C void RemoveObserver(MFMRadioRdsObserver* aObserver);
+
+    /**
+     * Getter for automatic switching state of alternate frequencies
+     *
+     * @return ETrue if automatic switching is enabled
+     */
+    IMPORT_C TBool AutomaticSwitchingEnabled() const;
+
+    /**
+     * Getter for the programme service name
+     *
+     * @return Programme service name
+     */
+    IMPORT_C const TDesC& ProgrammeService() const;
+
+    /**
+     * Returns the nature of the PS name
+     *
+     * @return The type of PS name
+     */
+    IMPORT_C TFMRadioProgrammeSeviceType ProgrammeServiceNameType() const;
+    
+    /**
+     * Getter for the RDS signal availability
+     *
+     * @return ETrue if RDS signal is available, otherwise EFalse
+     */
+    IMPORT_C TBool SignalAvailable() const;
+
+    /**
+     * Getter for the RDS Text+ station URL
+     * @return The cached web URL of the station
+     */
+    IMPORT_C const TDesC& RtPlusProgramUrl() const;
+    
+    /**
+     * Getter for the RDS Text+ artist name
+     * @return The cached artist name
+     */
+    IMPORT_C const TDesC& RtPlusArtist() const;
+    
+    /**
+     * Getter for the RDS Text+ album name
+     * @return The cached album name
+     */
+    IMPORT_C const TDesC& RtPlusAlbum() const;
+    
+    /**
+     * Getter for the RDS Text+ song name
+     * @return The cached song name
+     */
+    IMPORT_C const TDesC& RtPlusSong() const;
+    
+    /**
+     * Setter for automatic switching of alternate frequencies
+     * If this method is overridden, the base implementation should be called
+     *
+     * @param aEnable ETrue, if automatic swithing is to be enabled
+     */
+    virtual void SetAutomaticSwitchingL( TBool aEnable );
+    
+    /**
+     * Clears the RDS information
+     */
+    void ClearRdsInformation();
+    
+    /**
+     * Starts receiving the RDS information
+     */
+    virtual void StartReceiver() = 0;
+    
+    /**
+     * Stops receiving the RDS information
+     */
+    virtual void StopReceiver() = 0;
+    
+protected:
+
+    /**
+     * The default constructor
+     *
+     * @param aSettings The radio settings
+     */
+    CFMRadioRdsReceiverBase( TRadioSettings& aSettings );
+
+    /**
+     * Second phase constructor
+     */
+    void BaseConstructL();
+
+    /**
+     * Static callback for the RDS PS name timer
+     *
+     * @param   aSelf   Pointer to self.
+     * @return  KErrNone
+     */
+    static TInt StaticPsNameTimerCallback( TAny* aSelf );
+    
+    /**
+     * Handles the received RT+ data and passes it to observers
+     * @param aRtPlusClass The RT+ class
+     * @param aRtPlusData The received data
+     */
+    void HandleRdsDataRTplusL( TRdsRTplusClass aRtPlusClass, TRdsRadioText& aRtPlusData );
+    
+// from base class MRadioRdsObserver
+    void MrroStationSeekByPTYComplete( TInt aError, TInt aFrequency );
+    void MrroStationSeekByTAComplete( TInt aError, TInt aFrequency );
+    void MrroStationSeekByTPComplete( TInt aError, TInt aFrequency );
+    void MrroGetFreqByPTYComplete( TInt aError, RArray<TInt>& aFreqList );
+    void MrroGetFreqByTAComplete( TInt aError, RArray<TInt>& aFreqList );
+    void MrroGetPSByPTYComplete( TInt aError, RArray<TRdsPSName>& aPsList );
+    void MrroGetPSByTAComplete( TInt aError, RArray<TRdsPSName>& aPsList );
+    void MrroRdsDataPI( TInt aPi );
+    void MrroRdsDataPTY( TRdsProgrammeType aPty );
+    void MrroRdsDataPS( TRdsPSName& aPs );
+    void MrroRdsDataRT( TRdsRadioText& aRt );
+    void MrroRdsDataCT( TDateTime& aCt );
+    void MrroRdsDataTA( TBool aTaOn );
+    void MrroRdsDataRTplus( TRdsRTplusClass aRtPlusClass, TRdsRadioText& aRtPlusData );
+    void MrroRdsSearchBeginAF();
+    void MrroRdsSearchEndAF( TInt aError, TInt aFrequency );
+    void MrroRdsStationChangeTA( TInt aFrequency );
+    void MrroRdsEventAutomaticSwitchingChange( TBool aAuto );
+    void MrroRdsEventAutomaticTrafficAnnouncement( TBool aAuto );
+    void MrroRdsEventSignalChange( TBool aSignal );
+    
+protected: // data
+    /** The radio settings */
+	TRadioSettings& iSettings;
+
+    /** Publish&Subscribe object. Can be NULL. Not owned. */
+    CFMRadioPubSub* iPubSub;
+    
+private: // data
+    
+    /** Array of RDS observers. */
+    RPointerArray<MFMRadioRdsObserver> iObservers;
+    
+    /** The programme service name cache */
+    HBufC* iPsName;
+    
+    /** The radio text data cache */
+    HBufC* iRadioText;
+    
+    /** The cached web URL of the station */
+    RBuf iProgramWebUrl;
+    
+    /** The cached artist name */
+    RBuf iArtistName;
+    
+    /** The cached song name */
+    RBuf iSongName;
+    
+    /** The cached album name */
+    RBuf iAlbumName;
+    
+    /** ETrue if the RDS signal is available */
+    TBool iSignalAvailable;
+
+    /** ETrue if AF is enabled */
+    TBool iAfEnabled;
+    
+    /** Timer to track the PS name changes */
+    CPeriodic* iPsNameTimer;
+
+    /** The type of the PS name */
+    TFMRadioProgrammeSeviceType iPsNameType;
+    };
+
+#endif // CFMRADIORDSRECEIVERBASE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradiordsreceiversimulator.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,106 @@
+/*
+* Copyright (c) 2006-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 RDS receiver simulator for FM Radio
+*
+*/
+
+
+#ifndef CFMRADIORDSRECEIVERSIMULATOR_H
+#define CFMRADIORDSRECEIVERSIMULATOR_H
+
+#include "fmradioengineradiosettings.h"
+#include "fmradiordsobserver.h"
+#include "fmradiordsreceiverbase.h"
+
+NONSHARABLE_CLASS( CFMRadioRdsReceiverSimulator ) : public CFMRadioRdsReceiverBase
+    {
+public:
+
+    /**
+     * The two-phased constructor
+     *
+     * @param aSettings The radio settings
+     */
+    static CFMRadioRdsReceiverSimulator* NewL( TRadioSettings& aSettings );
+
+    /**
+     * The destructor
+     */
+    virtual ~CFMRadioRdsReceiverSimulator();
+
+    // from CFMRadioRdsReceiverBase
+    void InitL( CRadioUtility& aRadioUtility, CFMRadioPubSub* aPubSub );
+    void StartReceiver();
+    void StopReceiver();
+    
+    /**
+     * For simulate MrftoFrequencyChange method from MRadioFmTunerObserver
+     */
+    void SetRadioEngineForRadioFmTunerSimulation( CRadioEngine* aEngine );
+private:
+
+    /** The simulated events */
+    enum TFMRadioRdsSimulationEvent
+        {
+        EFMRadioRdsEventSignalOn,
+        EFMRadioRdsEventSignalOff,
+        EFMRadioRdsEventPS,
+        EFMRadioRdsEventRadioText,
+        EFMRadioRdsEventAFBegin,
+        EFMRadioRdsEventAFEnd,
+        EFMRadioRdsEventRadioTextPlus
+        };
+        
+    /**
+     * The default constructor
+     *
+     * @param aSettings The radio settings
+     */
+    CFMRadioRdsReceiverSimulator( TRadioSettings& aSettings );
+
+    /**
+     * Second phase constructor
+     */
+    void ConstructL();
+
+    /**
+     * StaticRdsSimulationCallback Callback for RDS simulation
+     */
+    static TInt StaticRdsSimulationCallback( TAny* aSelfPtr );
+    
+private: // data
+    
+    /** Timer for RDS event simulation */
+    CPeriodic* iEventSimulatorTimer;
+    
+    /** The iterator for RDS events */
+    TInt iEventIterator;
+    
+    /** The iterator for PS names */
+    TInt iPsIterator;
+    
+    /** The iterator for radio texts */
+    TInt iRadioTextIterator;
+    
+    /** The iterator for frequencies */
+    TInt iFrequencyIterator;
+
+    /** The iterator for radio text plus'*/
+    TInt iRadioTextPlusIterator;
+    
+    /** Pointer to the engine for simulate MrftoFrequencyChange method from MRadioFmTunerObserver */
+    CRadioEngine* iEngine;
+    };
+
+#endif // CFMRADIORDSRECEIVERSIMULATOR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradioregion.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,149 @@
+/*
+* Copyright (c) 2004-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:  Header file for CFMRadioRegion
+*
+*/
+
+
+#ifndef FMRADIOREGION_H
+#define FMRADIOREGION_H
+
+//  INCLUDES
+#include <e32base.h>
+#include "fmradioengine.hrh"
+
+// FORWARD DECLARATIONS
+class CFMRadioRegion;
+class TResourceReader;
+
+// DATA TYPES
+typedef RPointerArray<CFMRadioRegion> RFMRadioRegionArray;
+typedef RPointerArray<HBufC16> RFMRadioCountryCodeArray;
+
+// CLASS DECLARATION
+
+/**
+*  Class CFMRadioRegion provides information about FM region
+*/
+NONSHARABLE_CLASS( CFMRadioRegion ) : public CBase
+    {
+    public:  // Methods
+
+	// Constructors and destructor
+        
+        /**
+        * Static constructor.
+        */
+        static CFMRadioRegion* NewL(TResourceReader& aRr);
+        
+        /**
+        * Destructor.
+        */
+         ~CFMRadioRegion();
+
+
+	// New methods
+
+        /**
+        * Id Get the id of region
+        * @return id of region
+        */
+		TFMRadioRegionSetting Id() const;
+
+		/**
+        * StepSize Get the step interval of region
+        * @return Step size
+        */
+		TUint32 StepSize() const;
+
+		/**
+        * Get the minimum frequency of region
+        * @return Minimum frequency
+        */
+		TUint32 MinFrequency() const;
+
+		/**
+        * Get the maximum frequency of region
+        * @return Maximum frequency
+        */
+		TUint32 MaxFrequency() const;
+		
+		/**
+        * Get the decimal count of region.
+        * @return Decimal count.
+        */
+		TInt DecimalCount() const;
+
+		/**
+        * CountryCode Get the country code of region
+        * @return Country code, or empty descriptor if country code doesn't exist
+        */
+		const RFMRadioCountryCodeArray& CountryCodes();
+
+		/**
+        * Name Get the name of region
+        * @return Name of region
+        */
+	 	const TDesC16& Name() const;
+        
+        /**
+        * SettingItemName Get the name of region for setting item
+        * @return Name of region
+        */
+		const TDesC16& SettingItemName() const;
+
+    private: //Methods
+
+        /**
+        * C++ default constructor.
+        */
+    	CFMRadioRegion();
+
+        /**
+        * By default Symbian 2nd phase constructor is private.
+        */
+        void ConstructL(TResourceReader& aRr);
+
+
+    private:    // Data
+		
+    /** Id of the region*/
+		TFMRadioRegionSetting		iId;
+		
+		/** Step interval*/
+		TUint16				iStepSize;
+		
+		/** Min frequency */
+		TUint32				iMinFreq;
+		
+		/** Max frequency */
+		TUint32				iMaxFreq;
+		
+		/** Decimal count */
+		TInt				iDecimalCount;
+		
+		/** Country code*/
+		RFMRadioCountryCodeArray iCountryCodes;
+		
+		/** Region name*/
+		HBufC16*			iName;
+		
+		/** Region name for setting item*/
+		HBufC16*			iSettingName;
+
+    };
+
+#endif      // FMRADIOREGION_H   
+            
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradiosystemeventdetector.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,129 @@
+/*
+* Copyright (c) 2004-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:  Header file for CFMRadioSystemEventDetector.
+*
+*/
+
+
+#ifndef CFMRADIOSYSTEMEVENTDETECTOR_H
+#define CFMRADIOSYSTEMEVENTDETECTOR_H
+
+#include <e32base.h>
+
+#include "fmradiopropertyobserver.h"
+
+class MFMRadioSystemEventDetectorObserver;
+
+/** System properties mappings */
+enum TFMRadioSystemEvents
+   {
+   EFMRadioNetworkCoverageProperty = 0,
+   EFMRadioCallProperty,
+   EFMRadioAudioResourcesProperty,
+   EFMRadioVoiceUiProperty
+   };
+
+/**
+* Catches notification of the call and network state changes.
+*
+* Class provides implementation to detect system events and notify UI components of the event,
+* Class keeps several instances of CFMRadioPropertyObserver, and those instances send event notifications 
+* about the particular system component state change. 
+*/
+class CFMRadioSystemEventDetector : public CBase, public MFMRadioPropertyChangeObserver
+    {
+    public:
+
+        /**
+        * Two-phased constructor.
+        * @param aObserver a reference to the observer interface implementer
+        */
+        static CFMRadioSystemEventDetector* NewL(MFMRadioSystemEventDetectorObserver&  aObserver);
+        
+        /**
+        * Destructor.
+        */
+        virtual ~CFMRadioSystemEventDetector();
+
+		/**
+		* Returns network coverage state.
+		*/
+		TBool IsNetworkCoverage() const;
+
+        /** Is Auto resume allowed; based on categories */		
+		TBool IsAutoResumePossible() const;
+		
+		/**
+		* Returns current call state.
+		*/
+		TBool IsCallActive() const;
+
+
+
+    private:
+
+        /**
+        * By default EPOC constructor is private.
+        */
+        void ConstructL();
+
+        /**
+        * C++ default constructor.
+        * @param aObserver a reference to the observer interface implementer     
+        */
+        CFMRadioSystemEventDetector(MFMRadioSystemEventDetectorObserver&  aObserver);
+        /**
+        * Callback for auto resume timer
+        * @param aSelfPtr pointer to itself
+        */        
+        static TInt StaticAutoResumeTimerCallback( TAny* aSelfPtr );
+        /**
+         * Report audio resource availability to observers.  
+         */
+        void NotifyAudioResourcesAvailability();
+    
+        // From base class MFMRadioPropertyChangeObserver
+        void HandlePropertyChangeL(const TUid& aCategory, const TUint aKey, const TInt aValue);
+        void HandlePropertyChangeL(const TUid& aCategory, const TUint aKey, const TDesC8& aValue);
+        void HandlePropertyChangeL(const TUid& aCategory, const TUint aKey, const TDesC& aValue);
+        void HandlePropertyChangeErrorL(const TUid& aCategory, const TUint aKey, TInt aError);
+        
+	private:    // Data
+		
+        /** Array of audio policy categories that radio must not resume after. */
+        RArray<TInt> iNoAutoResumeAudioCategories;
+    
+        /**Observer which will be notified of the call and network state changes*/
+		MFMRadioSystemEventDetectorObserver&  iObserver;
+	
+        /**An array of handlers to Publish & Subscribe interface*/        		
+		RPointerArray<CFMRadioPropertyObserver> iPropertyArray;
+
+		/**Indicator for the network status*/
+		TBool iIsNetworkCoverage;
+		// for tracking currently playing audio clients
+		TInt iNumberOfActiveAudioClients;
+		/** Indicator for Voice UI status. */
+		TBool iIsVoiceUiActive;
+		/** flag for call status */
+		TBool iIsCallActive;
+		/** call status observer */
+		CFMRadioPropertyObserver* iCallStatusObserver;
+        /* timer for audio auto resume */
+        CPeriodic* iAutoResumeTimer;		
+		
+    };
+
+#endif // CFMRADIOSYSTEMEVENTDETECTOR_H
+            
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradiosystemeventdetectorobserver.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,67 @@
+/*
+* Copyright (c) 2004-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:  Interface to observe system events.
+*     			 Implementer will be notified each time particular system component 
+* 				 state has changed.
+*
+*/
+
+
+#ifndef MFMRADIOSYSTEMEVENTDETECTOROBSERVER_H
+#define MFMRADIOSYSTEMEVENTDETECTOROBSERVER_H
+
+// CLASS DECLARATION
+/**
+*  
+*  Observer for the call and network state. Implementer will be notified each time the state has changed
+*/
+class MFMRadioSystemEventDetectorObserver 
+    {
+    public: // New functions
+
+		/**
+		* This callback notifies when networks comes up.
+		*/
+		virtual void NetworkUpCallbackL() = 0;
+
+		/**
+		* This callback notifies when network goes down.
+		*/
+		virtual void NetworkDownCallbackL() = 0;
+		
+		/**
+		* This callback notifies when audio resources become available.
+		*/
+		virtual void AudioResourcesAvailableL() = 0;
+		
+		/**
+		* This callback notifies when audio auto resuming is forbidden.
+		*/
+		virtual void AudioAutoResumeForbiddenL() = 0;
+		
+		/**
+		* This callback notifies when call becomes active.
+		*/
+		virtual void CallActivatedCallbackL() = 0;
+
+		/**
+		* This callback notifies when call becomes deactive.
+		*/
+		virtual void CallDeactivatedCallbackL() = 0;
+
+    };
+
+#endif // MFMRADIOSYSTEMEVENTDETECTOROBSERVER_H   
+            
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/inc/fmradiosystemutils.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,39 @@
+/*
+* 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:  FM Radio related definitions
+*
+*/
+
+#ifndef FMRADIOSYSTEMUTILS_H
+#define FMRADIOSYSTEMUTILS_H
+
+#include <e32std.h>
+
+/** Direction of tuning */
+enum TFMRadioTuneDirection
+    {
+    EFMRadioDown, 
+    EFMRadioUp 
+    };
+
+/** Direction when setting the volume */
+enum TFMRadioVolumeSetDirection
+    {
+    EFMRadioDecVolume,
+    EFMRadioIncVolume
+    };
+
+#endif // FMRADIOSYSTEMUTILS_H
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/rom/fmradioengine.iby	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,35 @@
+/*
+* 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:  File for listing dll's needed
+*
+*/
+
+
+
+#ifndef FMRADIOENGINE_IBY
+#define FMRADIOENGINE_IBY
+
+#include <bldvariant.hrh>
+#ifdef __S60_FM_RADIO_APPLICATION
+file=ABI_DIR\BUILD_DIR\fmradioengine.dll            SHARED_LIB_DIR\fmradioengine.dll
+
+// Backup
+data=ZPRIVATE\2001B25E\backup_registration.xml      PRIVATE\2001B25E\backup_registration.xml
+// Cenrep
+data=ZPRIVATE\10202BE9\2001B25E.txt                 PRIVATE\10202BE9\2001B25E.txt
+
+#endif // __S60_FM_RADIO_APPLICATION
+#endif // FMRADIOENGINE_IBY
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/src/fmradioaccessoryconnection.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,214 @@
+/*
+* 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:  Observer of accessory connection.
+*
+*/
+#include "fmradiovariant.hrh" // include first for variation
+#include <AccessoryServer.h>
+#include <AccessoryConnection.h>
+#include <AccPolGenericID.h>
+#include <AccPolGenericIDArray.h>
+#include <AccPolGenericIdDefinitions.h>
+
+#include "fmradioaccessoryconnection.h"
+#include "fmradioheadseteventobserver.h"
+#include "debug.h"
+
+#ifdef __FMRADIO_ADVANCED_AUTO_RESUME // same flag can be used to determine correct mask
+#include <internal/accpolpropgenericid.h>
+const TUint KPhysicalConnectionBitmask = KPCNokiaAV | KPCWired;
+#else 
+const TUint KPhysicalConnectionBitmask = KPCWired;
+#endif // __FMRADIO_ADVANCED_AUTO_RESUME
+
+// ---------------------------------------------------------------------------
+// CFMRadioAccessoryConnection::CFMRadioAccessoryConnection
+// ---------------------------------------------------------------------------
+//
+CFMRadioAccessoryConnection::CFMRadioAccessoryConnection() :
+    CActive(EPriorityStandard), iObserver ( NULL ),
+        iWiredHeadsetConnected ( EFalse ), iAccessoryCount( 0 )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAccessoryConnection::NewL
+// ---------------------------------------------------------------------------
+//
+CFMRadioAccessoryConnection* CFMRadioAccessoryConnection::NewL()
+    {
+    CFMRadioAccessoryConnection* self = new (ELeave) CFMRadioAccessoryConnection();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop(); // self;
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAccessoryConnection::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAccessoryConnection::ConstructL()
+    {
+    FTRACE( FPrint(_L("CFMRadioAccessoryConnection::ConstructL() -- ENTER") ) )
+    
+    // Creates a new session and sub-session.
+    User::LeaveIfError( iAccessoryServer.Connect() );
+    User::LeaveIfError( iAccessoryConnection.CreateSubSession( iAccessoryServer ) );
+    User::LeaveIfError( iAccessoryConnection.GetAccessoryConnectionStatus( iAccessoryArray ) );
+    
+    iWiredHeadsetConnected = WiredHeadsetInArrayL();
+    iAccessoryCount = iAccessoryArray.Count();
+    CActiveScheduler::Add(this); // Add to scheduler
+    
+    iAccessoryConnection.NotifyAccessoryConnectionStatusChanged( iStatus, iAccessoryArray );
+    SetActive(); // Tell scheduler a request is active
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAccessoryConnection::~CFMRadioAccessoryConnection
+// ---------------------------------------------------------------------------
+//
+CFMRadioAccessoryConnection::~CFMRadioAccessoryConnection()
+    {
+    Cancel(); // Cancel any request, if outstanding
+    iAccessoryConnection.CloseSubSession();
+    iAccessoryServer.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAccessoryConnection::DoCancel
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAccessoryConnection::DoCancel()
+    {
+    iAccessoryConnection.CancelNotifyAccessoryConnectionStatusChanged();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAccessoryConnection::WiredHeadsetInArrayL
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioAccessoryConnection::WiredHeadsetInArrayL()
+    {
+    FTRACE(FPrint(_L("CFMRadioAccessoryConnection::WiredHeadsetInArray()-- ENTER")));
+    TAccPolGenericID genId;
+    TUint32 devCaps;
+    TUint32 phyCaps;
+    
+    for ( TInt i = 0; i < iAccessoryArray.Count(); i++ )
+        {
+        genId = iAccessoryArray.GetGenericIDL( i );
+        devCaps = genId.DeviceTypeCaps();
+        phyCaps = genId.PhysicalConnectionCaps();
+        FTRACE(FPrint(_L("CFMRadioAccessoryConnection::devCaps-- %u"), devCaps ));
+        FTRACE(FPrint(_L("CFMRadioAccessoryConnection::phyCaps()-- %u"), phyCaps ));
+        
+        //we're explicitly interested about wired headset type, without extra caps masked in
+        if ( devCaps == KDTHeadset && phyCaps == KPhysicalConnectionBitmask )
+            {
+            return ETrue;
+            }
+        }
+    return EFalse;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAccessoryConnection::WiredHeadsetConnected
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioAccessoryConnection::WiredHeadsetConnected()
+    {
+#ifdef __WINS__
+    return ETrue;
+#else
+    return iWiredHeadsetConnected;
+#endif
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAccessoryConnection::WiredHeadsetFirstInArray
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioAccessoryConnection::WiredHeadsetFirstInArrayL()
+    {
+    FTRACE(FPrint(_L("CFMRadioAccessoryConnection::WiredHeadsetFirstInArrayL()-- ENTER")));
+    if ( iAccessoryArray.Count() > 0 )
+        {
+        TAccPolGenericID genId = iAccessoryArray.GetGenericIDL( 0 );
+        
+        TUint32 devCaps = genId.DeviceTypeCaps();
+        TUint32 phyCaps = genId.PhysicalConnectionCaps();
+        
+        FTRACE(FPrint(_L("CFMRadioAccessoryConnection::devCaps-- %u"), devCaps ));
+        FTRACE(FPrint(_L("CFMRadioAccessoryConnection::phyCaps-- %u"), phyCaps ));
+        
+        //we're explicitly interested about wired headset type, without extra caps masked in
+        if ( devCaps == KDTHeadset && phyCaps == KPhysicalConnectionBitmask )
+            {
+            return ETrue;
+            }
+        }
+    return EFalse;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAccessoryConnection::RunL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAccessoryConnection::RunL()
+    {
+    FTRACE(FPrint(_L("CFMRadioAccessoryConnection::RunL()-- ENTER")));
+    if ( iStatus == KErrNone )
+        {
+        if ( iAccessoryCount < iAccessoryArray.Count() )
+            { //accessory has been added
+            if ( WiredHeadsetFirstInArrayL() ) //and it is a wired headset
+                {
+                iWiredHeadsetConnected = ETrue;
+                if ( iObserver )
+                    {
+                    iObserver->HeadsetAccessoryConnectedCallbackL();
+                    }
+                }
+            }
+        else
+            { //accessory has been removed
+            if ( !WiredHeadsetInArrayL() ) // and it is a wired headset
+                {
+                iWiredHeadsetConnected = EFalse;
+                if ( iObserver )
+                    {
+                    iObserver->HeadsetAccessoryDisconnectedCallbackL();
+                    }
+                }
+            }
+        iAccessoryCount = iAccessoryArray.Count();
+        }
+    //reassign the notification request
+    iAccessoryConnection.NotifyAccessoryConnectionStatusChanged( iStatus, iAccessoryArray );
+    SetActive(); // Tell scheduler a request is active
+    FTRACE(FPrint(_L("CFMRadioAccessoryConnection::RunL()-- EXIT")));
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioAccessoryConnection::SetObserver
+// ---------------------------------------------------------------------------
+//
+void CFMRadioAccessoryConnection::SetObserver( MFMRadioHeadsetEventObserver* aObserver )
+    {
+    iObserver = aObserver;
+    }
+
+//end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/src/fmradioengine.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,1968 @@
+/*
+* 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:  The class implements the core functionality of the Radio Engine
+*
+*/
+
+
+//  INCLUDE FILES
+#include <AudioOutput.h>
+#include <AccMonitor.h>
+#include <bautils.h>
+#include <coemain.h>
+#include <data_caging_path_literals.hrh>
+
+#include "fmradioengine.h"
+#include "fmradioenginestatechangecallback.h"
+#include "debug.h"
+#include "fmradioengineradiosettings.h"
+#include "fmradioengineradiostatehandler.h"
+#include "fmradioenginecentralrepositoryhandler.h"
+#include "fmradioenginecrkeys.h"
+#include "fmradiosystemeventdetector.h"
+#include "fmradiomobilenetworkinfolistener.h"
+#include "fmradiopubsub.h"
+#include "fmradiordsreceiver.h"
+#include "fmradiordsreceiversimulator.h"
+#include "fmradioaccessoryconnection.h"
+
+#ifndef __ACCESSORY_FW
+#include "fmradioenginedosserverobserver.h"
+#endif
+
+// CONSTANTS
+
+const TInt KFMRadioNumberOfVolumeSteps = 20;
+
+// ============================ MEMBER FUNCTIONS ===============================
+// ----------------------------------------------------
+// CRadioEngine::CRadioEngine
+// Default class constructor.
+// ----------------------------------------------------
+//
+CRadioEngine::CRadioEngine(
+    MRadioEngineStateChangeCallback& aCallback)
+    :
+    iCurrentRadioState( EStateRadioOff ),
+    iCallback( aCallback ),
+    iTempFrequency( KDefaultRadioFrequency ),
+    iTunePresetRequested( EFalse ),
+    iInitializeRadioRequestExists( EFalse ),
+    iTunerControl( EStateRadioTunerControlUninitialized )
+    {
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::ConstructL
+// Second phase class constructor.
+// ----------------------------------------------------
+//
+void CRadioEngine::ConstructL()
+    {
+    FTRACE(FPrint(_L("CRadioEngine::ConstructL()")));
+        
+    InitializeResourceLoadingL(); 
+
+    iRadioSettings = new ( ELeave ) TRadioSettings;
+    
+    iCentralRepositoryHandler = CCentralRepositoryHandler::NewL( *iRadioSettings );
+        
+#ifdef __WINS__
+    // NetworkInfoListener takes care of listening to the network id and country code.
+    iNetworkInfoListener = CFMRadioMobileNetworkInfoListener::NewL( *this );
+#endif
+    
+    // for monitoring network availability
+	iSystemEventDetector = CFMRadioSystemEventDetector::NewL( *this );
+	
+    // create an instance of Radio Utility factory and indicate
+    // FM Radio is a primary client
+    iRadioUtility = CRadioUtility::NewL( ETrue );
+
+    // Get a tuner utility
+    iFmTunerUtility = &iRadioUtility->RadioFmTunerUtilityL( *this );
+    iFmTunerUtility->EnableTunerInOfflineMode( ETrue );
+    
+    // Get a player utility
+    iPlayerUtility = &iRadioUtility->RadioPlayerUtilityL( *this );
+
+    TInt maxVolume = 0;
+    iPlayerUtility->GetMaxVolume( maxVolume );
+    FTRACE(FPrint(_L("CRadioEngine::ConstructL()  maxVolume %d"), maxVolume ) );
+    // calculate multiplier for scaling the UI volume to the value used by DevSound
+    iUiVolumeFactor = ( static_cast<TReal> ( maxVolume ) / KFMRadioNumberOfVolumeSteps );
+    
+    
+    // Get a preset utility
+    iPresetUtility = CRadioFmPresetUtility::NewL( *this );
+    
+#ifdef __WINS__
+    iRdsReceiver = CFMRadioRdsReceiverSimulator::NewL( *iRadioSettings );
+    static_cast<CFMRadioRdsReceiverSimulator*> ( iRdsReceiver )->SetRadioEngineForRadioFmTunerSimulation( this );
+#else
+    iRdsReceiver = CFMRadioRdsReceiver::NewL( *iRadioSettings );
+#endif
+    
+    iRdsReceiver->AddObserver( this );
+    
+    iStateHandler = CRadioStateHandler::NewL( this );
+
+#ifndef __ACCESSORY_FW
+    iDosServerObserver = CDosServerObserver::NewL( this, iRadioSettings );
+#else
+#ifndef __WINS
+    TRAP_IGNORE( iAudioOutput = CAudioOutput::NewL( *iPlayerUtility ) );
+#endif
+#endif
+    
+    iTopFrequency = 0;
+    iBottomFrequency = 0;
+
+    if ( iSystemEventDetector->IsCallActive() )
+        {
+        // Pre-empted due to phone call
+        iInCall = ETrue;
+        }
+    // accessory observer
+    iHeadsetObserver = CFMRadioAccessoryConnection::NewL();
+    iHeadsetObserver->SetObserver( this );    
+    // Set audio output to current setting
+    if ( iHeadsetObserver->WiredHeadsetConnected() )
+        {
+        SetAudioOutput( EFMRadioOutputHeadset );
+        }
+    else
+        {
+        SetAudioOutput( EFMRadioOutputIHF );
+        }
+    // Assume headset is connected, we'll be notified later if it's not.
+    iRadioSettings->SetHeadsetConnected();
+    
+
+    // Create P&S interface.
+    iPubSub = CFMRadioPubSub::NewL();
+    
+    // Publish antenna status as connected, we'll be notified later if it's not.
+    iPubSub->PublishAntennaStatusL( EFMRadioPSHeadsetConnected );
+    
+    iPubSub->PublishFrequencyDecimalCountL( 
+            TFMRadioPSFrequencyDecimalCount( iRadioSettings->DecimalCount() ) );
+
+    FTRACE(FPrint(_L("CRadioEngine::ConstructL() End ")));
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::NewL
+// Two-phased class constructor.
+// ----------------------------------------------------
+//
+EXPORT_C CRadioEngine* CRadioEngine::NewL(
+    MRadioEngineStateChangeCallback& aCallback )
+    {
+    CRadioEngine* self = new (ELeave) CRadioEngine( aCallback );
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::~CRadioEngine
+// Destructor of CRadioEngine class.
+// ----------------------------------------------------
+////
+EXPORT_C CRadioEngine::~CRadioEngine()
+    {
+    FTRACE(FPrint(_L("CRadioEngine::~CRadioEngine()")));
+    if ( iCentralRepositoryHandler) 
+        {
+        iCentralRepositoryHandler->SaveEngineSettings();
+        delete iCentralRepositoryHandler;
+        }
+        
+    delete iPubSub;
+    delete iHeadsetObserver;
+	
+	RadioOff();
+	        
+	delete iNetworkInfoListener;     
+	delete iSystemEventDetector;      
+    delete iPresetUtility;
+    delete iRadioSettings;
+    delete iStateHandler;
+
+    if ( iAudioOutput )
+        {
+        TRAP_IGNORE(iAudioOutput->SetAudioOutputL(CAudioOutput::EPrivate));
+        delete iAudioOutput;
+        }
+
+    if ( iRdsReceiver )
+        {
+        iRdsReceiver->RemoveObserver( this );
+        }
+
+    delete iRdsReceiver;
+    
+    if ( iFmTunerUtility )
+        {
+        iFmTunerUtility->Close();
+        }
+
+    if ( iPlayerUtility )
+        {
+        iPlayerUtility->Close();
+        }
+
+    delete iRadioUtility;
+
+    #ifndef __ACCESSORY_FW
+    if (iDosServerObserver)
+        {
+        iDosServerObserver->SetAudioRouting(EFMRadioOutputHeadset);
+        delete iDosServerObserver;
+        }
+    #endif
+        
+	if ( iFMRadioEngineResourceOffset > 0 )
+        {
+        CCoeEnv::Static()->DeleteResourceFile( iFMRadioEngineResourceOffset );
+        }
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::InitializeRadio
+// Set radio settings to their default values.
+// Returns: None
+// ----------------------------------------------------
+//
+EXPORT_C void CRadioEngine::InitializeRadio()
+      {
+      FTRACE(FPrint(_L("CRadioEngine::InitializeRadio()")));
+      iInitializeRadioRequestExists = ETrue;
+      Tune( iRadioSettings->Frequency() );
+#ifdef __WINS__
+      // MrftoRequestTunerControlComplete never completes in WINS, so initialize RdsReceiver here
+      TRAP_IGNORE( iRdsReceiver->InitL( *iRadioUtility, iPubSub ) );
+#endif
+      }
+
+// ----------------------------------------------------
+// CRadioEngine::RadioOn
+// Start the radio.
+// ----------------------------------------------------
+//
+EXPORT_C void CRadioEngine::RadioOn()
+    {
+    FTRACE(FPrint(_L("CRadioEngine::RadioOn()")));
+    if ( !iRadioSettings->IsRadioOn() )
+        {
+        FTRACE(FPrint(_L("CRadioEngine::RadioOn() - Turning Radio on, calling play")));
+        iRadioSettings->SetRadioOn();
+        iPlayerUtility->Play();
+        
+        if ( iPubSub )
+            {
+            TRAP_IGNORE( iPubSub->PublishStateL( ETrue ) );
+            }
+       }
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::RadioOff
+// Stops the radio.
+// ----------------------------------------------------
+//
+EXPORT_C void CRadioEngine::RadioOff()
+    {
+    FTRACE(FPrint(_L("CRadioEngine::RadioOff()")));
+    if ( iStateHandler )
+        {
+        iStateHandler->Cancel();
+        }
+
+    iCurrentRadioState = EStateRadioOff;
+
+    if( iFmTunerUtility &&
+        iRadioSettings &&
+        iRadioSettings->RadioMode() == ERadioTunerMode )
+        {
+        CancelScan();
+        }
+
+    if ( iPlayerUtility &&
+         iPlayerUtility->PlayerState() == ERadioPlayerPlaying )
+        {
+        iPlayerUtility->Stop();
+        }
+    
+    if ( iPubSub )
+        {
+        TRAP_IGNORE( iPubSub->PublishStateL( EFalse ) );
+        }
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::IsRadioOn
+// Returns the radio status.
+// ----------------------------------------------------
+//
+EXPORT_C TBool CRadioEngine::IsRadioOn()
+	{
+	return iRadioSettings->IsRadioOn();
+	}
+
+// ----------------------------------------------------
+// CRadioEngine::IsOfflineProfileL
+// Checks if offine profile is current active profile
+// Returns: true/false 
+// ----------------------------------------------------
+//
+EXPORT_C TBool CRadioEngine::IsOfflineProfileL()
+	{
+	return iCentralRepositoryHandler->IsOfflineProfileActiveL();
+	}
+
+// ----------------------------------------------------
+// CRadioEngine::Tune
+// Tune to the specified frequency
+// ----------------------------------------------------
+//
+EXPORT_C void CRadioEngine::Tune( TInt aFrequency, TRadioMode aRadioMode )
+    {
+    FTRACE(FPrint(_L("CRadioEngine::Tune()")));
+    iTempFrequency = aFrequency;
+
+    iRadioSettings->SetRadioMode( aRadioMode );
+    if ( iTunerControl == EStateRadioTunerControlOn && iRadioSettings->IsHeadsetConnected() )
+        {
+        iFmTunerUtility->SetFrequency( aFrequency );
+        }
+    else
+        {
+        StoreAndPublishFrequency( aFrequency );
+        }
+    if ( iPubSub )
+    	{
+        TRAP_IGNORE
+            (
+            iPubSub->PublishFrequencyL( aFrequency );
+            if( aRadioMode == ERadioTunerMode )
+                {
+                iPubSub->PublishChannelNameL( KNullDesC );
+                iPubSub->PublishChannelL( KErrNotFound );
+                }
+            )
+    	}
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::SetTunerModeOn
+// ----------------------------------------------------
+//
+EXPORT_C void CRadioEngine::SetTunerModeOn()
+    {
+    FTRACE(FPrint(_L("CRadioEngine::SetTunerModeOn()")));
+    
+    iRadioSettings->SetRadioMode( ERadioTunerMode );
+    
+    if ( iPubSub )
+        {
+        TRAP_IGNORE
+            (
+            iPubSub->PublishChannelNameL( KNullDesC );
+            iPubSub->PublishChannelL( KErrNotFound );
+            )
+        }
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::ScanUp
+// Scan up to the next available frequency
+// ----------------------------------------------------
+//
+EXPORT_C void CRadioEngine::ScanUp()
+    {
+    iRadioSettings->SetRadioMode(ERadioTunerMode);
+    iFmTunerUtility->StationSeek( ETrue );
+    TRAP_IGNORE
+        (
+        iTuningState = EFMRadioPSTuningStarted;
+        iPubSub->PublishTuningStateL( iTuningState );
+        iPubSub->PublishChannelNameL( KNullDesC );
+        iPubSub->PublishChannelL( KErrNotFound );
+        )
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::ScanDown
+// Scan down to the last available frequency
+// ----------------------------------------------------
+//
+EXPORT_C void CRadioEngine::ScanDown()
+    {
+    iRadioSettings->SetRadioMode(ERadioTunerMode);
+    iFmTunerUtility->StationSeek( EFalse );
+    TRAP_IGNORE
+        (
+        iTuningState = EFMRadioPSTuningStarted;
+        iPubSub->PublishTuningStateL( iTuningState );
+        iPubSub->PublishChannelNameL( KNullDesC );
+        iPubSub->PublishChannelL( KErrNotFound );
+        )
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::CancelScan
+// Cancel previously requested scan, and return to the
+// already tuned frequency
+// ----------------------------------------------------
+//
+EXPORT_C void CRadioEngine::CancelScan()
+    {
+    if( iFmTunerUtility )
+        {
+        iFmTunerUtility->CancelStationSeek();
+        iTuningState = EFMRadioPSTuningUninitialized;
+        TRAP_IGNORE(iPubSub->PublishTuningStateL( iTuningState ));
+        }
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::IsHeadsetConnected
+// Check whether the headset is currently connected
+// Returns: true/false
+// ----------------------------------------------------
+//
+EXPORT_C TBool CRadioEngine::IsHeadsetConnected() const
+    {
+    return iRadioSettings->IsHeadsetConnected();
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::IsFlightmodeEnabled
+// Check whether flight mode is currently enabled
+// Returns: true/false
+// ----------------------------------------------------
+//
+EXPORT_C TBool CRadioEngine::IsFlightModeEnabled() const
+    {
+    return iRadioSettings->IsFlightModeEnabled();
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::SetMuteOn
+// Sets the audio mute state
+// Returns: None
+// ----------------------------------------------------
+//
+EXPORT_C void CRadioEngine::SetMuteOn(
+    TBool aMuteOn)  // a flag indicating if set mute on
+    {
+    FTRACE(FPrint(_L("CRadioEngine::SetMuteOn()")));
+    TInt error = KErrNone;
+    if ( IsMuteOn()  && (!aMuteOn) )
+        {
+        error = iPlayerUtility->Mute( EFalse );
+        if( !error )
+            {
+            FTRACE(FPrint(_L("CRadioEngine::SetMuteOn() setting mute off")));
+            iRadioSettings->SetMuteOff();
+            TRAP_IGNORE(iPubSub->PublishRadioMuteStateL(EFalse));
+            }
+        }
+    else if ( !IsMuteOn() && aMuteOn )
+        {
+        error = iPlayerUtility->Mute( ETrue );
+        if( !error )
+            {
+            FTRACE(FPrint(_L("CRadioEngine::SetMuteOn() setting mute on")));
+            iRadioSettings->SetMuteOn();
+            TRAP_IGNORE(iPubSub->PublishRadioMuteStateL(ETrue));
+            }
+        }
+    iStateHandler->Callback( MRadioEngineStateChangeCallback::EFMRadioEventSetMuteState, error );
+    }
+
+
+// ----------------------------------------------------
+// CRadioEngine::IsMuteOn
+// Gets the audio mute state
+// Returns: true/false
+// ----------------------------------------------------
+//
+EXPORT_C TBool CRadioEngine::IsMuteOn() const
+    {
+    return iRadioSettings->IsMuteOn();
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::GetPresetIndex
+// Retrieve the currently selected channel
+// Returns: the preset channel index
+// ----------------------------------------------------
+//
+EXPORT_C TInt CRadioEngine::GetPresetIndex() const
+    {
+    return iRadioSettings->CurrentPreset();
+    }
+
+
+// ----------------------------------------------------
+// CRadioEngine::SetPresetFrequency
+// Update the channel located at the index to use the frequency specified.
+// Returns: None
+// ----------------------------------------------------
+//
+EXPORT_C void CRadioEngine::SetPresetNameFrequencyL(
+    TInt aIndex, // preset channel index
+    const TStationName& aStationName,
+    TInt aFrequency) // preset channel frequency
+    {
+    iPresetUtility->SetPresetL(aIndex, aStationName, aFrequency);
+    if( aIndex == iRadioSettings->CurrentPreset() )
+        {
+        iPubSub->PublishChannelNameL( aStationName );
+        if( aFrequency == 0 )
+            {
+            // Current preset was deleted
+            iPubSub->PublishChannelL( KErrNotFound );
+            }
+        }
+    iPubSub->PublishChannelDataChangedL( aIndex );
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::GetPresetFrequency
+// Retrieve the channel frequency at the index specified
+// Returns: tmpFrequency: preset frequency
+// ----------------------------------------------------
+//
+EXPORT_C TInt CRadioEngine::GetPresetFrequencyL(
+    TInt aIndex) const  // preset channel index
+    {
+    TInt tmpFrequency = KDefaultRadioFrequency;
+    TStationName tmpStationName;
+
+    iPresetUtility->GetPresetL( aIndex, tmpStationName, tmpFrequency );
+
+    FTRACE(FPrint(_L("CRadioEngine::GetPresetFrequencyL()  aIndex %d"), aIndex));
+    FTRACE(FPrint(_L("CRadioEngine::GetPresetFrequencyL()  Freq %d"), tmpFrequency));
+    FTRACE(FPrint(_L("CRadioEngine::GetPresetFrequencyL()  Name %S"), &tmpStationName));
+    return tmpFrequency;
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::GetPresetName
+// Retrieve the channel name at the index specified
+// Returns: tmpStationName: the channel name
+// ----------------------------------------------------
+//
+EXPORT_C CRadioEngine::TStationName& CRadioEngine::GetPresetNameL( TInt aIndex )
+	{		
+    TInt tmpFrequency;
+
+    iPresetUtility->GetPresetL(aIndex, iStationName, tmpFrequency);
+    FTRACE(FPrint(_L("CRadioEngine::GetPresetFrequencyL()  Freq %d"),tmpFrequency));
+    FTRACE(FPrint(_L("CRadioEngine::GetPresetFrequencyL()  Name %S"),&iStationName));
+    return iStationName; 
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::GetPresetNameAndFrequencyL
+// get preset name frequency from the preset utility
+// ----------------------------------------------------
+//
+EXPORT_C void CRadioEngine::GetPresetNameAndFrequencyL( TInt aIndex, TDes& aName, TInt& aFrequency )
+    {
+    TInt tmpFrequency;
+    TStationName tmpStationName;
+    
+    iPresetUtility->GetPresetL( aIndex, tmpStationName, tmpFrequency );
+
+    aFrequency = tmpFrequency;
+    aName = tmpStationName;
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::GetTunedFrequency
+// Retrieves the current frequency.
+// Returns: channel frequency
+// ----------------------------------------------------
+//
+EXPORT_C TInt CRadioEngine::GetTunedFrequency() const
+    {
+    return iRadioSettings->Frequency();
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::SetVolume
+// Sets the volume level of the FM radio
+// ----------------------------------------------------
+//
+EXPORT_C void CRadioEngine::SetVolume(
+    TInt aVolume )
+    {
+    FTRACE(FPrint(_L("CRadioEngine::SetVolume( %d )"), aVolume ));
+    
+    if ( aVolume < 0 )
+        {
+        aVolume = 0;
+        }
+    else if ( aVolume > KFMRadioNumberOfVolumeSteps )
+        {
+        aVolume = KFMRadioNumberOfVolumeSteps;
+        }
+    
+    TInt playerVolume = ( iUiVolumeFactor * aVolume );
+    
+    FTRACE(FPrint(_L("CRadioEngine::SetVolume() playerVolume %d"), playerVolume ));
+    
+    TInt error = iPlayerUtility->SetVolume( playerVolume );
+    
+    if ( !error )
+        {
+        if ( iRadioSettings->AudioOutput() == EFMRadioOutputHeadset )
+            {
+            iRadioSettings->SetHeadsetVolume( aVolume );
+            iCentralRepositoryHandler->SaveHeadsetVolumeSetting();
+            }
+        else
+            {
+             iRadioSettings->SetSpeakerVolume( aVolume );
+             iCentralRepositoryHandler->SaveSpeakerVolumeSetting();
+            }
+        }
+    else
+        {
+        iStateHandler->Callback( MRadioEngineStateChangeCallback::EFMRadioEventVolumeUpdated, error );
+        }
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::GetRadioMode
+// Retrieves the current radio mode (tuner or preset).
+// Returns: radio mode
+// ----------------------------------------------------
+//
+EXPORT_C CRadioEngine::TRadioMode CRadioEngine::GetRadioMode() const
+    {
+    return iRadioSettings->RadioMode();
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::GetVolume
+// Gets the volumelevel.
+// Returns: volume
+// ----------------------------------------------------
+//
+EXPORT_C TInt CRadioEngine::GetVolume() const
+    {
+    if ( iRadioSettings->AudioOutput() == EFMRadioOutputHeadset )
+        {
+        return iRadioSettings->HeadsetVolume();
+        }
+    else
+        {
+        return iRadioSettings->SpeakerVolume();
+        }
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::GetMaxVolume
+// Gets the max volumelevel.
+// Returns: max volume
+// ----------------------------------------------------
+//
+EXPORT_C TInt CRadioEngine::GetMaxVolume() const
+    {
+    TInt maxVolume;
+    iPlayerUtility->GetMaxVolume( maxVolume );
+    return maxVolume;
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::GetAudioMode
+// Gets the current audio mode.
+// ----------------------------------------------------
+//
+EXPORT_C TInt CRadioEngine::GetAudioMode() const
+    {
+    return iRadioSettings->AudioMode();
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::SetAudioMode
+// Set the radio's audio mode (stereo or mono)
+// ----------------------------------------------------
+//
+EXPORT_C void CRadioEngine::SetAudioMode( const TFMRadioAudioMode aAudioMode )
+    {
+    FTRACE(FPrint(_L("CRadioEngine::SetAudioMode")));
+    TBool forcedMono = EFalse;
+    TInt res = KErrNone;
+    TFMRadioAudioMode audioMode = iRadioSettings->AudioMode();
+    if (audioMode != aAudioMode)
+        {
+        if ( aAudioMode == EFMRadioMono )
+            {
+            forcedMono = ETrue;
+            }
+        res = iFmTunerUtility->ForceMonoReception( forcedMono );
+        if ( res )
+            {
+            iRadioSettings->SetAudioMode( aAudioMode );
+            }
+        }
+    iStateHandler->Callback( MRadioEngineStateChangeCallback::EFMRadioEventSetAudioMode, res );
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::GetAudioOutput
+// Retrieve the current audio output
+// Returns: audio output
+// ----------------------------------------------------
+//
+EXPORT_C CRadioEngine::TFMRadioAudioOutput CRadioEngine::GetAudioOutput() const
+    {
+    return iRadioSettings->AudioOutput();
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::SetAudioOutput
+// Sets the audio Output
+// Returns: None
+// ----------------------------------------------------
+//
+EXPORT_C void CRadioEngine::SetAudioOutput( const TFMRadioAudioOutput aAudioOutput )
+    {
+    FTRACE(FPrint(_L("CRadioEngine::SetAudioOutput() Output = %d"), aAudioOutput));
+    TInt tempError = KErrNone;
+    // use mute here to avoid any audio peaks during output change
+    SetMuteOn( ETrue );
+
+#ifndef __ACCESSORY_FW
+
+    tempError = iDosServerObserver->SetAudioRouting(aAudioOutput);
+    FTRACE(FPrint(_L("CRadioEngine::SetAudioOutput() tempError = %d"), tempError));
+
+#else
+
+    CAudioOutput::TAudioOutputPreference outputPreference = CAudioOutput::EPrivate;
+
+    if ( EFMRadioOutputHeadset == aAudioOutput )
+        {
+        FTRACE(FPrint(_L("CRadioEngine::SetAudioOutput() Headset is set to Output")));
+        outputPreference = CAudioOutput::EPrivate;
+        }
+    else if ( EFMRadioOutputIHF == aAudioOutput )
+        {
+        FTRACE(FPrint(_L("CRadioEngine::SetAudioOutput() IHF is set to Output")));
+        
+        outputPreference = CAudioOutput::EPublic;
+        }
+
+#ifndef __WINS
+    if ( iAudioOutput )
+        {
+        TRAP( tempError, iAudioOutput->SetAudioOutputL( outputPreference ) );
+        }
+#endif
+
+#endif
+
+    if ( KErrNone == tempError )
+        {        
+        if ( !iHeadsetObserver->WiredHeadsetConnected() )
+        	{
+        	iRadioSettings->SetAudioOutput( EFMRadioOutputIHF );
+        	}
+        else
+        	{
+        	iRadioSettings->SetAudioOutput( aAudioOutput );
+        	}
+        }
+
+    iStateHandler->Callback( MRadioEngineStateChangeCallback::EFMRadioEventSetAudioOutput, tempError );
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::SetRdsAfSearchEnable
+// Sets the rds af search enabled
+// Returns: None
+// ----------------------------------------------------
+//
+EXPORT_C void CRadioEngine::SetRdsAfSearchEnable( TBool aEnabled )
+	{
+	TRAP_IGNORE( iRdsReceiver->SetAutomaticSwitchingL( aEnabled ) );	
+	aEnabled ? iRadioSettings->SetRdsAfSearchEnabled() : iRadioSettings->SetRdsAfSearchDisabled();
+	}
+
+// ----------------------------------------------------
+// CRadioEngine::RadioSettings
+// ----------------------------------------------------
+//
+EXPORT_C TRadioSettings& CRadioEngine::RadioSettings( )
+	{
+	return *iRadioSettings;
+	}
+
+// ----------------------------------------------------
+// CRadioEngine::TunePreset
+// Tunes to the chosen channel.
+// Returns: None
+// ----------------------------------------------------
+//
+EXPORT_C void CRadioEngine::TunePresetL( TInt aIndex )
+    {
+    FTRACE(FPrint(_L("CRadioEngine::TunePresetL()")));
+    iRadioSettings->SetCurrentPreset( aIndex );
+    TInt tmpFrequency = 0;// changed back to zero
+    TStationName name;
+
+    iPresetUtility->GetPresetL( aIndex, name, tmpFrequency );
+    // Should not tune if the radio is not on.
+    if ( iRadioSettings->IsRadioOn())
+        {
+        FTRACE(FPrint(_L("CRadioEngine::TunePresetL() inside if")));
+        iTunePresetRequested = ETrue;
+        iTempFrequency = tmpFrequency;
+        Tune(tmpFrequency, ERadioPresetMode);
+        }
+    else
+        {
+        StoreAndPublishFrequency( tmpFrequency );
+        }
+    iPubSub->PublishChannelNameL( name );
+    iPubSub->PublishChannelL( aIndex );
+    iRadioSettings->SetRadioMode(ERadioPresetMode);
+    FTRACE(FPrint(_L("CRadioEngine::TunePresetL() end %d"),tmpFrequency));
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::5
+// Return min and max freq for the specified range (band)
+// ----------------------------------------------------
+//
+EXPORT_C TInt CRadioEngine::GetFrequencyBandRange(
+    TInt& aBottomFrequency,
+    TInt& aTopFrequency)
+    {
+    TBool err = KErrNone;
+    
+    aBottomFrequency = iCentralRepositoryHandler->MinFrequency() * KFMRadioFreqMultiplier;
+	aTopFrequency = iCentralRepositoryHandler->MaxFrequency() * KFMRadioFreqMultiplier;
+
+    return err;
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::IsInCall
+// ----------------------------------------------------
+//
+EXPORT_C TBool CRadioEngine::IsInCall() const
+    {
+    return iInCall;
+    }
+
+// ---------------------------------------------------------
+// CRadioEngine::FrequencySetByRdsAf
+// ---------------------------------------------------------
+//
+EXPORT_C TBool CRadioEngine::FrequencySetByRdsAf() const
+    {
+    return iFrequencySetByRdsAf;
+    }
+
+// ---------------------------------------------------------
+// CRadioEngine::RdsReceiver
+// ---------------------------------------------------------
+//
+EXPORT_C CFMRadioRdsReceiverBase& CRadioEngine::RdsReceiver()
+    {
+    return *iRdsReceiver;
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::HandleFlightModeEnabled
+// Switches the engine into flight mode, and notifies the UI of
+// the change in status.
+// ----------------------------------------------------
+//
+void CRadioEngine::HandleFlightModeEnabled()
+    {
+    FTRACE(FPrint(_L("CRadioEngine::HandleFlightModeEnabled()")));
+    iRadioSettings->SetFlightMode(ETrue);
+    HandleCallback(MRadioEngineStateChangeCallback::EFMRadioEventFlightModeEnabled, KErrNone);
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::HandleFlightModeDisabled
+// Switches the engine out of flight mode, and notifies the UI of
+// the change in status
+// ----------------------------------------------------
+//
+void CRadioEngine::HandleFlightModeDisabled()
+    {
+    FTRACE(FPrint(_L("CRadioEngine::HandleFlightModeDisabled()")));
+    iRadioSettings->SetFlightMode(EFalse);
+    HandleCallback(MRadioEngineStateChangeCallback::EFMRadioEventFlightModeDisabled, KErrNone);
+    }
+
+
+// ----------------------------------------------------
+// CRadioEngine::HandleCallback
+// Calls the User Interface callback function, indicating the event code and
+// error code.
+// ----------------------------------------------------
+//
+void CRadioEngine::HandleCallback(TInt aEventCode, TInt aCode )
+    {
+    FTRACE(FPrint(_L("CRadioEngine::HandleCallback(aEventCode %d, aCode %d "), aEventCode, aCode ) );
+    iCallback.HandleRadioEngineCallBack((MRadioEngineStateChangeCallback::TFMRadioNotifyEvent)aEventCode, aCode);
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::HandleHeadsetButtonPress
+// Notifies UI that the headset button has been pressed
+// ----------------------------------------------------
+//
+void CRadioEngine::HandleHeadsetButtonPress()
+    {
+    FTRACE(FPrint(_L("CRadioEngine::HandleHeadsetButtonPress()")));
+    iStateHandler->Callback(MRadioEngineStateChangeCallback::EFMRadioEventButtonPressed, KErrNone);
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::HeadsetAccessoryConnectedCallbackL
+// ----------------------------------------------------
+//
+void CRadioEngine::HeadsetAccessoryConnectedCallbackL()
+    {
+    FTRACE(FPrint(_L("CRadioEngine::HeadsetAccessoryConnectedCallbackL")));
+    // forward volume changes to headset
+    SetAudioOutput( EFMRadioOutputHeadset );
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::HeadsetAccessoryDisconnectedCallbackL
+// ----------------------------------------------------
+//
+void CRadioEngine::HeadsetAccessoryDisconnectedCallbackL()
+    {
+    FTRACE(FPrint(_L("CRadioEngine::HeadsetAccessoryDisconnectedCallbackL")));
+    // forward volume changes to speakers
+    SetAudioOutput( EFMRadioOutputIHF );
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::MrftoRequestTunerControlComplete
+// ----------------------------------------------------
+//
+void CRadioEngine::MrftoRequestTunerControlComplete( TInt aError )
+    {
+    FTRACE(FPrint(_L("CRadioEngine::MrftoRequestTunerControlComplete() - Error = %d"), aError));
+
+    if ( aError == KErrNone )
+        {
+        iTunerControl = EStateRadioTunerControlOn;
+        // Headset must be connected
+        iRadioSettings->SetHeadsetConnected();
+        iFmTunerUtility->GetCapabilities( iTunerCaps );
+        if( iTunerCaps.iTunerFunctions & TFmTunerCapabilities::ETunerRdsSupport )
+            {
+            TRAP_IGNORE( iRdsReceiver->InitL( *iRadioUtility, iPubSub ) )
+            }
+        
+        TFmRadioFrequencyRange japanFreqRange = EFmRangeJapan;
+        if ( TunerFrequencyRangeForRegionId( RegionId() ) == japanFreqRange )
+            {
+            // region is Japan so we need to change the freq range from the default
+            iFmTunerUtility->SetFrequencyRange( japanFreqRange );
+            }
+        else
+            {
+            // allready on correct freq range
+            HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventTunerReady, KErrNone );
+            }
+        
+        }
+    else if ( aError == KFmRadioErrAntennaNotConnected )
+        {
+        FTRACE(FPrint(_L("CRadioEngine::MrftoRequestTunerControlComplete() - KFmRadioErrAntennaNotConnected")));
+        iTunerControl = EStateRadioTunerControlOff;
+        iRadioSettings->SetHeadsetDisconnected();
+        HandleCallback(MRadioEngineStateChangeCallback::EFMRadioEventHeadsetDisconnected, KErrNone );
+        }
+    else if ( aError == KErrAlreadyExists )
+        {
+        iTunerControl = EStateRadioTunerControlOn;
+        // Headset must be connected
+        iRadioSettings->SetHeadsetConnected();
+        iFmTunerUtility->GetCapabilities( iTunerCaps );
+        TInt frequency;
+        iFmTunerUtility->GetFrequency( frequency );
+        StoreAndPublishFrequency( frequency );
+        HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventTune, KErrNone );
+        }
+    else if ( aError == KFmRadioErrFmTransmitterActive )
+        {
+        iTunerControl = EStateRadioTunerControlOff;
+        HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventFMTransmitterOn, KErrNone );
+        }
+    else if ( aError == KFmRadioErrOfflineMode )
+        {
+        iTunerControl = EStateRadioTunerControlOff;
+        HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventFlightModeEnabled, KErrNone );
+        }
+    else
+        {
+        iTunerControl = EStateRadioTunerControlOff;
+        }
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::MrftoSetFrequencyRangeComplete
+//
+// ----------------------------------------------------
+//
+void CRadioEngine::MrftoSetFrequencyRangeComplete( TInt aError )
+    {
+    if ( aError == KErrNone )
+        {
+        HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventTunerReady, KErrNone );
+        }
+        
+    FTRACE(FPrint(_L("CRadioEngine::MrftoSetFrequencyRangeComplete() - error = %d"), aError));
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::MrftoSetFrequencyComplete
+// ----------------------------------------------------
+//
+void CRadioEngine::MrftoSetFrequencyComplete( TInt aError )
+    {
+    FTRACE(FPrint(_L("CRadioEngine::MrftoSetFrequencyComplete() - aError = %d"), aError));
+
+    if ( !aError )
+        {
+        iRdsReceiver->ClearRdsInformation();
+        StoreAndPublishFrequency( iTempFrequency );
+        if ( iTunePresetRequested )
+            {
+            iCentralRepositoryHandler->SaveEngineSettings();
+            iTunePresetRequested = EFalse;
+            }
+        HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventTune, aError );
+
+        if ( iInitializeRadioRequestExists )
+            {
+            iInitializeRadioRequestExists = EFalse;
+            HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventFMRadioInitialized,  KErrNone );
+            }
+        }
+    else
+        {
+        iInitializeRadioRequestExists = EFalse;
+
+        FTRACE(FPrint(_L("CRadioEngine::MrftoSetFrequencyComplete() - Sending event to UI")));
+        HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventTune, aError );
+        }
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::MrftoStationSeekComplete
+//
+// ----------------------------------------------------
+//
+void CRadioEngine::MrftoStationSeekComplete(
+    TInt aError,
+    TInt aFrequency )
+    {
+    FTRACE(FPrint(_L("CRadioEngine::MrftoStationSeekComplete() - Frequency = %d"), aFrequency));
+    FTRACE(FPrint(_L("CRadioEngine::MrftoStationSeekComplete() - error = %d"), aError));
+
+    if ( !aError )
+        {
+        StoreAndPublishFrequency( aFrequency );
+
+        iRdsReceiver->ClearRdsInformation();
+        StoreAndPublishFrequency( aFrequency );
+        if ( iTunePresetRequested )
+            {
+            iCentralRepositoryHandler->SaveEngineSettings();
+            iTunePresetRequested = EFalse;
+            }
+        iTuningState = EFMRadioPSTuningUninitialized;
+        // Process the callback first because it might change the tuning state and we must avoid switching it back and forth
+        HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventTune, aError );
+        TRAP_IGNORE(iPubSub->PublishTuningStateL( iTuningState ));
+
+        if ( iInitializeRadioRequestExists )
+            {
+            iInitializeRadioRequestExists = EFalse;
+            HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventFMRadioInitialized,  KErrNone );
+            }
+        }
+    else
+        {
+        iInitializeRadioRequestExists = EFalse;
+        if ( aError == KFmRadioErrAntennaNotConnected )
+            {            
+            iRadioSettings->SetHeadsetDisconnected();
+            }
+        FTRACE(FPrint(_L("CRadioEngine::MrftoStationSeekComplete() - Sending event to UI")));
+        iTuningState = EFMRadioPSTuningUninitialized;
+        HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventTune, aError );
+        TRAP_IGNORE(iPubSub->PublishTuningStateL( iTuningState ));
+        }
+    }
+
+
+// ----------------------------------------------------
+// CRadioEngine::MrftoFmTransmitterStatusChange
+// The FM tuner is turned off when FM transmitter is on.
+// ----------------------------------------------------
+//
+void CRadioEngine::MrftoFmTransmitterStatusChange(
+    TBool aActive )
+    {
+    FTRACE(FPrint(_L("CRadioEngine::MrftoFmTransmitterStatusChange() - Active = %d"), aActive));
+    if ( aActive )
+        {
+        // loses tuner control
+        iTunerControl = EStateRadioTunerControlOff;
+        }
+    }
+
+
+// ----------------------------------------------------
+// CRadioEngine::MrftoAntennaStatusChange
+// Called when antenna status changes.
+// ----------------------------------------------------
+//
+void CRadioEngine::MrftoAntennaStatusChange(
+    TBool aAttached )
+    {
+    FTRACE(FPrint(_L("CRadioEngine::MrftoAntennaStatusChange() - Antenna Status = %d"), aAttached));
+    if ( aAttached )
+        {
+        if ( iTunerControl == EStateRadioTunerControlOff )
+            {
+            iFmTunerUtility->RequestTunerControl();
+            }
+        iRadioSettings->SetHeadsetConnected();
+        TRAP_IGNORE( iPubSub->PublishAntennaStatusL( EFMRadioPSHeadsetConnected ) );
+        HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventHeadsetReconnected, KErrNone );
+        }
+    else
+        {
+        iRadioSettings->SetHeadsetDisconnected();
+        TRAP_IGNORE( iPubSub->PublishAntennaStatusL( EFMRadioPSHeadsetDisconnected ) );
+        HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventHeadsetDisconnected, KErrNone );
+        }
+    }
+
+
+// ----------------------------------------------------
+// CRadioEngine::FlightModeChanged
+// Called when offline mode status changes
+// ----------------------------------------------------
+//
+void CRadioEngine::MrftoOfflineModeStatusChange( TBool aOfflineMode )
+    {
+    FTRACE(FPrint(_L("CRadioEngine::MrftoOfflineModeStatusChange() - Offline Mode = %d"), aOfflineMode));
+
+    if ( aOfflineMode )
+        {
+        HandleFlightModeEnabled();
+        }
+    else
+        {
+        if ( iTunerControl == EStateRadioTunerControlOff )
+            {
+            iFmTunerUtility->RequestTunerControl();
+            }
+        HandleFlightModeDisabled();
+        }
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::MrftoFrequencyRangeChange
+//
+// ----------------------------------------------------
+//
+void CRadioEngine::MrftoFrequencyRangeChange(
+    TFmRadioFrequencyRange FDEBUGVAR( aNewRange ) )
+    {
+    FTRACE( FPrint(_L("CRadioEngine::MrftoFrequencyRangeChange() - Band = %d"), aNewRange ) );    
+    }
+
+ // ----------------------------------------------------
+// CRadioEngine::MrftoFrequencyChange
+// Called when the tuned frequency changes
+// ----------------------------------------------------
+//
+void CRadioEngine::MrftoFrequencyChange(
+    TInt aNewFrequency )
+    {
+    FTRACE(FPrint(_L("CRadioEngine::MrftoFrequencyChange() - New Frequency = %d"), aNewFrequency));
+	
+    if ( iRadioSettings->Frequency() != aNewFrequency )
+        {
+        iRdsReceiver->ClearRdsInformation();
+        StoreAndPublishFrequency( aNewFrequency );
+        HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventTune, KErrNone );
+        }
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::MTsoForcedMonoChanged
+// Called when a client enables/disabled forced mono reception
+// ----------------------------------------------------
+//
+void CRadioEngine::MrftoForcedMonoChange(
+    TBool aForcedMono )
+    {
+    FTRACE(FPrint(_L("CRadioEngine::MrftoForcedMonoChange() - Forced Mono = %d"), aForcedMono));
+    if ( aForcedMono )
+        {
+        iRadioSettings->SetAudioMode( EFMRadioMono );
+        }
+    else
+        {
+        iRadioSettings->SetAudioMode( EFMRadioStereo );
+        }
+    HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventSetAudioMode, KErrNone );
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::MrftoSquelchChange
+//
+// error code.
+// ----------------------------------------------------
+//
+void CRadioEngine::MrftoSquelchChange(
+    TBool /*aSquelch*/ )
+    {
+    }
+
+
+// ----------------------------------------------------
+// CRadioEngine::MrpoStateChange This is Tuner State
+// Called when the state of the tuner changes
+// ----------------------------------------------------
+//
+void CRadioEngine::MrpoStateChange(
+    TPlayerState aState,
+    TInt aError )
+    {
+    FTRACE(FPrint(_L("CRadioEngine::MrpoStateChange() - State Change = %d, Error = %d"), aState, aError));
+
+    if ( !aError )
+        {
+        if ( aState == ERadioPlayerPlaying )
+            {
+            iRadioSettings->SetRadioOn();
+            iCurrentRadioState = EStateRadioOn;
+            FTRACE(FPrint(_L("CRadioEngine::MrpoStateChange() Resource Available Error = %d"), aError ));
+            iRdsReceiver->StartReceiver();
+            HandleCallback(MRadioEngineStateChangeCallback::EFMRadioEventRadioOn, KErrNone);
+            }
+        else
+            {
+            iRdsReceiver->StopReceiver();
+            iRadioSettings->SetRadioOff();
+            iCurrentRadioState = EStateRadioOff;
+            HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventRadioOff, KErrNone );
+            }
+        }
+    else
+        {
+        if ( aState == ERadioPlayerIdle && iRadioSettings->IsRadioOn() )
+            {
+            MRadioEngineStateChangeCallback::TFMRadioNotifyEvent ret = 
+            	MRadioEngineStateChangeCallback::EFMRadioEventAudioResourcePaused;
+            iCurrentRadioState = EStateRadioOff;
+            iRdsReceiver->StopReceiver();
+            iRadioSettings->SetRadioOff();
+            if ( ( aError == KErrDied ) ||
+                    ( aError == KErrAccessDenied ) ||
+                    ( aError == KErrNotReady ) ||
+                    ( aError == KErrInUse ) )
+                {
+                // check call status
+                if ( iSystemEventDetector->IsCallActive() )
+                    {
+                    FTRACE(FPrint(_L("CRadioEngine::MrpoStateChange() EFMRadioEventCallStarted") ) );
+                    iInCall = ETrue;
+                    ret = MRadioEngineStateChangeCallback::EFMRadioEventCallStarted;
+                    }
+                }
+            else if ( aError == KErrHardwareNotAvailable ) // Radio is interrupted by FM Transmitter activation.
+                {
+                ret = MRadioEngineStateChangeCallback::EFMRadioEventFMTransmitterOn;
+                }
+            HandleCallback( ret, aError );
+            }
+        }
+    if( iRadioSettings->IsRadioOn() )
+        {
+        TRAP_IGNORE( iPubSub->PublishStateL( ETrue ) )
+        }
+    else
+        {
+        TRAP_IGNORE
+            (
+            iTuningState = EFMRadioPSTuningUninitialized;
+            iPubSub->PublishTuningStateL( iTuningState );
+            iPubSub->PublishStateL( EFalse );
+            )
+        }
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::MrpoVolumeChange
+//
+// ----------------------------------------------------
+//
+void CRadioEngine::MrpoVolumeChange( TInt FDEBUGVAR( aVolume ) )
+    {
+    FTRACE(FPrint(_L("CRadioEngine::MrpoVolumeChange() - Volume = %d"), aVolume) );
+    HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventVolumeUpdated, KErrNone );
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::MrpoMuteChange
+//
+// ----------------------------------------------------
+//
+void CRadioEngine::MrpoMuteChange( TBool aMute )
+    {
+    FTRACE(FPrint(_L("CRadioEngine::MrpoMuteChange() - Mute = %d"), aMute));
+
+    if ( aMute && !iRadioSettings->IsMuteOn() )
+        {
+        iRadioSettings->SetMuteOn();
+        HandleCallback(MRadioEngineStateChangeCallback::EFMRadioEventSetMuteState, KErrNone);
+        }
+    else if ( !aMute && iRadioSettings->IsMuteOn() )
+        {
+        iRadioSettings->SetMuteOff();
+        HandleCallback(MRadioEngineStateChangeCallback::EFMRadioEventSetMuteState, KErrNone);
+        }
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::MrpoBalanceChange
+//
+// ----------------------------------------------------
+//
+void CRadioEngine::MrpoBalanceChange(
+    TInt /*aLeftPercentage*/,
+    TInt /*aRightPercentage*/ )
+    {
+    // Not supported.
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioEngine::MrpeoPresetChanged
+// Observer for Presets
+// -----------------------------------------------------------------------------
+void CRadioEngine::MrpeoPresetChanged(
+    TPresetChangeEvent /*aChange*/,
+    TInt /*aIndex*/ )
+    {
+
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioEngine::NetworkUpCallbackL
+// callback notifies when networks comes up
+// -----------------------------------------------------------------------------
+//
+void CRadioEngine::NetworkUpCallbackL()
+	{
+#ifndef __WINS__
+	
+	if ( !iNetworkInfoListener )
+		{
+		// NetworkInfoListener takes care of listening to the network id and country code.
+		iNetworkInfoListener = CFMRadioMobileNetworkInfoListener::NewL( *this );
+		}
+#endif
+	}
+
+// -----------------------------------------------------------------------------
+// CRadioEngine::NetworkDownCallbackL
+// callback notifies when network goes down
+// -----------------------------------------------------------------------------
+//
+void CRadioEngine::NetworkDownCallbackL()
+	{
+	// No implementation needed	
+	}
+
+// -----------------------------------------------------------------------------
+// CRadioEngine::NetworkIdChanged
+// Used for notifying that the network id has changed
+// -----------------------------------------------------------------------------
+//
+void CRadioEngine::NetworkIdChanged()
+	{
+	// No implementation needed	
+	}
+
+// -----------------------------------------------------------------------------
+// CRadioEngine::AudioResourcesAvailableL
+// This callback notifies when audio resources become available.
+// -----------------------------------------------------------------------------
+//
+void CRadioEngine::AudioResourcesAvailableL()
+    {
+    FTRACE( FPrint( _L("CRadioEngine::AudioResourcesAvailableL()" ) ) );
+    // if iPubSub exists, then the ConstructL has been successfully completed
+    if ( iPubSub && !iInCall && iTunerControl == EStateRadioTunerControlOn ) 
+        {
+        HandleCallback(MRadioEngineStateChangeCallback::EFMRadioEventAudioResourceAvailable, KErrNone );
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioEngine::AudioAutoResumeForbiddenL
+// This callback notifies when audio auto resuming is forbidden.
+// -----------------------------------------------------------------------------
+//
+void CRadioEngine::AudioAutoResumeForbiddenL()
+	{
+	FTRACE( FPrint( _L("CRadioEngine::AudioAutoResumeForbiddenL()" ) ) );
+	if ( iPubSub ) // if iPubSub exists, then the ConstructL has been successfully completed
+		{
+    	HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventAudioResourceLost, KErrNone );
+		}	
+	}
+
+// -----------------------------------------------------------------------------
+// CRadioEngine::CallActivatedCallbackL
+// This callback notifies when call becomes active.
+// -----------------------------------------------------------------------------
+//
+void CRadioEngine::CallActivatedCallbackL()
+    {
+    FTRACE( FPrint( _L("CRadioEngine::CallActivatedCallbackL()" ) ) );
+    iInCall = ETrue;
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioEngine::CallDeactivatedCallbackL
+// This callback notifies when call becomes deactive.
+// -----------------------------------------------------------------------------
+//
+void CRadioEngine::CallDeactivatedCallbackL()
+	{
+	FTRACE( FPrint( _L("CRadioEngine::CallDeactivatedCallbackL()" ) ) );	
+	iInCall = EFalse;	
+	if ( iPubSub ) // if iPubSub exists, then the ConstructL has been successfully completed	
+		{
+		HandleCallback( MRadioEngineStateChangeCallback::EFMRadioEventCallEnded, KErrNone );	
+		}		
+	}	
+
+// ---------------------------------------------------------
+// CRadioEngine::RdsDataProgrammeService
+// ---------------------------------------------------------
+//
+void CRadioEngine::RdsDataProgrammeService( const TDesC& /*aProgramService*/ )
+    {
+    }
+
+// ---------------------------------------------------------
+// CRadioEngine::RdsDataPsNameIsStatic
+// ---------------------------------------------------------
+//
+void CRadioEngine::RdsDataPsNameIsStatic( TBool /*aStatic*/ )
+    {
+    }
+
+// ---------------------------------------------------------
+// CRadioEngine::RdsDataRadioText
+// ---------------------------------------------------------
+//
+void CRadioEngine::RdsDataRadioText( const TDesC& /*aRadioText*/ )
+    {
+    }
+
+// ---------------------------------------------------------
+// CRadioEngine::RdsDataRadioTextPlus
+// ---------------------------------------------------------
+//
+void CRadioEngine::RdsDataRadioTextPlus( const TInt /*aRTPlusClass*/, const TDesC& /*aRadioText*/ )
+    {
+    }
+
+// ---------------------------------------------------------
+// CRadioEngine::RdsAfSearchBegin
+// ---------------------------------------------------------
+//
+void CRadioEngine::RdsAfSearchBegin()
+    {
+    iFrequencySetByRdsAf = ETrue;
+    }
+
+// ---------------------------------------------------------
+// CRadioEngine::RdsAfSearchEnd
+// ---------------------------------------------------------
+//
+void CRadioEngine::RdsAfSearchEnd( TUint32 /*aFrequency*/, TInt aError )
+    {
+   if( aError != KErrNone )
+        {
+        iFrequencySetByRdsAf = EFalse;
+        }
+    }
+
+// ---------------------------------------------------------
+// CRadioEngine::RdsAfSearchStateChange
+// ---------------------------------------------------------
+//
+void CRadioEngine::RdsAfSearchStateChange( TBool /*aEnabled*/ )
+    {
+    }
+
+// ---------------------------------------------------------
+// CRadioEngine::RdsAvailable
+// ---------------------------------------------------------
+//
+void CRadioEngine::RdsAvailable( TBool /*aAvailable*/ )
+    {
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioEngine::InitializeResourceLoadingL
+// add resource file information
+// -----------------------------------------------------------------------------
+//
+void CRadioEngine::InitializeResourceLoadingL()
+    {
+    CCoeEnv* coeEnv = CCoeEnv::Static();
+    RFs fs( coeEnv->FsSession() );
+    TFileName fileName; 
+    TFileName baseResource;
+    TFindFile finder( fs );
+    TLanguage language( ELangNone );
+
+    TParsePtrC parse( KFMRadioEngineResourceFile );
+    _LIT( resourceFileWildExt, ".r*" );
+
+    // Make sure to find all resource files, not only .rsc files as it may be so
+    // that there is only .r01, .r02, etc. files available
+    fileName.Copy( parse.Name() );
+    fileName.Append( resourceFileWildExt );
+
+    // TFindFile applies search order that is from 
+    // drive Y to A, then Z
+    CDir* entries = NULL;
+    TInt err = finder.FindWildByDir( fileName , KDC_RESOURCE_FILES_DIR, entries );
+    delete entries;
+    entries = NULL;
+    TBool found = EFalse;
+    while ( !found && err == KErrNone )
+        {
+        // Found file
+        fileName.Zero();
+        TParsePtrC foundPath( finder.File() );
+        fileName.Copy( foundPath.DriveAndPath() );
+        fileName.Append( KFMRadioEngineResourceFile );
+        BaflUtils::NearestLanguageFile( fs, fileName, language );
+        if ( language != ELangNone && BaflUtils::FileExists( fs, fileName ) )
+            {
+            found = ETrue;
+            iFMRadioEngineResourceOffset = coeEnv->AddResourceFileL( fileName );
+            }
+        else
+            {
+            if ( language == ELangNone &&
+                 !baseResource.Compare( KNullDesC ) &&
+                 BaflUtils::FileExists( fs, fileName ) )
+                {
+                baseResource.Copy( fileName );
+                }
+            err = finder.FindWild( entries );
+            delete entries;
+            entries = NULL;
+            }
+        }
+
+    if ( !found && baseResource.Compare( KNullDesC ) )
+        {
+        // If we found *.rsc then better to use that than nothing
+        if ( BaflUtils::FileExists( fs, baseResource ) )
+            {
+            iFMRadioEngineResourceOffset = coeEnv->AddResourceFileL( baseResource );
+            }
+        }
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioEngine::TunerFrequencyRangeForRegionId
+// convert FMRadio region info to tuner utility frequency range
+// -----------------------------------------------------------------------------
+//
+TFmRadioFrequencyRange CRadioEngine::TunerFrequencyRangeForRegionId( const TInt aRegionId ) const
+    {
+    FTRACE( FPrint( _L("CRadioEngine::TunerFrequencyRangeForRegionId(TInt aRegionID = %d)"), aRegionId ) );  
+    TFmRadioFrequencyRange result = EFmRangeEuroAmerica;
+    switch( aRegionId )
+        {
+        case EFMRadioRegionDefault:
+            {
+            result = EFmRangeEuroAmerica;
+            break;
+            }
+        case EFMRadioRegionJapan:
+            {
+            result = EFmRangeJapan;
+            break;
+            }
+        case EFMRadioRegionAmerica:
+            {
+            result = EFmRangeEuroAmerica;
+            break;
+            }
+        default:
+            break;
+        }
+    return result;
+    }
+
+// -----------------------------------------------------------------------------
+// CRadioEngine::GetRegionL
+// determine current region
+// -----------------------------------------------------------------------------
+//	
+EXPORT_C TFMRadioRegionSetting CRadioEngine::GetRegionL() const
+    {
+    FTRACE( FPrint( _L("CRadioEngine::GetRegionL()" ) ) );    
+    TInt regionCount = iCentralRepositoryHandler->CountRegions();
+    TFMRadioRegionSetting reg = EFMRadioRegionNone;
+
+    if ( iSystemEventDetector->IsNetworkCoverage() )
+        {
+        TBool countryCodeMatch( EFalse );
+        // Choose the frequency range according to country code
+        const TDesC& countryCode = 
+            iNetworkInfoListener->CountryCode();
+        for ( TInt i = 0 ; i < regionCount ; i++ )
+            {
+            const RFMRadioCountryCodeArray& regionCountryCodes = 
+                iCentralRepositoryHandler->Region( i ).CountryCodes();
+                
+            for ( TInt j = 0 ; j < regionCountryCodes.Count() ; j++ )
+                {
+                if ( countryCode == *regionCountryCodes[j] )
+                    {
+                    // We have a match
+                    countryCodeMatch = ETrue;
+                    reg = iCentralRepositoryHandler->Region(i).Id();
+                    }
+                }
+            }
+        if ( !countryCodeMatch )
+            {  
+            // All regions have been searched and no direct match found, 
+            // use default one
+            reg = EFMRadioRegionDefault;
+            }
+        }
+    else 
+        {
+        if ( iCentralRepositoryHandler->RegionId() != EFMRadioRegionNone )
+            {
+            reg = static_cast<TFMRadioRegionSetting>( 
+                iCentralRepositoryHandler->RegionId() );
+            }
+        }
+    return reg;	
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::FillListWithRegionDataL
+// fill given list with fmradio regions 
+// ----------------------------------------------------
+//	
+EXPORT_C void CRadioEngine::FillListWithRegionDataL( CDesC16Array& aArray ) const
+	{
+	TInt regionCount = iCentralRepositoryHandler->CountRegions();	
+	
+	for ( TInt i = 0 ; i < regionCount ; i++ )
+        {
+        aArray.AppendL( iCentralRepositoryHandler->Region( i ).Name() );
+        }	
+	}
+
+// ----------------------------------------------------
+// CRadioEngine::RegionIdAtIndex
+// return region from the array of supported regions
+// ----------------------------------------------------
+//	
+EXPORT_C TFMRadioRegionSetting CRadioEngine::RegionIdAtIndex( const TInt aIndex ) const
+	{
+ 	return iCentralRepositoryHandler->Region( aIndex ).Id();		
+	}
+
+// ----------------------------------------------------
+// CRadioEngine::RegionId
+// Return current region Id.
+// ----------------------------------------------------
+//
+EXPORT_C TInt CRadioEngine::RegionId() const
+	{
+	return iCentralRepositoryHandler->RegionId();	
+	}
+	
+// ----------------------------------------------------
+// CRadioEngine::SetRegionIdL
+// Change the the current region Id.
+// ----------------------------------------------------
+//	
+EXPORT_C void CRadioEngine::SetRegionIdL( TInt aRegionId ) const
+	{
+	if ( iCentralRepositoryHandler->RegionId() != aRegionId )
+        {
+        // Change only when necessary as it changes also the default tuned frequency
+        //iSetters.SetRegionIdL( aRegionId );
+        iCentralRepositoryHandler->SetRegionIdL( aRegionId );
+        iPubSub->PublishFrequencyDecimalCountL( 
+                TFMRadioPSFrequencyDecimalCount( iRadioSettings->DecimalCount() ) );
+        }		
+	}
+
+// ----------------------------------------------------
+// CRadioEngine::RequestTunerControl
+// request tuner control from RadioFmTunerUtility
+// ----------------------------------------------------
+//
+EXPORT_C void CRadioEngine::RequestTunerControl() const
+    {
+    FTRACE( FPrint( _L("CRadioEngine::RequestTunerControl()")) );
+    if ( iTunerControl == EStateRadioTunerControlUninitialized )
+        {
+        // first request for tuner control.
+        iFmTunerUtility->RequestTunerControl();
+        }
+    }
+
+// ----------------------------------------------------
+// CRadioEngine::DecimalCount
+// return decimal count for current region MHz information
+// ----------------------------------------------------
+//
+EXPORT_C TInt CRadioEngine::DecimalCount() const
+	{
+	return iCentralRepositoryHandler->DecimalCount();	
+	}
+
+// ----------------------------------------------------
+// CRadioEngine::FrequencyStepSize
+// return step size for tuning.
+// ----------------------------------------------------
+//
+EXPORT_C TUint32 CRadioEngine::FrequencyStepSize() const
+	{
+	return iRadioSettings->FrequencyStepSize();
+	}
+	
+// ----------------------------------------------------
+// CRadioEngine::PubSubL
+// Returns a reference to P&S interface
+// ----------------------------------------------------
+//
+EXPORT_C CFMRadioPubSub& CRadioEngine::PubSubL() const
+    {	
+    User::LeaveIfNull( iPubSub );
+    return *iPubSub;   
+    }	
+
+// ----------------------------------------------------
+// CRadioEngine::StartupCount
+// increases startup count by one and returns amount of app startups.
+// ----------------------------------------------------
+//
+EXPORT_C TInt CRadioEngine::UpdatedStartupCount() const
+	{
+	FTRACE( FPrint( _L("CRadioEngine::UpdatedStartupCount()" ) ) );	
+	iCentralRepositoryHandler->IncreaseStartupCount();
+	return iRadioSettings->StartupCount();
+	}
+
+// ----------------------------------------------------
+// CRadioEngine::CancelScanLocalStationsScan
+// Cancel seek and notify UI
+// ----------------------------------------------------
+//
+EXPORT_C void CRadioEngine::CancelScanLocalStationsScan()
+	{
+	FTRACE( FPrint( _L("CRadioEngine::CancelScanLocalStationsScan()" ) ) );
+	CancelScan();
+	TInt error = KErrNone;
+	iStateHandler->Callback( MRadioEngineStateChangeCallback::EFMRadioEventScanLocalStationsCanceled, error ); 
+	}
+
+// ---------------------------------------------------------------------------
+// CRadioEngine::IsAudioRoutingPossible
+// Routing is not possible when headset is not available or radio is off
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CRadioEngine::IsAudioRoutingPossible() const
+    {
+    FTRACE( FPrint( _L("CRadioEngine::IsAudioRoutingPossible()" ) ) );
+    TBool isAudioRoutingPossible = EFalse;
+    
+    TBool headsetConnected = iHeadsetObserver->WiredHeadsetConnected();
+    TBool radioOn = iRadioSettings->IsRadioOn();
+        
+    if ( headsetConnected && radioOn )
+        {
+        isAudioRoutingPossible = ETrue;
+        }
+        
+    return isAudioRoutingPossible;
+    }
+	
+// ---------------------------------------------------------------------------
+// CRadioEngine::MusicStoreNoteDisplayed
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CRadioEngine::MusicStoreNoteDisplayed()
+    {
+    return iCentralRepositoryHandler->MusicStoreNoteDisplayed();
+    }
+
+// ---------------------------------------------------------------------------
+// CRadioEngine::SetMusicStoreNoteDisplayed
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CRadioEngine::SetMusicStoreNoteDisplayed()
+    {
+    iCentralRepositoryHandler->SetMusicStoreNoteDisplayed();
+    }
+
+// ---------------------------------------------------------------------------
+// CRadioEngine::MusicStoreNoteDisplayed
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TFMRadioRTPlusLevel CRadioEngine::GetRTPlusSupportLevel()
+    {
+    TInt value = iCentralRepositoryHandler->GetRTPlusSupportLevel();
+    
+    //do not return the value directly - make sure we return a valid value
+    if ( value == EFMRadioAllInteractions )
+        {
+        return EFMRadioAllInteractions;
+        }
+    return EFMRadioMusicStoreOnly;
+    }
+
+// ---------------------------------------------------------------------------
+// CRadioEngine::SetCurrentPresetIndex
+// sets current preset index if the preset database changes
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CRadioEngine::SetCurrentPresetIndex( const TInt aIndex )
+    {
+    TInt maxNumberOfPresets;
+    iPresetUtility->GetMaxNumberOfPresets( maxNumberOfPresets );
+    
+    if ( ( aIndex >= KErrNotFound ) && ( aIndex  < maxNumberOfPresets ) )
+        {
+        iRadioSettings->SetCurrentPreset( aIndex );
+        if ( aIndex >= 0 )
+            {
+            // publish current preset
+            TRAP_IGNORE
+                (
+                TInt frequency = 0;
+                TStationName name;
+                iPresetUtility->GetPresetL( aIndex, name, frequency );
+                iPubSub->PublishChannelNameL( name );
+                iPubSub->PublishChannelL( aIndex );
+                )
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CRadioEngine::StoreAndPublishFrequency
+// Updates the frequency into settings and P&S
+// ---------------------------------------------------------------------------
+//
+void CRadioEngine::StoreAndPublishFrequency( TInt aFrequency )
+    {
+    iRadioSettings->SetFrequency( aFrequency );
+    TRAP_IGNORE( iPubSub->PublishFrequencyL( aFrequency ); )
+    }
+
+// ---------------------------------------------------------------------------
+// CRadioEngine::PresetUrlL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TInt CRadioEngine::PresetUrlL( TInt aIndex, TDes& aUrl )
+    {
+    FTRACE( FPrint( _L("CRadioEngine::PresetUrlL( Index %d, url: %S)"), aIndex, &aUrl ) );
+    TInt err = KErrNone;
+    TFmPresetUrl presetUrl;
+    
+    if ( presetUrl.MaxLength() <= aUrl.MaxLength() )
+        {
+        iPresetUtility->GetPresetUrlL( aIndex, presetUrl );
+        aUrl.Copy( presetUrl );
+        if ( !aUrl.Length() )
+            {
+            err = KErrNotFound;
+            }            
+        }
+    else
+        {
+        err = KErrOverflow;
+        }
+    return err;
+    }
+
+// ---------------------------------------------------------------------------
+// CRadioEngine::DeletePresetL
+// Delete preset. With index -1 all preset are reseted
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CRadioEngine::DeletePresetL( TInt aIndex )
+    {
+    FTRACE( FPrint( _L("CRadioEngine::DeletePresetL( i: %d )"), aIndex ) );
+    iPresetUtility->DeletePresetL( aIndex );
+    }
+
+// ---------------------------------------------------------------------------
+// CRadioEngine::SaveUrlToCurrentPresetL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CRadioEngine::SaveUrlToPresetL( TInt aIndex, const TDesC& aUrl )
+    {
+    FTRACE( FPrint( _L("CRadioEngine::SaveUrlToCurrentPresetL( i: %d Url: %S)"), aIndex, &aUrl ) );
+    TFmPresetUrl presetUrl;
+    if ( aUrl.Length() <= presetUrl.MaxLength() )
+        {
+        presetUrl.Copy( aUrl );
+        iPresetUtility->SetPresetUrlL( aIndex, presetUrl );
+        }
+    }
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/src/fmradioenginecentralrepositoryhandler.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,494 @@
+/*
+* 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:  Contains implementation of the CCentralRepositoryHandler class.
+*
+*/
+
+
+//  INCLUDE FILES
+#include <centralrepository.h>
+#include <s32mem.h>
+#include <coemain.h> 
+#include <barsread.h>
+#include <ProfileEngineSDKCRKeys.h>
+#include <fmradioengine.rsg>
+
+#include "fmradioenginecentralrepositoryhandler.h"
+#include "fmradioengineradiosettings.h"
+#include "fmradioenginecrkeys.h"
+#include "debug.h"
+
+
+// CONSTANTS
+const TInt KRadioMaxStartupCountToTrack = 5;
+// ============================ MEMBER FUNCTIONS ===============================
+
+// ----------------------------------------------------
+// CCentralRepositoryHandler::CCentralRepositoryHandler
+// Default class constructor.
+// ----------------------------------------------------
+//
+CCentralRepositoryHandler::CCentralRepositoryHandler(
+    TRadioSettings& aRadioSettings)  // a reference to aRadioSettings
+    :iRadioSettings(&aRadioSettings)
+    {
+    FTRACE(FPrint(_L("calling CCentralRepositoryHandler::NewL()")));
+    }
+
+// ----------------------------------------------------
+// CCentralRepositoryHandler::ConstructL
+// Second phase class constructor.
+// ----------------------------------------------------
+//
+void CCentralRepositoryHandler::ConstructL()
+    {
+    iCentralRepository = CRepository::NewL( KCRUidFMRadioEngine );
+    
+    RetrieveInitialSettings();                
+    InitializeRegionsL();
+        
+    #ifdef __WINS__
+    SetInitialSettings();
+    #endif //__WINS__    
+    }
+
+// ----------------------------------------------------
+// CCentralRepositoryHandler::NewL
+// Two-phased class constructor.
+// ----------------------------------------------------
+//
+CCentralRepositoryHandler* CCentralRepositoryHandler::NewL(
+    TRadioSettings& aRadioSettings)  // a reference to aRadioSettings
+    {
+    CCentralRepositoryHandler *self = new(ELeave) CCentralRepositoryHandler(aRadioSettings);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// ----------------------------------------------------
+// CCentralRepositoryHandler::~CCentralRepositoryHandler
+// Destructor of CCentralRepositoryHandler class.
+// ----------------------------------------------------
+//
+CCentralRepositoryHandler::~CCentralRepositoryHandler()
+    {
+    iRadioSettings = NULL;
+    if ( iCentralRepository )
+         {
+         delete iCentralRepository;
+         }
+	iRegions.ResetAndDestroy();
+	iRegions.Close();                
+    }
+
+
+// ----------------------------------------------------
+// CCentralRepositoryHandler::RetrieveInitialSettings
+// Retrieves persistent settings from shared data.
+// Returns: None
+// ----------------------------------------------------
+//
+void CCentralRepositoryHandler::RetrieveInitialSettings()
+    {
+    FTRACE(FPrint(_L("calling CCentralRepositoryHandler::RetrieveInitialSettings() Start")));
+    TInt tempData;
+    
+    if ( iCentralRepository->Get( KRadioHeadsetVolume, tempData ) == KErrNone )
+          {
+          iRadioSettings->SetHeadsetVolume( tempData );
+          }
+          
+    if ( iCentralRepository->Get( KRadioSpeakerVolume, tempData ) == KErrNone ) 
+            {
+            iRadioSettings->SetSpeakerVolume( tempData );
+            }
+            
+    if ( iCentralRepository->Get( KFmRadioFrequency, tempData ) == KErrNone )
+        {
+        iRadioSettings->SetFrequency( tempData );
+        }
+        
+    if ( iCentralRepository->Get( KFmRadioChannel, tempData ) == KErrNone )
+        {
+        iRadioSettings->SetCurrentPreset( tempData );
+        }
+        
+    if ( iCentralRepository->Get( KFmRadioMode, tempData ) == KErrNone)
+        {
+        iRadioSettings->SetRadioMode( static_cast<CRadioEngine::TRadioMode>( tempData ) );        
+        }
+        	
+	if ( iCentralRepository->Get( KFMCRCurrentRegion, tempData ) != KErrNone )	        
+		{
+		iCentralRepository->Set( KFMCRCurrentRegion, KErrNotFound );			
+		}
+			
+	if ( iCentralRepository->Get( KRadioCRStartupCount, tempData ) == KErrNone )
+		{
+		iRadioSettings->SetStartupCount( tempData );
+		}
+					
+	if ( iCentralRepository->Get( KFMCRRdsAfSearchEnabled, tempData ) == KErrNone )
+        {
+        if ( static_cast<TBool> ( tempData ) )
+        	{
+        	iRadioSettings->SetRdsAfSearchEnabled();
+        	}
+        else
+        	{
+            iRadioSettings->SetRdsAfSearchDisabled();
+        	}
+        }
+	
+	if ( iCentralRepository->Get( KFMCRJapanRegionAllowed, tempData ) == KErrNone )
+		{				
+		iRadioSettings->SetJapanRegionAllowed( static_cast<TBool>( tempData ) );
+		}			       	        
+    }
+
+#ifdef __WINS__
+// ----------------------------------------------------
+// CCentralRepositoryHandler::SetInitialSettings
+// Set network info for emulator testing purposes
+// ----------------------------------------------------
+//
+void CCentralRepositoryHandler::SetInitialSettings()
+	{
+	_LIT(KNetworkInfoForEmulator, "358123");
+	iCentralRepository->Set( KFMRadioCREmulatorNetworkInfo, KNetworkInfoForEmulator );			
+	}
+#endif //__WINS__	
+
+// ----------------------------------------------------
+// CCentralRepositoryHandler::SaveEngineSettings
+// Save all engine related persistent info back to shared data
+// Returns: None
+// ----------------------------------------------------
+//
+void CCentralRepositoryHandler::SaveEngineSettings()
+    {
+    if ( IsFrequencyValid( iRadioSettings->Frequency() / KFMRadioFreqMultiplier ) )
+    	{
+    	iCentralRepository->Set( KFmRadioFrequency, iRadioSettings->Frequency() );
+    	}
+    else
+    	{
+    	TInt freq = MinFrequency() * KFMRadioFreqMultiplier;
+    	iCentralRepository->Set( KFmRadioFrequency, freq  );
+    	}
+            
+    iCentralRepository->Set( KFmRadioChannel, iRadioSettings->CurrentPreset() );
+    iCentralRepository->Set( KFmRadioMode, iRadioSettings->RadioMode() );
+    iCentralRepository->Set( KFMCRRdsAfSearchEnabled, iRadioSettings->IsRdsAfSearchEnabled() );
+    }
+
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::CountRegions
+// Return count of fmradio regions in regions array
+// ---------------------------------------------------------------------------
+//
+TInt CCentralRepositoryHandler::CountRegions() const
+    {
+    return iRegions.Count();
+    }
+
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::Region
+// Returns fmradio region at given index
+// ---------------------------------------------------------------------------
+//
+CFMRadioRegion& CCentralRepositoryHandler::Region( TInt aIndex ) const
+    {    
+    if( aIndex == KErrNotFound )
+        {
+        aIndex = RegionIndexForId( static_cast<TInt>( EFMRadioRegionDefault ) );        
+        }
+
+    return *iRegions[aIndex];
+    }
+
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::RegionId
+// Return current region Id.
+// ---------------------------------------------------------------------------
+//
+TInt CCentralRepositoryHandler::RegionId() const
+    {
+    TInt regionId;
+    iCentralRepository->Get( KFMCRCurrentRegion, regionId );
+    return regionId;
+    }
+
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::SetRegionIdL
+// Change the the current region Id.
+// ---------------------------------------------------------------------------
+//
+void CCentralRepositoryHandler::SetRegionIdL( TInt aRegion )
+    {
+    iCentralRepository->Set( KFMCRCurrentRegion, aRegion );
+    UpdateCurrentRegionIdx( aRegion );    
+    
+    iRadioSettings->SetFrequency( Region( iCurrentRegionIdx ).MinFrequency() * KFMRadioFreqMultiplier ); 
+	iRadioSettings->SetMinFrequency( MinFrequency() );
+	iRadioSettings->SetMaxFrequency( MaxFrequency() );
+	iRadioSettings->SetFrequencyStepSize( FrequencyStepSize() );
+	iRadioSettings->SetDecimalCount( DecimalCount() );
+    }
+
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::FrequencyStepSize
+// Returns frequency step size used for current region
+// ---------------------------------------------------------------------------
+//
+TUint32 CCentralRepositoryHandler::FrequencyStepSize() const
+    {
+    return Region( iCurrentRegionIdx ).StepSize();
+    }
+
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::MaxFrequency
+// Returns highest allowed frequency for current region
+// ---------------------------------------------------------------------------
+//
+TUint32 CCentralRepositoryHandler::MaxFrequency() const
+    {
+    return Region( iCurrentRegionIdx ).MaxFrequency();
+    }
+
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::MinFrequency
+// Returns lowest allowed frequency for current region
+// ---------------------------------------------------------------------------
+//
+TUint32 CCentralRepositoryHandler::MinFrequency() const
+    {
+    return Region( iCurrentRegionIdx ).MinFrequency();
+    }
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::DecimalCount
+// return decimal count for current region Mhz information
+// ---------------------------------------------------------------------------
+//
+TInt CCentralRepositoryHandler::DecimalCount() const
+    {
+    return Region( iCurrentRegionIdx ).DecimalCount();
+    }
+
+
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::InitializeRegionsL
+// Initializes the regions based on resources.
+// ---------------------------------------------------------------------------
+//
+void CCentralRepositoryHandler::InitializeRegionsL()
+    {
+	iRegions.ResetAndDestroy();
+
+	TResourceReader reader;
+	
+	CCoeEnv* coeEnv = CCoeEnv::Static();
+	
+	if ( iRadioSettings->IsJapanRegionAllowed() )
+		{
+		coeEnv->CreateResourceReaderLC( reader, R_RADIO_REGIONS_ALL );	
+		}
+	else // Japan region is not allowed so read region resources without Japan
+		{
+		coeEnv->CreateResourceReaderLC( reader, R_RADIO_REGIONS_WITHOUT_JAPAN );					
+		}
+			
+	TInt regionCount = reader.ReadInt16();
+
+	for( TInt i = 0 ; i < regionCount; i++ )
+		{
+		TInt resId = reader.ReadInt32(); // The next resource ID to read.
+        TResourceReader regionReader;
+        coeEnv->CreateResourceReaderLC( regionReader, resId );
+		User::LeaveIfError( iRegions.Append( CFMRadioRegion::NewL( regionReader ) ) );
+		CleanupStack::PopAndDestroy();
+		}
+
+	CleanupStack::PopAndDestroy();
+
+    UpdateCurrentRegionIdx( RegionId() );
+        	
+	iRadioSettings->SetMinFrequency( MinFrequency() * KFMRadioFreqMultiplier );
+	iRadioSettings->SetMaxFrequency( MaxFrequency() * KFMRadioFreqMultiplier );
+	iRadioSettings->SetFrequencyStepSize( FrequencyStepSize() );
+	iRadioSettings->SetDecimalCount( DecimalCount() );
+    }
+
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::RegionIndexForId
+// Converts Region ID to index
+// ---------------------------------------------------------------------------
+//
+TInt CCentralRepositoryHandler::RegionIndexForId( TInt aRegionId ) const
+    {
+    TInt idx = KErrNotFound;
+    for( TInt i = 0 ; i < CountRegions(); i++ )
+        {
+        if( Region( i ).Id() == static_cast<TFMRadioRegionSetting>( aRegionId ) )
+            {
+            idx = i;
+            /*lint -save -e960 (Note -- Violates MISRA Required Rule 58, non-switch break used)*/
+            break;
+            /*lint -restore*/
+            }
+        }
+    return idx;
+    }
+
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::UpdateCurrentRegionIdx
+// Updates the current region
+// ---------------------------------------------------------------------------
+//
+void CCentralRepositoryHandler::UpdateCurrentRegionIdx( TInt aRegionId )
+    {
+    iCurrentRegionIdx = RegionIndexForId( aRegionId );
+    }
+
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::IsOfflineProfileActiveL
+// Checks if offine profile is current active profile
+// Returns: true/false 
+// ---------------------------------------------------------------------------
+//    
+TBool CCentralRepositoryHandler::IsOfflineProfileActiveL()
+	{
+	CRepository* repository = CRepository::NewLC( KCRUidProfileEngine );
+	
+	TInt profileId(0);
+	
+	// Get ID of current profile
+	User::LeaveIfError( repository->Get( KProEngActiveProfile, profileId ) );
+	
+	CleanupStack::PopAndDestroy( repository );
+	
+	// Check value to determine the active profile
+	// 5 = Offline profile
+	if ( profileId == 5 )
+		{
+		// Current profile is the offline profile
+		return ETrue;
+		}
+	
+	return EFalse;	
+	}
+
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::IsFrequencyValid
+// Checks if frequency is in the current region range
+// ---------------------------------------------------------------------------
+//
+TBool CCentralRepositoryHandler::IsFrequencyValid( TUint32 aFrequency ) const
+    {
+    TBool ret( EFalse );
+    if( !aFrequency )
+        {
+        aFrequency = iRadioSettings->Frequency();
+        }
+    if ( aFrequency >= MinFrequency() && aFrequency <= MaxFrequency() )
+        {
+        ret = ETrue;
+        }
+    return ret;
+    }
+
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::IncreaseStartupCount
+// Increases startup time by one and sets the value to the repository
+// ---------------------------------------------------------------------------
+//    
+void CCentralRepositoryHandler::IncreaseStartupCount() const
+	{				
+	TInt startCount = iRadioSettings->StartupCount();
+	// Dont update if maximum tracking count is reached
+	if ( startCount < KRadioMaxStartupCountToTrack )
+		{
+		startCount++;
+		iRadioSettings->SetStartupCount( startCount ); 
+		iCentralRepository->Set( KRadioCRStartupCount, startCount );	
+		}	
+	}
+
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::SaveHeadsetVolumeSetting
+// Save headset volume level to the repository
+// ---------------------------------------------------------------------------
+//	
+void CCentralRepositoryHandler::SaveHeadsetVolumeSetting() const
+	{
+	FTRACE( FPrint(_L("CCentralRepositoryHandler::SaveHeadsetVolumeSetting()") ) );
+	iCentralRepository->Set( KRadioHeadsetVolume, iRadioSettings->HeadsetVolume() );	
+	}
+	
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::SaveSpeakerVolumeSetting
+// Save speaker volume level to the repository
+// ---------------------------------------------------------------------------
+//	
+void CCentralRepositoryHandler::SaveSpeakerVolumeSetting() const
+	{
+	FTRACE( FPrint(_L("CCentralRepositoryHandler::SaveSpeakerVolumeSetting()") ) );
+	iCentralRepository->Set( KRadioSpeakerVolume, iRadioSettings->SpeakerVolume() );		
+	}
+	
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::MusicStoreNoteDisplayed
+// ---------------------------------------------------------------------------
+//
+TBool CCentralRepositoryHandler::MusicStoreNoteDisplayed()
+    {
+    TBool result;
+    TInt err = iCentralRepository->Get( KRadioMusicStoreNoteDisplayed, result );
+    if ( err != KErrNone )
+    	{
+    	result = EFalse;
+    	}    
+    return result;
+    }
+
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::SetMusicStoreNoteDisplayed
+// ---------------------------------------------------------------------------
+//
+void CCentralRepositoryHandler::SetMusicStoreNoteDisplayed()
+    {
+    iCentralRepository->Set( KRadioMusicStoreNoteDisplayed, 1 );
+    }
+
+// ---------------------------------------------------------------------------
+// CCentralRepositoryHandler::GetRTPlusSupportLevel
+// ---------------------------------------------------------------------------
+//
+TInt CCentralRepositoryHandler::GetRTPlusSupportLevel()
+    {
+    //See fmradioengine.hrh:TFMRadioRTPlusLevel for correct values
+    TInt result;
+    TInt err = iCentralRepository->Get( KRadioRTPlusSupportLevel, result );
+    if ( err != KErrNone )
+    	{
+    	result = KErrNotFound;
+    	}
+    
+    return result;
+    }
+
+// end of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/src/fmradioenginedosserverobserver.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,105 @@
+/*
+* Copyright (c) 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:  Contains implementation of the CDosServerObserver class. which is the 
+*                       notification interface to the DOS Server.
+*
+*/
+
+
+//  INCLUDES
+#include <DosSvrServices.h>
+
+#include "debug.h"
+#include "fmradioengine.h"
+#include "fmradioengineradiosettings.h"
+#include "fmradioenginedosserverobserver.h"
+
+// ----------------------------------------------------
+// CDosServerObserver::CDosServerObserver
+// Default class constructor.
+// ----------------------------------------------------
+//
+CDosServerObserver::CDosServerObserver(CRadioEngine* aEngine, TRadioSettings* aRadioSettings)
+                    : iEngine(aEngine), iRadioSettings(aRadioSettings)
+    {
+    }
+
+// ----------------------------------------------------
+// CDosServerObserver::NewL
+// Two-phased class constructor.
+// ----------------------------------------------------
+//
+CDosServerObserver *CDosServerObserver::NewL(CRadioEngine* aEngine, TRadioSettings* aRadioSettings)
+    {
+    CDosServerObserver *self = new (ELeave)CDosServerObserver(aEngine, aRadioSettings);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+
+// ----------------------------------------------------
+// CDosServerObserver::ConstructL
+// Second phase class constructor.
+// ----------------------------------------------------
+//
+void CDosServerObserver::ConstructL()
+    {
+	iRadioSettings->SetHeadsetConnected();
+    RDosServer* server = const_cast< RDosServer* >( &DosServer() );
+	User::LeaveIfError( iDosAudio.Open(*server) );
+	TRegisterEvent eventList[] = {{KHandsfreeModeChanged, sizeof(EPSHandsFreeMode),EOnlyLast}, {KHeadsetButtonChanged,sizeof(EPSButtonState),	EQueue} };
+	StartListeningL(eventList,sizeof(eventList)/sizeof(TRegisterEvent));  
+    }
+
+// ----------------------------------------------------
+// CDosServerObserver::~CDosServerObserver
+// Destructor of CDosServerObserver class.
+// ----------------------------------------------------
+//
+CDosServerObserver::~CDosServerObserver()
+    {
+    Stop(); 
+    }
+
+
+// ---------------------------------------------------------
+// CDosServerObserver::SetAudioRouting
+// ---------------------------------------------------------
+//
+TInt CDosServerObserver::SetAudioRouting(CRadioEngine::TFMRadioAudioOutput aAudioOutput)
+	{
+	TInt err(KErrNone);
+	EPSHandsFreeMode mode = (aAudioOutput == CRadioEngine::EFMRadioOutputHeadset) ? EPSIhfOff : EPSIhfOn;
+	err = iDosAudio.SetHandsfreeMode(mode);
+	return err;
+	}
+	
+// ---------------------------------------------------------
+// CDosServerObserver::HeadsetButtonChangedL
+// Handling notification about headset button state change.
+// (other items were commented in a header).
+// Status : Draft/Proposal/Approved
+// ---------------------------------------------------------
+//
+void CDosServerObserver::HeadsetButtonChangedL(EPSButtonState aState)
+   {
+   if(aState == EPSButtonUp)
+        {
+        iEngine->HandleHeadsetButtonPress();
+        }
+
+   }
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/src/fmradioengineradiosettings.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,490 @@
+/*
+* 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:  Contains implementation of the TRadioSettings class, which holds 
+*                       the RadioEngine settings.
+*
+*/
+
+
+//  INCLUDES
+#include "fmradioengine.h"
+#include "fmradioengineradiosettings.h"
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// ----------------------------------------------------
+// TRadioSettings::TRadioSettings
+// Default class constructor.
+// ----------------------------------------------------
+//
+TRadioSettings::TRadioSettings():
+                    iFMRadioHeadsetVolume( KDefaultRadioVolume ),
+                    iFMRadioSpeakerVolume( KDefaultRadioVolume ),
+                    iCurrentPreset( 0 ),
+                    iFrequency( KDefaultRadioFrequency ),
+                    iMaxFrequency( 0 ),
+                    iMinFrequency( 0 ),
+                    iFrequencyStepSize( 0 ),
+                    iDecimalCount( 0 ),
+                    iAudioMode( CRadioEngine::EFMRadioStereo ),
+                    iAudioOutput(CRadioEngine::EFMRadioOutputHeadset ),
+                    iMuteOn(EFalse),
+                    iRadioOn( EFalse),
+                    iRadioMode( CRadioEngine::ERadioPresetMode ),
+                    iIsHeadsetConnected( EFalse ),
+                    iFlightModeEnabled( EFalse ),
+                    iStartupCount( 0 ),
+                    iRdsAfSearchEnabled( EFalse ),
+                    iJapanRegionAllowed( ETrue )
+    {
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::Volume
+// retrieve current headset volume level
+// Returns: iFMRadioHeadsetVolume: headset volume
+// ----------------------------------------------------
+//
+TInt TRadioSettings::HeadsetVolume() const
+    {
+    return iFMRadioHeadsetVolume;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::SpeakerVolume
+// retrieve current speaker volume level
+// Returns: iFMRadioSpeakerVolume: speaker volume
+// ----------------------------------------------------
+//
+TInt TRadioSettings::SpeakerVolume() const
+    {
+    return iFMRadioSpeakerVolume;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::CurrentPreset
+// retrieve currently selected channel
+// Returns: iCurrentPreset: current preset index number
+// ----------------------------------------------------
+//
+TInt TRadioSettings::CurrentPreset() const
+    {
+    	return iCurrentPreset;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::Frequency
+// retrieve current frequency
+// Returns: iFrequency: current frequency
+// ----------------------------------------------------
+//
+TInt TRadioSettings::Frequency() const
+    {
+    return iFrequency;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::MaxFrequency
+// retrieve max frequency
+// ----------------------------------------------------
+//
+TUint32 TRadioSettings::MaxFrequency() const
+    {
+    return iMaxFrequency;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::MinFrequency
+// retrieve min frequency
+// ----------------------------------------------------
+//
+TUint32 TRadioSettings::MinFrequency() const
+    {
+    return iMinFrequency;
+    }
+ 
+// ----------------------------------------------------
+// TRadioSettings::FrequencyStepSize
+// return step size for tuning
+// ----------------------------------------------------
+//
+TUint32 TRadioSettings::FrequencyStepSize() const
+    {
+    return iFrequencyStepSize;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::DecimalCount
+// Returns decimal count for current region MHz information 
+// ----------------------------------------------------
+//
+TInt TRadioSettings::DecimalCount() const
+    {
+    return iDecimalCount;
+    }	
+ 
+// ----------------------------------------------------
+// TRadioSettings::AudioMode
+// retrieve current audio mode (stereo or mono)
+// Returns: iAudioMode: current mode
+// ----------------------------------------------------
+//
+CRadioEngine::TFMRadioAudioMode TRadioSettings::AudioMode() const
+    {
+    return iAudioMode;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::AudioOutput
+// retrieve current audio output (headset/ihf)
+// Returns: iAudioOutput: current audio output
+// ----------------------------------------------------
+//
+CRadioEngine::TFMRadioAudioOutput TRadioSettings::AudioOutput() const
+    {
+    return iAudioOutput;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::IsMuteOn
+// retrieve current mute state (on/off)
+// Returns: iMuteOn: mute flag
+// ----------------------------------------------------
+//
+TBool TRadioSettings::IsMuteOn() const
+    {
+    return iMuteOn;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::IsRadioOn
+// retrieve current radio on state (on/off)
+// Returns: iRadioOn: a flag indicating radio on/off
+// ----------------------------------------------------
+//
+TBool TRadioSettings::IsRadioOn() const
+    {
+    return iRadioOn;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::RadioMode
+// retrieve the current radio mode (preset or direct frequency)
+// Returns: iRadioMode: a flag indicating radio mode
+// ----------------------------------------------------
+//
+CRadioEngine::TRadioMode TRadioSettings::RadioMode() const
+    {
+    return iRadioMode;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::IsHeadsetConnected
+// retrieve the current headset mode (connected or disconnected)
+// Returns: iIsHeadsetConnected: a flag indicating if headset is connected
+// ----------------------------------------------------
+//
+TBool TRadioSettings::IsHeadsetConnected() const
+    {
+    return iIsHeadsetConnected;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::IsFlightModeEnabled
+// retrieve the current flight mode status (on/off)
+// Returns: iFlightModeEnabled: a flag indicating if flight mode is enabled
+// ----------------------------------------------------
+//
+TBool TRadioSettings::IsFlightModeEnabled() const
+    {
+    return iFlightModeEnabled;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::IsRdsAfSearchEnabled
+// ----------------------------------------------------
+//
+EXPORT_C TBool TRadioSettings::IsRdsAfSearchEnabled()
+	{
+	return iRdsAfSearchEnabled;
+	}
+
+// ----------------------------------------------------
+// TRadioSettings::SetHeadsetVolume
+// set the current fm radio headset volume
+// Returns: none
+// ----------------------------------------------------
+//
+void TRadioSettings::SetHeadsetVolume(
+    const TInt aVolume) // the new volume
+    {
+    iFMRadioHeadsetVolume = aVolume;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::SetSpeakerVolume
+// set the current fm radio speaker volume
+// Returns: none
+// ----------------------------------------------------
+//
+void TRadioSettings::SetSpeakerVolume(
+    const TInt aVolume)  // new volume
+	  {
+	  iFMRadioSpeakerVolume = aVolume;
+	  }
+
+
+// ----------------------------------------------------
+// TRadioSettings::SetCurrentPreset
+// set the current preset
+// Returns: none
+// ----------------------------------------------------
+//
+void TRadioSettings::SetCurrentPreset(
+    const TInt aChannel) //new channel to be set
+    {
+    	iCurrentPreset = aChannel;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::SetFrequency
+// set the current frequency
+// Returns: none
+// ----------------------------------------------------
+//
+void TRadioSettings::SetFrequency(
+    const TInt aFrequency) // new frequency
+    {
+    	iFrequency = aFrequency;
+    //	if (iFrequency < 87500000 || iFrequency > 108000000)
+    //		iFrequency = 87500000;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::SetMaxFrequency
+// set the max frequency
+// Returns: none
+// ----------------------------------------------------
+//
+void TRadioSettings::SetMaxFrequency( const TUint32 aMaxFrequency )
+	{
+	iMaxFrequency = aMaxFrequency;
+	}
+
+// ----------------------------------------------------
+// TRadioSettings::SetMinFrequency
+// set min frequency
+// Returns: none
+// ----------------------------------------------------
+//
+ void TRadioSettings::SetMinFrequency( const TUint32 aMinFrequency )
+	{
+	iMinFrequency = aMinFrequency;
+	}
+
+ // ----------------------------------------------------
+ // TRadioSettings::SetFrequencyStepSize
+ // set step size for manual tuning.
+ // Returns: none
+ // ----------------------------------------------------
+ //
+ void TRadioSettings::SetFrequencyStepSize( const TUint32 aFrequencyStepSize )
+	{
+	iFrequencyStepSize = aFrequencyStepSize;
+	}
+
+ // ----------------------------------------------------
+ // TRadioSettings::SetDecimalCount
+ // Set decimal count for current region MHz information 
+ // Returns: none
+ // ----------------------------------------------------
+ //
+ void TRadioSettings::SetDecimalCount( const TInt aDecimalCount )
+	{
+	iDecimalCount = aDecimalCount;
+	}	
+ 
+// ----------------------------------------------------
+// TRadioSettings::SetAudioMode
+// set the current audio mode
+// Returns: none
+// ----------------------------------------------------
+//
+void TRadioSettings::SetAudioMode(
+    const CRadioEngine::TFMRadioAudioMode aAudioMode) // new audio mode
+    {
+    iAudioMode = aAudioMode;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::SetAudioOutput
+// set the current audio output
+// Returns: none
+// ----------------------------------------------------
+//
+void TRadioSettings::SetAudioOutput(
+    const CRadioEngine::TFMRadioAudioOutput aAudioOutput) // new audio output
+    {
+    iAudioOutput = aAudioOutput;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::SetMuteOn
+// set mute state to on
+// Returns: none
+// ----------------------------------------------------
+//
+void TRadioSettings::SetMuteOn()
+    {
+    iMuteOn = ETrue;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::SetMuteOff
+// set mute state to off
+// Returns: none
+// ----------------------------------------------------
+//
+void TRadioSettings::SetMuteOff()
+    {
+    iMuteOn = EFalse;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::SetRadioOn
+// set radio state to "on"
+// Returns: none
+// ----------------------------------------------------
+//
+void TRadioSettings::SetRadioOn()
+    {
+    iRadioOn = ETrue;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::SetRadioOff
+// set radio state to "off"
+// Returns: none
+// ----------------------------------------------------
+//
+void TRadioSettings::SetRadioOff()
+    {
+    iRadioOn = EFalse;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::SetRadioMode
+// set radio mode
+// Returns: none
+// ----------------------------------------------------
+//
+void TRadioSettings::SetRadioMode(
+    const CRadioEngine::TRadioMode aRadioMode) // new radio mode
+    {
+    iRadioMode = aRadioMode;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::SetHeadsetConnected
+// set headset connected
+// Returns: none
+// ----------------------------------------------------
+//
+void TRadioSettings::SetHeadsetConnected()
+    {
+    iIsHeadsetConnected = ETrue;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::SetHeadsetDisconnected
+// set headset disconnected
+// Returns: none
+// ----------------------------------------------------
+//
+void TRadioSettings::SetHeadsetDisconnected()
+    {
+    iIsHeadsetConnected = EFalse;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::SetFlightMode
+// set flightmode status
+// Returns: none
+// ----------------------------------------------------
+//
+void TRadioSettings::SetFlightMode( 
+    TBool aEnabled) // indicating enable/disable
+    {
+    iFlightModeEnabled = aEnabled;
+    }
+
+// ----------------------------------------------------
+// TRadioSettings::SetStartupCount
+// set startup count
+// ----------------------------------------------------
+//	
+void TRadioSettings::SetStartupCount( const TInt aStartupCount )
+	{
+	iStartupCount = aStartupCount;	
+	}
+	
+// ----------------------------------------------------
+// TRadioSettings::StartupCount
+// return startup count
+// ----------------------------------------------------
+//	
+TInt TRadioSettings::StartupCount() const
+	{
+	return iStartupCount;
+	}
+
+// ----------------------------------------------------
+// TRadioSettings::SetRdsAfSearchEnabled
+// ----------------------------------------------------
+//
+void  TRadioSettings::SetRdsAfSearchEnabled()
+	{
+	iRdsAfSearchEnabled = ETrue;
+	}
+
+// ----------------------------------------------------
+// TRadioSettings::SetRdsAfSearchDisabled
+// ----------------------------------------------------
+//
+void  TRadioSettings::SetRdsAfSearchDisabled()
+	{
+	iRdsAfSearchEnabled = EFalse;
+	}
+		
+// ----------------------------------------------------
+// TRadioSettings::SetJapanRegionAllowed
+// ----------------------------------------------------
+//
+void  TRadioSettings::SetJapanRegionAllowed( const TBool aAllowed )
+	{
+	iJapanRegionAllowed = aAllowed;
+	}	
+
+// ----------------------------------------------------
+// TRadioSettings::IsJapanRegionAllowed
+// ----------------------------------------------------
+//
+TBool TRadioSettings::IsJapanRegionAllowed() const
+	{
+	return iJapanRegionAllowed;	
+	}	
+	
+// end of file
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/src/fmradioengineradiostatehandler.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,133 @@
+/*
+* 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:  The class implements the powerup/down, and scan and store
+*                       state machines.
+*
+*/
+
+
+// INCLUDES
+#include <f32file.h>
+
+#include "fmradioengineradiostatehandler.h"
+#include "fmradioengine.h"
+#include "debug.h"
+
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// ----------------------------------------------------
+// CRadioStateHandler::CRadioStateHandler
+// c++ default constructor
+// ----------------------------------------------------
+//
+CRadioStateHandler::CRadioStateHandler(CRadioEngine* aEngine)
+    :    CActive(EPriorityStandard), iEngine(aEngine)
+    {
+    CActiveScheduler::Add(this);
+    }
+
+// ----------------------------------------------------
+// CRadioStateHandler::ConstructL
+// 2nd phase constructor
+// ----------------------------------------------------
+//
+void CRadioStateHandler::ConstructL()
+    {
+    }
+
+// ----------------------------------------------------
+// CRadioStateHandler::NewL
+// Method for creating new instances of this class.
+// ----------------------------------------------------
+//
+CRadioStateHandler* CRadioStateHandler::NewL(
+    CRadioEngine* aEngine) //a pointer to CRadioEngine object
+    {
+    CRadioStateHandler *self = new(ELeave) CRadioStateHandler(aEngine);
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+// Destructor
+CRadioStateHandler::~CRadioStateHandler()
+    {
+    Cancel();
+    }
+
+
+// ========================== OTHER EXPORTED FUNCTIONS =========================
+
+// ----------------------------------------------------
+// CRadioStateHandler::Callback
+// Trigger the active object to call the client callback function
+// Returns: None
+// ----------------------------------------------------
+//
+void CRadioStateHandler::Callback(
+    MRadioEngineStateChangeCallback::TFMRadioNotifyEvent aEventCode,   // a event code
+    TInt aErrorCode )  // a error code
+    {
+    iCallbackEventCode = aEventCode;
+    iCallbackErrorCode = aErrorCode;
+    Cancel();
+    SetActive();
+    TRequestStatus* status=&iStatus;
+    User::RequestComplete(status, KRadioStateEventCallback);
+    }
+
+
+// ----------------------------------------------------
+// CRadioStateHandler::DoCancel
+// Cancel the timeout timer. This generally means that a 
+// response was received, so the timeout is no longer needed.
+// Returns: None
+// ----------------------------------------------------
+//
+void CRadioStateHandler::DoCancel()
+    {
+    }
+
+// ----------------------------------------------------
+// CRadioStateHandler::RunL
+// State Change Request/timeout handler
+// Returns: None
+// ----------------------------------------------------
+//
+void CRadioStateHandler::RunL()
+    {
+    FTRACE(FPrint(_L("inside runL()")));  
+
+    if (iStatus.Int() == KRadioStateEventCallback)
+        {
+        iEngine->HandleCallback(iCallbackEventCode, iCallbackErrorCode);
+        }
+    }
+
+// ---------------------------------------------------------
+// CRadioStateHandler::RunError
+// handle any errors that occur in the RunL
+// Returns: aError: the error code
+// ---------------------------------------------------------
+//
+TInt CRadioStateHandler::RunError( 
+    TInt aError )  // error code
+    {
+    FTRACE( FPrint( _L("CRadioStateHandler::RunError()") ) );
+    return aError;
+    }
+    
+   // end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/src/fmradiomobilenetworkinfolistener.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,371 @@
+/*
+* Copyright (c) 2004-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: Gets country code and network info from mobile network
+*
+*/
+
+
+// INCLUDES
+#ifdef __WINS__
+#include <centralrepository.h>
+#else
+#include <commsdattypesv1_1.h>
+#include <etel.h>
+#include <etelmm.h>
+#include <commsdat_partner.h>
+#endif
+
+#include "fmradionetworkchangeobserver.h"
+#include "fmradiomobilenetworkinfolistener.h"
+#include "fmradioenginecrkeys.h"
+
+using namespace CommsDat;
+
+
+#ifdef __WINS__
+// Default size for the cenrep query
+const TInt KFMRadioDefaultNetworkInfoBufferSize = 0x80; 
+#endif
+
+// ================= MEMBER FUNCTIONS =======================
+
+// C++ default constructor can NOT contain any code, that
+// might leave.
+//
+#ifdef __WINS__
+CFMRadioMobileNetworkInfoListener::CFMRadioMobileNetworkInfoListener(MFMRadioNetworkChangeObserver & aObserver) : 
+    CActive(CActive::EPriorityStandard), iNetworkChangeObserver(aObserver)
+#else
+CFMRadioMobileNetworkInfoListener::CFMRadioMobileNetworkInfoListener(MFMRadioNetworkChangeObserver & aObserver) : 
+    CActive(CActive::EPriorityStandard), iNetworkChangeObserver(aObserver), iNetworkInfo(), iNetworkInfoPckg(iNetworkInfo)
+#endif
+    {
+    }
+
+// EPOC default constructor can leave.
+void CFMRadioMobileNetworkInfoListener::ConstructL()
+    {
+
+#ifdef __WINS__
+    iSubscriberId = KNullDesC().AllocL();
+    
+    TRAPD( err, iRepository = CRepository::NewL( KCRUidFMRadioEngine ) )
+    if ( err == KErrNotFound )
+        {
+        // Central Repository not found, so don't request a notification
+        }
+    else if ( err != KErrNone )
+        {
+        User::Leave( err );
+        }
+    else 
+        {
+        // Read initial values from Central Repository
+        GetCenRepNetworkInfoL();
+		SaveNetworkInfo();
+        // Start listening
+        CActiveScheduler::Add( this );
+        User::LeaveIfError( iRepository->NotifyRequest( KFMRadioCREmulatorNetworkInfo, iStatus ) );
+        SetActive();
+        }
+#else
+	// Get default TSY from database.
+		
+	CMDBSession * db = CMDBSession::NewL(CMDBSession::LatestVersion());
+	CleanupStack::PushL(db);
+	
+	CMDBRecordSet<CCDModemBearerRecord> * set = new (ELeave) CMDBRecordSet<CCDModemBearerRecord>(KCDTIdModemBearerRecord);
+	CleanupStack::PushL(set);
+			
+	set->LoadL(*db);
+	
+	TInt index = 0;	
+	CCDModemBearerRecord * record = static_cast<CCDModemBearerRecord*>(set->iRecords[index++]);
+	
+	if(record->iTsyName.IsNull() && set->iRecords.Count() > index) // the first item is normally only a template
+		{
+		record = static_cast<CCDModemBearerRecord*>(set->iRecords[index++]);
+		}
+
+	TPtrC name(static_cast<const TDesC&>(record->iTsyName));
+	TBuf<KMaxTextLength> tsyName;
+	tsyName.Copy(name);
+	
+	CleanupStack::PopAndDestroy(set);
+	CleanupStack::PopAndDestroy(db);	
+
+	//  Open phone 
+	User::LeaveIfError(iTelServer.Connect());
+
+	// TSY module gets automatically unloaded when tel.Close() is called ( and tel is is CU-stack),
+	// so loaded TSY is also leave-safe
+	User::LeaveIfError(iTelServer.LoadPhoneModule(tsyName));
+	
+	// Get number of phones.
+	TInt phones(0);
+	User::LeaveIfError(iTelServer.EnumeratePhones(phones));
+
+	// Get phone info of first legal phone.
+	TInt legalPhoneIndex = KErrNotFound;
+	RTelServer::TPhoneInfo phoneInfo;
+	for (TInt i=0; i<phones && legalPhoneIndex == KErrNotFound; i++)
+		{
+		if (iTelServer.GetPhoneInfo(i, phoneInfo) == KErrNone)
+			{
+			if (phoneInfo.iNetworkType == RTelServer::ENetworkTypeMobileDigital)
+				{
+				legalPhoneIndex = i;
+				}
+			}
+		}
+	User::LeaveIfError(legalPhoneIndex);
+
+	// Open legal phone.
+	User::LeaveIfError(iPhone.Open(iTelServer, phoneInfo.iName));
+
+	TUint32 networkCaps;
+	User::LeaveIfError(iPhone.GetNetworkCaps(networkCaps));
+	TUint32 identityCaps;
+	User::LeaveIfError(iPhone.GetIdentityCaps(identityCaps));
+	// Check if we are allowed to get network info.
+	if (networkCaps & RMobilePhone::KCapsGetCurrentNetwork)
+		{
+		// Gather initial information synchronically.
+		iPhone.GetCurrentNetwork(iStatus, iNetworkInfoPckg, iLocation);
+		User::WaitForRequest(iStatus);
+		User::LeaveIfError(iStatus.Int());
+		SaveNetworkInfo();
+		// Start first notify request (if allowed).
+		if (networkCaps & RMobilePhone::KCapsNotifyCurrentNetwork)
+			{
+			CActiveScheduler::Add(this);
+			iPhone.NotifyCurrentNetworkChange(iStatus, iNetworkInfoPckg, iLocation);
+			SetActive();
+			}
+		}
+	else
+		{
+		// Leave if we are not allowed to get network info.
+		// Other action could also be considered!!!!
+		User::Leave(KErrNotSupported);
+		}
+	if(identityCaps & RMobilePhone::KCapsGetSubscriberId)
+		{
+		TRequestStatus stat;
+		RMobilePhone::TMobilePhoneSubscriberId subId;
+		iPhone.GetSubscriberId(stat, subId);
+		User::WaitForRequest(stat);
+		if(!stat.Int())
+			{
+			iSubscriberId = subId.AllocL();
+			}
+		else
+			{
+			iSubscriberId = KNullDesC().AllocL();
+			}
+		}
+#endif	
+  }
+
+
+// Two-phased constructor.
+CFMRadioMobileNetworkInfoListener* CFMRadioMobileNetworkInfoListener::NewL(MFMRadioNetworkChangeObserver & aObserver)
+    {
+    CFMRadioMobileNetworkInfoListener* self = new (ELeave) CFMRadioMobileNetworkInfoListener(aObserver);   
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+    
+// Destructor
+CFMRadioMobileNetworkInfoListener::~CFMRadioMobileNetworkInfoListener()
+	{
+	Cancel();
+#ifdef __WINS__
+    delete iRepository;
+    delete iEmulatorNetworkInfo;
+#else
+    iPhone.Close();
+    iTelServer.Close();
+#endif
+    delete iSubscriberId;
+	}
+
+
+// ---------------------------------------------------------
+// CFMRadioMobileNetworkInfoListener::RunL
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CFMRadioMobileNetworkInfoListener::RunL()
+	{
+#ifdef __WINS__
+    GetCenRepNetworkInfoL();
+    SaveNetworkInfo();
+
+    User::LeaveIfError( iRepository->NotifyRequest( KFMRadioCREmulatorNetworkInfo, iStatus ) );
+    SetActive();
+#else
+	TInt statusCode = iStatus.Int();
+	if (statusCode == KErrNone)		// No other codes are returned (except error).
+		{
+		SaveNetworkInfo();
+		}
+	// Start new notify request.
+	iPhone.NotifyCurrentNetworkChange(iStatus, iNetworkInfoPckg, iLocation);
+	SetActive();
+#endif
+	}
+
+
+// ---------------------------------------------------------
+// CFMRadioMobileNetworkInfoListener::DoCancel
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CFMRadioMobileNetworkInfoListener::DoCancel()
+	{
+#ifdef __WINS__
+    iRepository->NotifyCancel( KFMRadioCREmulatorNetworkInfo );
+#else
+	iPhone.CancelAsyncRequest(EMobilePhoneNotifyCurrentNetworkChange);
+#endif
+	}
+
+// ---------------------------------------------------------
+// CFMRadioMobileNetworkInfoListener::SaveNetworkInfo
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CFMRadioMobileNetworkInfoListener::SaveNetworkInfo()
+	{
+#ifdef __WINS__
+    // iEmulatorNetworkInfo contains country code + network ID
+    if ( iEmulatorNetworkInfo && iEmulatorNetworkInfo->Length() > KFMRadioCREmulatorCountryCodeLength )
+        {
+        iCountryCode.Copy( iEmulatorNetworkInfo->Left( KFMRadioCREmulatorCountryCodeLength ) );
+        iNetworkId.Copy( iEmulatorNetworkInfo->Mid( KFMRadioCREmulatorCountryCodeLength, 
+            Min( iEmulatorNetworkInfo->Length() - KFMRadioCREmulatorCountryCodeLength, 
+                 iNetworkId.MaxLength() ) ) );
+        }
+    else
+        {
+        iCountryCode.Zero();
+        iNetworkId.Zero();
+        }
+#else
+	iNetworkInfo = iNetworkInfoPckg();
+	iNetworkId.Copy(iNetworkInfo.iNetworkId);
+	iCountryCode.Copy(iNetworkInfo.iCountryCode);
+#endif
+
+	// Create combine network ID and country code.
+	TBuf<20> compNetworkId;
+	compNetworkId.Append(iCountryCode);
+	// have to add '0' digit to the string to get correct id
+	// 24401 instead 2441, for example
+	if(iNetworkId.Length() < 2)
+		{
+		compNetworkId.AppendNum(static_cast<TInt64>(0));
+		}
+	compNetworkId.Append(iNetworkId);
+	TLex lexer(compNetworkId);
+	lexer.Val(iCompoundNetworkId);
+	if(iCompoundNetworkId != 0 && iPreviousCompoundNetworkId != iCompoundNetworkId)
+		{
+		if(iPreviousCompoundNetworkId != 0) 
+			{
+			iNetworkChangeObserver.NetworkIdChanged();
+			}
+		iPreviousCompoundNetworkId = iCompoundNetworkId;
+		}
+	}
+
+
+// ---------------------------------------------------------------------------
+// Reads network info from Central Repository
+// ---------------------------------------------------------------------------
+//
+#ifdef __WINS__
+void CFMRadioMobileNetworkInfoListener::GetCenRepNetworkInfoL()
+    {
+    TInt length = KFMRadioDefaultNetworkInfoBufferSize;
+    HBufC* valueString = HBufC::NewLC( length );
+    TInt error( KErrTooBig );
+
+    do
+        {
+        TPtr ptr = valueString->Des();
+
+        error = iRepository->Get( KFMRadioCREmulatorNetworkInfo, ptr );
+        if ( error == KErrTooBig )
+            {
+            CleanupStack::PopAndDestroy( valueString );
+            length = 2 * length;
+            valueString = HBufC::NewLC( length );
+            }
+        } while ( error == KErrTooBig );
+
+    if ( error ) 
+        {
+        TPtr ptr = valueString->Des();
+        ptr.Copy( KNullDesC() );	
+        }
+
+    CleanupStack::Pop( valueString );
+    delete iEmulatorNetworkInfo;
+    iEmulatorNetworkInfo = valueString;
+    }
+#endif
+
+
+// ---------------------------------------------------------
+// CFMRadioMobileNetworkInfoListener::CompoundNetworkId
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+TInt CFMRadioMobileNetworkInfoListener::CompoundNetworkId() const
+	{
+	return iCompoundNetworkId;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioMobileNetworkInfoListener::CountryCode
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+const TDesC& CFMRadioMobileNetworkInfoListener::CountryCode() const
+	{
+	return iCountryCode;
+	}
+	
+// ---------------------------------------------------------
+// CFMRadioMobileNetworkInfoListener::SubscriberId
+// ?implementation_description
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+const TDesC& CFMRadioMobileNetworkInfoListener::SubscriberId() const
+	{
+	return *iSubscriberId;
+	}
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/src/fmradiopropertyobserver.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,232 @@
+/*
+* Copyright (c) 2004-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: Observer for FMRadio property values  
+*
+*/
+
+
+#include "fmradiopropertyobserver.h"
+
+// ============================ MEMBER FUNCTIONS ===============================
+
+// -----------------------------------------------------------------------------
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+CFMRadioPropertyObserver::CFMRadioPropertyObserver(MFMRadioPropertyChangeObserver& aObserver, const TUid& aCategory, const TUint aKey, const TFMRadioPropertyType aPropertyType)
+    : CActive( CActive::EPriorityStandard ),
+    iObserver( aObserver ),
+    iCategory( aCategory ),
+    iKey( aKey ),
+    iPropertyType( aPropertyType )
+	{
+	}
+
+// -----------------------------------------------------------------------------
+// Symbian 2nd phase constructor can leave.
+// -----------------------------------------------------------------------------
+//
+void CFMRadioPropertyObserver::ConstructL()
+	{
+    switch (iPropertyType)
+        {
+        case EFMRadioPropertyInt:
+	        {
+	        break;
+	        }
+	    case EFMRadioPropertyByteArray:
+	        {
+	        iValueByteArray = HBufC8::NewL( RProperty::KMaxPropertySize );
+	        break;
+	        }
+	    case EFMRadioPropertyText:
+	        {
+	        // Max size in bytes, length is size / 2
+	        iValueText = HBufC::NewL( RProperty::KMaxPropertySize / 2 );
+	        break;
+	        }
+	    default:
+	        {
+	        break;
+	        }
+        }
+
+    User::LeaveIfError( iProperty.Attach( iCategory, iKey ) );
+    CActiveScheduler::Add( this );
+	}
+
+// -----------------------------------------------------------------------------
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CFMRadioPropertyObserver* CFMRadioPropertyObserver::NewL( MFMRadioPropertyChangeObserver& aObserver,
+                                                          const TUid& aCategory,
+                                                          const TUint aKey,
+                                                          const TFMRadioPropertyType aPropertyType )
+    {
+    CFMRadioPropertyObserver* self = NewLC( aObserver,
+                                            aCategory,
+                                            aKey,
+                                            aPropertyType );
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// -----------------------------------------------------------------------------
+// Two-phased constructor.
+// -----------------------------------------------------------------------------
+//
+CFMRadioPropertyObserver* CFMRadioPropertyObserver::NewLC( MFMRadioPropertyChangeObserver& aObserver,
+														  const TUid& aCategory,
+														  const TUint aKey,
+														  const TFMRadioPropertyType aPropertyType )
+	{
+    CFMRadioPropertyObserver* self = new( ELeave )CFMRadioPropertyObserver( aObserver,
+    																   		aCategory,
+    																   		aKey,
+    																   		aPropertyType );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    return self;
+	}
+
+// -----------------------------------------------------------------------------
+// Destructor
+// -----------------------------------------------------------------------------
+//
+CFMRadioPropertyObserver::~CFMRadioPropertyObserver()
+	{
+	Cancel();
+    iProperty.Close();
+    delete iValueByteArray;
+    delete iValueText;
+	}
+
+// ---------------------------------------------------------------------------
+// Subscribes to a property and reads the value, if not already active.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPropertyObserver::ActivateL()
+	{
+    if ( !IsActive() )
+        {
+        RunL();
+        }
+	}
+
+// -----------------------------------------------------------------------------
+// CFMRadioPropertyObserver::RunL
+// -----------------------------------------------------------------------------
+//
+void CFMRadioPropertyObserver::RunL()
+	{	
+    iProperty.Subscribe( iStatus );
+    SetActive();
+    
+    TInt err(KErrNone);
+    
+    switch (iPropertyType)
+        {
+        case EFMRadioPropertyInt:
+	        {
+	        err = iProperty.Get( iValueInt );
+	        if (!err)
+            	{
+                iObserver.HandlePropertyChangeL( iCategory, iKey, iValueInt );
+             	}
+	        break;
+	        }
+		case EFMRadioPropertyByteArray:
+	        {
+	        TPtr8 ptr8( iValueByteArray->Des() );
+	        err = iProperty.Get( ptr8 );
+	        if (!err)
+            	{
+                iObserver.HandlePropertyChangeL( iCategory, iKey, *iValueByteArray );
+             	}
+	        break;		        
+	        }
+		case EFMRadioPropertyText:
+	        {
+	        TPtr ptr( iValueText->Des() );
+	        err = iProperty.Get( ptr );
+	        if (!err)
+            	{
+                iObserver.HandlePropertyChangeL( iCategory, iKey, *iValueText );
+             	}
+	        break;			        
+	        }
+	        
+	    default:
+	        {
+	        break;
+	        }
+        }
+    
+    if (err)
+    	{
+        iObserver.HandlePropertyChangeErrorL(iCategory, iKey, err);
+     	}
+	}
+
+// -----------------------------------------------------------------------------
+// Cancels an outstanding active request
+// -----------------------------------------------------------------------------
+//
+void CFMRadioPropertyObserver::DoCancel()
+	{
+    iProperty.Cancel();
+	}
+
+// -----------------------------------------------------------------------------
+// Getter for integer value
+// -----------------------------------------------------------------------------
+//	
+TInt CFMRadioPropertyObserver::ValueInt( TBool aUpdate )
+	{
+	if( aUpdate )
+	    {
+	    iProperty.Get( iValueInt );
+	    }
+	return iValueInt;
+	}
+	
+// -----------------------------------------------------------------------------
+// Getter for byte array value
+// -----------------------------------------------------------------------------
+//	
+const TDesC8& CFMRadioPropertyObserver::ValueDes8( TBool aUpdate )
+	{
+   if( aUpdate )
+        {
+    	TPtr8 ptr8( iValueByteArray->Des() );
+    	iProperty.Get( ptr8 );
+        }
+	return *iValueByteArray;
+	}
+	
+// -----------------------------------------------------------------------------
+// Getter for text value
+// -----------------------------------------------------------------------------
+//	
+const TDesC& CFMRadioPropertyObserver::ValueDes( TBool aUpdate )
+	{
+   if( aUpdate )
+        {
+    	TPtr ptr( iValueText->Des() );
+    	iProperty.Get( ptr );
+        }
+	return *iValueText;
+	}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/src/fmradiopubsub.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,516 @@
+/*
+* Copyright (c) 2005-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:  Publish&Subscribe component of FM Radio
+*
+*/
+
+#include "fmradiocontroleventobserver.h"
+
+#include "fmradiopubsub.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------------------------
+// C++ default constructor can NOT contain any code, that might leave.
+// ---------------------------------------------------------------------------
+//
+CFMRadioPubSub::CFMRadioPubSub()
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// EPOC default constructor can leave.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPubSub::ConstructL()
+    {    
+    // Define data properties.
+    DefinePropertyL( KFMRadioPSDataChannel, RProperty::EInt, ETrue );
+    DefinePropertyL( KFMRadioPSDataFrequency, RProperty::EInt, ETrue );
+    DefinePropertyL( KFMRadioPSDataRadioPowerState, RProperty::EInt, ETrue );
+    DefinePropertyL( KFMRadioPSDataVolume, RProperty::EInt, ETrue );
+    DefinePropertyL( KFMRadioPSDataChannelDataChanged, RProperty::EInt, ETrue );
+    DefinePropertyL( KFMRadioPSDataTuningState, RProperty::EInt, ETrue );
+    DefinePropertyL( KFMRadioPSDataRadioMuteState, RProperty::EInt, ETrue );
+    DefinePropertyL( KFMRadioPSDataApplicationRunning, RProperty::EInt, ETrue );
+    DefinePropertyL( KFMRadioPSDataHeadsetStatus, RProperty::EInt, ETrue );
+    DefinePropertyL( KFMRadioPSDataFrequencyDecimalCount, RProperty::EInt, ETrue );
+    DefinePropertyL( KFMRadioPSDataLoudspeakerStatus, RProperty::EInt, ETrue );
+    DefinePropertyL( KFMRadioPSDataRDSProgramService, RProperty::EText, ETrue );
+    DefinePropertyL( KFMRadioPSDataRDSRadioText, RProperty::EText, ETrue );
+    DefinePropertyL( KFMRadioPSDataChannelName, RProperty::EText, ETrue );
+    
+    // Define control properties.
+    DefinePropertyL( KFMRadioPSControlStepToChannel, RProperty::EInt, EFalse );
+    DefinePropertyL( KFMRadioPSControlSeek, RProperty::EInt, EFalse );
+    DefinePropertyL( KFMRadioPSControlSetRadioMuteState , RProperty::EInt, EFalse );
+    // Observe control properties.
+    DefinePropertyL( KFMRadioActiveIdlePresetListCount, RProperty::EInt, ETrue );    
+    DefinePropertyL( KFMRadioActiveIdlePresetListFocus, RProperty::EInt, ETrue );
+    
+    
+    CFMRadioPropertyObserver* observer = CFMRadioPropertyObserver::NewLC( *this,
+            KFMRadioPSUid, KFMRadioPSControlStepToChannel, CFMRadioPropertyObserver::EFMRadioPropertyInt);
+    iPropertyArray.AppendL( observer );
+    CleanupStack::Pop( observer );
+    
+    observer = CFMRadioPropertyObserver::NewLC( *this,
+            KFMRadioPSUid, KFMRadioPSControlSeek, CFMRadioPropertyObserver::EFMRadioPropertyInt );
+    iPropertyArray.AppendL( observer );
+    CleanupStack::Pop( observer );
+    
+    observer = CFMRadioPropertyObserver::NewLC( *this,
+            KFMRadioPSUid, KFMRadioPSControlSetRadioMuteState, CFMRadioPropertyObserver::EFMRadioPropertyInt );
+    iPropertyArray.AppendL( observer );
+    CleanupStack::Pop( observer );
+    
+    observer = CFMRadioPropertyObserver::NewLC( *this,
+            KFMRadioPSUid, KFMRadioActiveIdlePresetListCount, CFMRadioPropertyObserver::EFMRadioPropertyInt );
+    iPropertyArray.AppendL( observer );
+    CleanupStack::Pop( observer );
+
+    for ( TInt i = 0; i < iPropertyArray.Count(); i++ )
+		{
+		iPropertyArray[i]->ActivateL();	
+		}
+    }
+
+// -------------------------------------------------------f--------------------
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CFMRadioPubSub* CFMRadioPubSub::NewL()
+    {
+    CFMRadioPubSub* self = new (ELeave) CFMRadioPubSub();
+    CleanupStack::PushL(self);
+    self->ConstructL();
+    CleanupStack::Pop();
+    return self;
+    }
+
+    
+// ---------------------------------------------------------------------------
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CFMRadioPubSub::~CFMRadioPubSub()
+    {
+    iPropertyArray.ResetAndDestroy();
+	iPropertyArray.Close();
+	
+	DeleteProperty( KFMRadioPSDataChannel );
+	DeleteProperty( KFMRadioPSDataFrequency );
+	DeleteProperty( KFMRadioPSDataRadioPowerState );
+	DeleteProperty( KFMRadioPSDataVolume );
+	DeleteProperty( KFMRadioPSDataChannelDataChanged );
+	DeleteProperty( KFMRadioPSDataTuningState );
+	DeleteProperty( KFMRadioPSDataRadioMuteState );
+	DeleteProperty( KFMRadioPSDataApplicationRunning );
+    DeleteProperty( KFMRadioPSDataHeadsetStatus );
+    DeleteProperty( KFMRadioPSDataFrequencyDecimalCount );
+    DeleteProperty( KFMRadioPSDataLoudspeakerStatus );
+    DeleteProperty( KFMRadioPSDataRDSProgramService );
+    DeleteProperty( KFMRadioPSDataRDSRadioText );
+    DeleteProperty( KFMRadioPSDataChannelName );
+    
+	DeleteProperty( KFMRadioPSControlStepToChannel );
+	DeleteProperty( KFMRadioPSControlSeek );
+	DeleteProperty( KFMRadioPSControlSetRadioMuteState );
+    DeleteProperty ( KFMRadioActiveIdlePresetListCount);
+	DeleteProperty ( KFMRadioActiveIdlePresetListFocus);
+    }
+
+// ---------------------------------------------------------------------------
+// Defines a property.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPubSub::DefinePropertyL( TUint aKey, TInt aAttr, TBool aDataProperty ) const
+    {
+    /*lint -save -e648*/
+    _LIT_SECURITY_POLICY_PASS( KFMRadioExternalAccessPolicy );
+    /*lint -restore*/
+    _LIT_SECURITY_POLICY_S0( KFMRadioInternalAccessPolicy, KUidFMRadioApplication );
+    
+    TInt err = KErrNone;
+    if ( aDataProperty )
+        {   
+        // For data properties, grant read access for all, but write access only for FMRadioEngine
+        err = RProperty::Define( KFMRadioPSUid, aKey, aAttr, KFMRadioExternalAccessPolicy, KFMRadioInternalAccessPolicy );
+        }
+    else
+        {
+        // For control properties, grant read access only for FMRadioEngine , but write access for all
+        err = RProperty::Define( KFMRadioPSUid, aKey, aAttr, KFMRadioInternalAccessPolicy, KFMRadioExternalAccessPolicy );
+        }
+    
+    
+    if ( err && err != KErrAlreadyExists )
+        {
+        User::Leave( err );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// Deletes a property
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPubSub::DeleteProperty( TUint aKey ) const
+    {
+    RProperty::Delete( KFMRadioPSUid, aKey );
+    }
+
+// ---------------------------------------------------------------------------
+// Gets the integer value stored in a property.
+// ---------------------------------------------------------------------------
+//
+TInt CFMRadioPubSub::PropertyValueIntL( TUint aKey ) const
+    {
+    TInt value;
+    User::LeaveIfError( RProperty::Get( KFMRadioPSUid, aKey, value ) );
+    return value;
+    }
+
+// ---------------------------------------------------------------------------
+// Sets a property's value.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPubSub::SetPropertyValueL( TUint aKey, TInt aValue ) const
+    {
+    User::LeaveIfError( RProperty::Set( KFMRadioPSUid, aKey, aValue ) );
+    }
+
+// ---------------------------------------------------------------------------
+// Sets a text property value
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPubSub::SetPropertyValueL( TUint aKey, const TDesC& aValue ) const
+    {
+    User::LeaveIfError( RProperty::Set( KFMRadioPSUid, aKey, aValue ) );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioPubSub::HandlePropertyChangeL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPubSub::HandlePropertyChangeL( const TUid& aCategory, const TUint aKey, const TInt aValue )
+	{		
+	if (aCategory != KFMRadioPSUid)
+		{
+		User::Leave(KErrArgument);
+		}
+	
+	if (iObserver)
+		{
+		if (aKey == KFMRadioPSControlStepToChannel)
+	    	{
+	    	switch (aValue)
+	    		{
+				case EFMRadioPSStepToChannelUninitialized:
+					{
+					break;	
+					}
+				case EFMRadioPSStepToChannelUp:
+					{
+					iObserver->StepToChannelL(EFMRadioUp);
+					break;
+					}
+				case EFMRadioPSStepToChannelDown:
+					{
+					iObserver->StepToChannelL(EFMRadioDown);
+					break;
+					}
+	 			default:
+	 				{
+	 				break; 
+	 				}			
+	    		}
+	    	}
+	    else if (aKey == KFMRadioPSControlSeek)
+	    	{
+	    	switch (aValue)
+	    		{
+				case EFMRadioPSSeekUninitialized:
+					{
+					break;	
+					}
+				case EFMRadioPSSeekUp:
+					{
+					iObserver->SeekL(EFMRadioUp);
+					break;
+					}
+				case EFMRadioPSSeekDown:
+					{
+					iObserver->SeekL(EFMRadioDown);
+					break;
+					}
+	 			default:
+	 				{
+	 				break; 
+	 				}			
+	    		}
+	    	}
+	    else if (aKey == KFMRadioPSControlSetRadioMuteState)
+	    	{
+	    	switch (aValue)
+	    		{
+				case EFMRadioPSMuteStateUninitialized:
+					{
+					break;	
+					}
+				case EFMRadioPSMuteStateOn:
+					{
+					iObserver->MuteL(ETrue);
+					break;
+					}
+				case EFMRadioPSMuteStateOff:
+					{
+					iObserver->MuteL(EFalse);
+					break;
+					}
+	 			default:
+	 				{
+	 				break; 
+	 				}			
+	    		}
+	    	}
+		}
+	}
+	
+// ---------------------------------------------------------------------------
+// Currently empty implementation because we don't listen byte array type properties.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPubSub::HandlePropertyChangeL(const TUid& /*aCategory*/, const TUint /*aKey*/, const TDesC8& /*aValue*/)
+	{
+	}
+	
+// ---------------------------------------------------------------------------
+// Currently empty implementation because we don't listen text type properties.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPubSub::HandlePropertyChangeL(const TUid& /*aCategory*/, const TUint /*aKey*/, const TDesC& /*aValue*/)
+	{
+	}
+	
+// ---------------------------------------------------------------------------
+// CFMRadioPubSub::HandlePropertyChangeErrorL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPubSub::HandlePropertyChangeErrorL (const TUid& /*aCategory*/, const TUint /*aKey*/, TInt /*aError*/ )
+	{
+	//NOP
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioPubSub::PublishChannelL
+// ---------------------------------------------------------------------------
+//	
+void CFMRadioPubSub::PublishChannelL(TInt aChannelId) const
+	{	    
+    TInt oldChannelId = PropertyValueIntL( KFMRadioPSDataChannel );
+
+    if ( aChannelId != oldChannelId )
+        {
+    	SetPropertyValueL( KFMRadioPSDataChannel, aChannelId );
+        }
+	}
+	
+// ---------------------------------------------------------------------------
+// CFMRadioPubSub::PublishFrequencyL
+// ---------------------------------------------------------------------------
+//	
+EXPORT_C void CFMRadioPubSub::PublishFrequencyL( TUint32 aFreq ) const
+	{	
+    TInt oldFreq = PropertyValueIntL( KFMRadioPSDataFrequency );
+    
+    if ( aFreq != oldFreq )
+        {
+    	SetPropertyValueL( KFMRadioPSDataFrequency, aFreq );
+        }
+	}
+	
+// ---------------------------------------------------------------------------
+// CFMRadioPubSub::PublishStateL
+// ---------------------------------------------------------------------------
+//	
+EXPORT_C void CFMRadioPubSub::PublishStateL( TBool aPowerOn ) const
+	{	
+    // If application process gets killed, power on state remains published.
+    // Must not compare state transition here, because then power on might not be published.
+	TFMRadioPSRadioPowerState newState = aPowerOn ? EFMRadioPSRadioPowerOn : EFMRadioPSRadioPowerOff;
+    SetPropertyValueL( KFMRadioPSDataRadioPowerState, newState );
+	}
+	
+// ---------------------------------------------------------------------------
+// CFMRadioPubSub::PublishVolumeL
+// ---------------------------------------------------------------------------
+//	
+void CFMRadioPubSub::PublishVolumeL( TInt aVol ) const
+	{	
+	TInt oldVol = PropertyValueIntL( KFMRadioPSDataVolume );
+	
+	if ( aVol != oldVol )
+	    {
+    	SetPropertyValueL( KFMRadioPSDataVolume, aVol );
+	    }
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioPubSub::PublishPresetCountL
+// ---------------------------------------------------------------------------
+//	
+EXPORT_C void CFMRadioPubSub::PublishPresetCountL( TInt aVal ) const
+	{	
+	TInt oldVal = PropertyValueIntL( KFMRadioActiveIdlePresetListCount );
+	
+	if ( aVal != oldVal )
+	    {
+    	SetPropertyValueL( KFMRadioActiveIdlePresetListCount, aVal );
+	    }
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioPubSub::PublishChannelDataChangedL
+// ---------------------------------------------------------------------------
+//	
+void CFMRadioPubSub::PublishChannelDataChangedL( TInt aChannelId ) const
+	{		
+	// Channel data changed notifications are allowed for the same channel multiple times, as the same channel's
+	// data can be changed many times in a row.
+	
+	SetPropertyValueL( KFMRadioPSDataChannelDataChanged, aChannelId );
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioPubSub::PublishTuningStateL
+// ---------------------------------------------------------------------------
+//	
+void CFMRadioPubSub::PublishTuningStateL( TFMRadioPSTuningState aTuningState ) const
+    {	
+    TFMRadioPSTuningState oldState = static_cast<TFMRadioPSTuningState>( PropertyValueIntL( KFMRadioPSDataTuningState ) );
+	
+	if ( aTuningState != oldState )
+	    {
+        SetPropertyValueL( KFMRadioPSDataTuningState, aTuningState );
+	    }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioPubSub::PublishMuteStateL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPubSub::PublishRadioMuteStateL( TBool aMuted ) const
+	{
+	TFMRadioPSRadioMuteState oldState = static_cast<TFMRadioPSRadioMuteState>( PropertyValueIntL( KFMRadioPSDataRadioMuteState ) );
+	TFMRadioPSRadioMuteState newState = aMuted ? EFMRadioPSMuteStateOn : EFMRadioPSMuteStateOff;
+	
+	if ( newState != oldState )
+	    {
+        SetPropertyValueL( KFMRadioPSDataRadioMuteState, newState );
+	    }
+	}
+	
+// ---------------------------------------------------------------------------
+// CFMRadioPubSub::PublishApplicationRunningStateL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFMRadioPubSub::PublishApplicationRunningStateL( TFMRadioPSApplicationRunningState aRunningState ) const
+	{	
+    // If application process gets killed, wrong running state remains published.
+    // Must not compare state transition here, because then application start might not be published.
+    SetPropertyValueL( KFMRadioPSDataApplicationRunning, aRunningState );
+	}
+	
+// ---------------------------------------------------------------------------
+// CFMRadioPubSub::PublishAntennaStatusL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPubSub::PublishAntennaStatusL( TFMRadioPSHeadsetStatus aAntennaStatus ) const
+	{	
+    TFMRadioPSHeadsetStatus oldState = static_cast<TFMRadioPSHeadsetStatus>( PropertyValueIntL( KFMRadioPSDataHeadsetStatus ) );
+	
+	if ( aAntennaStatus != oldState )
+	    {
+        SetPropertyValueL( KFMRadioPSDataHeadsetStatus, aAntennaStatus );
+	    }
+	}
+	
+// ---------------------------------------------------------------------------
+// CFMRadioPubSub::PublishFrequencyDecimalCountL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPubSub::PublishFrequencyDecimalCountL( TFMRadioPSFrequencyDecimalCount aDecimalCount ) const
+	{	
+    TFMRadioPSFrequencyDecimalCount oldCount = static_cast<TFMRadioPSFrequencyDecimalCount>( PropertyValueIntL( KFMRadioPSDataFrequencyDecimalCount ) );
+	
+	if ( aDecimalCount != oldCount )
+	    {
+        SetPropertyValueL( KFMRadioPSDataFrequencyDecimalCount, aDecimalCount );
+	    }
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioPubSub::PublishLoudspeakerStatusL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioPubSub::PublishLoudspeakerStatusL( 
+    TFMRadioPSLoudspeakerStatus aLoudspeakerStatus ) const
+    {
+    TFMRadioPSLoudspeakerStatus oldLoudspeakerStatus 
+        = static_cast<TFMRadioPSLoudspeakerStatus>( 
+        PropertyValueIntL(KFMRadioPSDataLoudspeakerStatus) );
+    
+    if(oldLoudspeakerStatus != aLoudspeakerStatus)
+        {
+        SetPropertyValueL( KFMRadioPSDataLoudspeakerStatus, aLoudspeakerStatus);
+        }	
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioPubSub::PublishRDSProgramServiceL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFMRadioPubSub::PublishRDSProgramServiceL( const TDesC& aProgramService ) const
+    {
+    SetPropertyValueL( KFMRadioPSDataRDSProgramService, aProgramService );
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioPubSub::PublishRDSRadioTextL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFMRadioPubSub::PublishRDSRadioTextL( const TDesC& aRadioText ) const
+    {
+    SetPropertyValueL( KFMRadioPSDataRDSRadioText, aRadioText );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioPubSub::PublishChannelNameL
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFMRadioPubSub::PublishChannelNameL( const TDesC& aName ) const
+    {
+    SetPropertyValueL( KFMRadioPSDataChannelName, aName );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioPubSub::SetControlEventObserver
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFMRadioPubSub::SetControlEventObserver( MFMRadioControlEventObserver* aControlEventObserver )
+    {
+    iObserver = aControlEventObserver;
+    }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/src/fmradiordsreceiver.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,124 @@
+/*
+* 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 RDS receiver implementation for FM Radio
+*
+*/
+
+
+#include "fmradiordsreceiver.h"
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiver::CFMRadioRdsReceiver
+// ---------------------------------------------------------------------------
+//
+CFMRadioRdsReceiver::CFMRadioRdsReceiver( TRadioSettings& aSettings ) : CFMRadioRdsReceiverBase(aSettings)
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiver::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiver::ConstructL()
+    {
+    BaseConstructL();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiver::NewL
+// ---------------------------------------------------------------------------
+//
+CFMRadioRdsReceiver* CFMRadioRdsReceiver::NewL( TRadioSettings& aSettings )
+    {
+    CFMRadioRdsReceiver* self = new ( ELeave ) CFMRadioRdsReceiver( aSettings );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiver::~CFMRadioRdsReceiver
+// ---------------------------------------------------------------------------
+//
+CFMRadioRdsReceiver::~CFMRadioRdsReceiver()
+    {
+    if( iRdsUtility )
+        {
+        iRdsUtility->Close();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiver::InitL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiver::InitL( CRadioUtility& aRadioUtility, CFMRadioPubSub* aPubSub )
+    {    
+    iPubSub = aPubSub;
+    
+    iRdsUtility = &aRadioUtility.RadioRdsUtilityL( *this );
+
+    SetAutomaticSwitchingL( iSettings.IsRdsAfSearchEnabled() );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiver::SetAutomaticSwitchingL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiver::SetAutomaticSwitchingL( TBool aEnable )
+    {
+    if( iRdsUtility )
+        {
+        User::LeaveIfError( iRdsUtility->SetAutomaticSwitching( aEnable ) );
+        }
+    
+    CFMRadioRdsReceiverBase::SetAutomaticSwitchingL( aEnable );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiver::StartReceiver
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiver::StartReceiver()
+    {    
+    TRdsData rdsData;
+    rdsData.iRdsFunctions = ERdsProgrammeService | ERdsAlternateFrequency | ERdsRadioText | ERdsRadioTextPlus;
+    rdsData.iAdditionalFunctions1 = 0;
+    rdsData.iAdditionalFunctions2 = 0;
+    
+    if( iRdsUtility && !iStarted)
+        {
+        if( iRdsUtility->NotifyRdsDataChange( rdsData ) == KErrNone )
+            {
+            // Avoid further calls
+            iStarted = ETrue;
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiver::StopReceiver
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiver::StopReceiver()
+    {
+    if( iRdsUtility )
+        {
+        iRdsUtility->CancelNotifyRdsDataChange();
+        }
+    iStarted = EFalse;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/src/fmradiordsreceiverbase.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,524 @@
+/*
+* 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 RDS receiver implementation for FM Radio
+*
+*/
+
+
+#include "fmradiordsreceiverbase.h"
+#include "fmradiopubsub.h"
+#include "fmradioengineradiosettings.h"
+
+// The delay, in microseconds, after which RDS PS name is concidered static
+const TInt KFMRadioStaticRdsPsNameDelay = 10000000; 
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::CFMRadioRdsReceiverBase
+// ---------------------------------------------------------------------------
+//
+CFMRadioRdsReceiverBase::CFMRadioRdsReceiverBase( TRadioSettings& aSettings ) : iSettings(aSettings)
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::BaseConstructL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::BaseConstructL()
+    {
+    iPsName = HBufC::NewL( TRdsPSName().MaxLength() );
+    iRadioText = HBufC::NewL( TRdsRadioText().MaxLength() );
+    iPsNameTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::~CFMRadioRdsReceiverBase
+// ---------------------------------------------------------------------------
+//
+CFMRadioRdsReceiverBase::~CFMRadioRdsReceiverBase()
+    {
+    iObservers.Close();
+    delete iPsName;
+    delete iRadioText;
+    delete iPsNameTimer;
+    
+    iProgramWebUrl.Close();
+    iArtistName.Close();
+    iSongName.Close();
+    iAlbumName.Close();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::AddObserver
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFMRadioRdsReceiverBase::AddObserver( MFMRadioRdsObserver* aObserver )
+    {
+    TInt index = iObservers.FindInAddressOrder( aObserver );
+    if( index == KErrNotFound )
+        {
+        iObservers.InsertInAddressOrder( aObserver );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::RemoveObserver
+// ---------------------------------------------------------------------------
+//
+EXPORT_C void CFMRadioRdsReceiverBase::RemoveObserver( MFMRadioRdsObserver* aObserver )
+    {
+    TInt index = iObservers.FindInAddressOrder( aObserver );
+
+    if( index >= 0 )
+        {
+        iObservers.Remove( index );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::AutomaticSwitchingEnabled
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CFMRadioRdsReceiverBase::AutomaticSwitchingEnabled() const
+    {
+    return iAfEnabled;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::ProgrammeService
+// ---------------------------------------------------------------------------
+//
+EXPORT_C const TDesC& CFMRadioRdsReceiverBase::ProgrammeService() const
+    {
+    return *iPsName;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::ProgrammeServiceNameType
+// ---------------------------------------------------------------------------
+//
+EXPORT_C CFMRadioRdsReceiverBase::TFMRadioProgrammeSeviceType CFMRadioRdsReceiverBase::ProgrammeServiceNameType() const
+    {
+    return iPsNameType;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::SignalAvailable
+// ---------------------------------------------------------------------------
+//
+EXPORT_C TBool CFMRadioRdsReceiverBase::SignalAvailable() const
+    {
+    return iSignalAvailable;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::RtPlusWebUrl
+// ---------------------------------------------------------------------------
+//
+EXPORT_C const TDesC& CFMRadioRdsReceiverBase::RtPlusProgramUrl() const
+    {
+    return iProgramWebUrl;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::RtPlusArtist
+// ---------------------------------------------------------------------------
+//
+EXPORT_C const TDesC& CFMRadioRdsReceiverBase::RtPlusArtist() const
+    {
+    return iArtistName;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::RtPlusAlbum
+// ---------------------------------------------------------------------------
+//
+EXPORT_C const TDesC& CFMRadioRdsReceiverBase::RtPlusAlbum() const
+    {
+    return iAlbumName;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::RtPlusSong
+// ---------------------------------------------------------------------------
+//
+EXPORT_C const TDesC& CFMRadioRdsReceiverBase::RtPlusSong() const
+    {
+    return iSongName;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::SetAutomaticSwitchingL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::SetAutomaticSwitchingL( TBool aEnable )
+    {
+    iAfEnabled = aEnable;
+    for( TInt i = 0 ; i < iObservers.Count() ; i++ )
+        {
+        iObservers[i]->RdsAfSearchStateChange( iAfEnabled );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::ClearRdsInformation
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::ClearRdsInformation()
+    {
+    TRdsPSName name;
+    TRdsRadioText radioText;
+    iPsNameTimer->Cancel();
+    iPsNameType = EFMRadioPSNameStaticAssumed;
+    MrroRdsDataPS( name );
+    MrroRdsDataRT( radioText );
+    iProgramWebUrl.Close();
+    iArtistName.Close();
+    iSongName.Close();
+    iAlbumName.Close();
+    MrroRdsEventSignalChange( EFalse );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::StaticPsNameTimerCallback
+// ---------------------------------------------------------------------------
+//
+TInt CFMRadioRdsReceiverBase::StaticPsNameTimerCallback( TAny* aSelf )
+    {
+    CFMRadioRdsReceiverBase* self = static_cast<CFMRadioRdsReceiverBase*>( aSelf );
+    if( self )
+        {
+        self->iPsNameTimer->Cancel();
+        if ( self->iPsNameType == EFMRadioPSNameStaticAssumed )
+            {
+            self->iPsNameType = EFMRadioPSNameStatic;
+            for( TInt i = 0 ; i < self->iObservers.Count() ; i++ )
+                {
+                self->iObservers[i]->RdsDataPsNameIsStatic( ETrue );
+                }
+            }
+        }
+    return KErrNone;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::HandleRdsDataRTplusL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::HandleRdsDataRTplusL( TRdsRTplusClass aRtPlusClass, TRdsRadioText& aRtPlusData )
+    {
+    TBool dataChanged = EFalse;
+    switch (aRtPlusClass)
+        {
+        case ERTplusItemTitle:
+            if ( aRtPlusData != iSongName )
+                {
+                dataChanged = ETrue;
+                iSongName.Close();
+                iSongName.CreateL( aRtPlusData );
+                }
+            break;
+        case ERTplusItemArtist:
+        case ERTplusItemBand:
+            if ( aRtPlusData != iArtistName )
+                {
+                dataChanged = ETrue;
+                iArtistName.Close();
+                iArtistName.CreateL( aRtPlusData );
+                }
+            break;
+        case ERTplusItemAlbum:
+            if ( aRtPlusData != iAlbumName )
+                {
+                dataChanged = ETrue;
+                iAlbumName.Close();
+                iAlbumName.CreateL( aRtPlusData );
+                }
+            break;
+        case ERTplusProgramHomepage:
+            {
+            if ( aRtPlusData != iProgramWebUrl )
+                {
+                dataChanged = ETrue;
+                iProgramWebUrl.Close();
+                iProgramWebUrl.CreateL( aRtPlusData );
+                }
+            break;
+            }
+        default:
+            // Let uncached values go through
+            dataChanged = ETrue;
+            break;
+        }
+    
+    if ( dataChanged )
+        {
+        for( TInt i = 0 ; i < iObservers.Count() ; i++ )
+            {
+            iObservers[i]->RdsDataRadioTextPlus( aRtPlusClass, aRtPlusData );
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroStationSeekByPTYComplete
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroStationSeekByPTYComplete( TInt /*aError*/, TInt /*aFrequency*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroStationSeekByTAComplete
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroStationSeekByTAComplete( TInt /*aError*/, TInt /*aFrequency*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroStationSeekByTPComplete
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroStationSeekByTPComplete( TInt /*aError*/, TInt /*aFrequency*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroGetFreqByPTYComplete
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroGetFreqByPTYComplete( TInt /*aError*/, RArray<TInt>& /*aFreqList*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroGetFreqByTAComplete
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroGetFreqByTAComplete( TInt /*aError*/, RArray<TInt>& /*aFreqList*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroGetPSByPTYComplete
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroGetPSByPTYComplete( TInt /*aError*/, RArray<TRdsPSName>& /*aPsList*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroGetPSByTAComplete
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroGetPSByTAComplete( TInt /*aError*/, RArray<TRdsPSName>& /*aPsList*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroRdsDataPI
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroRdsDataPI( TInt /*aPi*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroRdsDataPTY
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroRdsDataPTY( TRdsProgrammeType /*aPty*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroRdsDataPS
+// Notifies of the New Programme Service data
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroRdsDataPS( TRdsPSName& aPs )
+    {
+    TBool reportStaticState = EFalse;
+    if ( iPsName->Length() && aPs.Length() )
+        {
+        if ( *iPsName != aPs && iPsNameTimer->IsActive() )
+            {
+            // PS existed and it changed, cancel the timer as it is not static name anymore
+            iPsNameTimer->Cancel();
+            iPsNameType = EFMRadioPSNameDynamic;
+            reportStaticState = ETrue;
+            }
+        else
+            {
+            if ( iPsNameType == EFMRadioPSNameStaticAssumed && !iPsNameTimer->IsActive() )
+                {
+                // The timer should be reactivated in order to complete the determination
+                iPsNameTimer->Start( KFMRadioStaticRdsPsNameDelay, 
+                                     0, 
+                                     TCallBack( CFMRadioRdsReceiverBase::StaticPsNameTimerCallback, this ) );
+                }
+            }
+        }
+    else if ( !iPsName->Length() && aPs.Length() )
+        {
+        // PS name is set for the first time, start the timer to see if it is a static one
+        iPsNameTimer->Cancel();
+        iPsNameTimer->Start( KFMRadioStaticRdsPsNameDelay, 
+                             0, 
+                             TCallBack( CFMRadioRdsReceiverBase::StaticPsNameTimerCallback, this ) );
+        }
+    else
+        {
+        // PS name is reset
+        }
+    
+    iPsName->Des().Copy( aPs );
+    
+    if ( iPubSub )
+        {
+        TRAP_IGNORE( iPubSub->PublishRDSProgramServiceL( *iPsName ));
+        }
+ 
+    for( TInt i = 0 ; i < iObservers.Count() ; i++ )
+        {
+        iObservers[i]->RdsDataProgrammeService( *iPsName );
+        if( reportStaticState )
+            {
+            iObservers[i]->RdsDataPsNameIsStatic( iPsNameType == EFMRadioPSNameStatic );
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroRdsDataRT
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroRdsDataRT( TRdsRadioText& aRt )
+    { 
+    iRadioText->Des().Copy( aRt );
+    for( TInt i = 0 ; i < iObservers.Count() ; i++ )
+        {
+        iObservers[i]->RdsDataRadioText( *iRadioText );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroRdsDataCT
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroRdsDataCT( TDateTime& /*aCt*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroRdsDataTA
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroRdsDataTA( TBool /*aTaOn*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroRdsDataRTplus
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroRdsDataRTplus( TRdsRTplusClass aRtPlusClass, TRdsRadioText& aRtPlusData )
+    {
+    TRAP_IGNORE( HandleRdsDataRTplusL( aRtPlusClass, aRtPlusData ) )
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroRdsSearchBeginAF
+// Notifies of the start of Alternate Frequency search
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroRdsSearchBeginAF()
+    {
+    for( TInt i = 0 ; i < iObservers.Count() ; i++ )
+        {
+        iObservers[i]->RdsAfSearchBegin();
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroRdsSearchBeginAF
+// Notifies of the end of Alternate Frequency search
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroRdsSearchEndAF( TInt aError, TInt aFrequency )
+    {
+    for( TInt i = 0 ; i < iObservers.Count() ; i++ )
+        {
+        // Radio utility uses Hz, UI uses kHz. It's ok to divide with 1000, possible lost fractions are useless.
+        iObservers[i]->RdsAfSearchEnd( aFrequency / KFMRadioFreqMultiplier, aError );
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroRdsStationChangeTA
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroRdsStationChangeTA( TInt /*aFrequency*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroRdsEventAutomaticSwitchingChange
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroRdsEventAutomaticSwitchingChange( TBool /*aAuto*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroRdsEventAutomaticTrafficAnnouncement
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroRdsEventAutomaticTrafficAnnouncement( TBool /*aAuto*/ )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverBase::MrroRdsEventSignalChange
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverBase::MrroRdsEventSignalChange( TBool aSignal )
+    {
+    if ( aSignal )
+        {
+        if ( iPsName->Length() )
+            {
+            if ( iPsNameType == EFMRadioPSNameStaticAssumed && !iPsNameTimer->IsActive() )
+                {
+                iPsNameTimer->Cancel();
+                iPsNameTimer->Start( KFMRadioStaticRdsPsNameDelay, 
+                                     0, 
+                                     TCallBack( CFMRadioRdsReceiverBase::StaticPsNameTimerCallback, this ) );
+                }
+            }
+        }
+    else
+        {
+        // PS name type determination must be canceled on bad signal
+        iPsNameTimer->Cancel();
+        }
+    iSignalAvailable = aSignal;
+    for( TInt i = 0 ; i < iObservers.Count() ; i++ )
+        {
+        iObservers[i]->RdsAvailable( iSignalAvailable );
+        }
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/src/fmradiordsreceiversimulator.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,276 @@
+/*
+* 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 RDS receiver implementation for FM Radio
+*
+*/
+
+
+#include "fmradiordsreceiversimulator.h"
+
+const TInt KFMRadioRdsEventSimulationDelay = 3000000;
+
+// ======== MEMBER FUNCTIONS ========
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverSimulator::CFMRadioRdsReceiverSimulator
+// ---------------------------------------------------------------------------
+//
+CFMRadioRdsReceiverSimulator::CFMRadioRdsReceiverSimulator( TRadioSettings& aSettings ) : CFMRadioRdsReceiverBase(aSettings)
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverSimulator::ConstructL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverSimulator::ConstructL()
+    {    
+    BaseConstructL();
+    iEventSimulatorTimer = CPeriodic::NewL(CActive::EPriorityUserInput);
+    SetAutomaticSwitchingL( iSettings.IsRdsAfSearchEnabled() );
+    StartReceiver();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverSimulator::NewL
+// ---------------------------------------------------------------------------
+//
+CFMRadioRdsReceiverSimulator* CFMRadioRdsReceiverSimulator::NewL( TRadioSettings& aSettings )
+    {
+    CFMRadioRdsReceiverSimulator* self = new ( ELeave ) CFMRadioRdsReceiverSimulator( aSettings );
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverSimulator::~CFMRadioRdsReceiverSimulator
+// ---------------------------------------------------------------------------
+//
+CFMRadioRdsReceiverSimulator::~CFMRadioRdsReceiverSimulator()
+    {    
+    if( iEventSimulatorTimer && iEventSimulatorTimer->IsActive() )
+        {
+        iEventSimulatorTimer->Cancel();
+        }
+        
+    delete iEventSimulatorTimer;
+	iEventSimulatorTimer = NULL;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverSimulator::InitL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverSimulator::InitL( CRadioUtility& /*aRadioUtility*/, CFMRadioPubSub* aPubSub )
+    {
+    iPubSub = aPubSub;
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverSimulator::StartReceiver
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverSimulator::StartReceiver()
+    {
+    if( !iEventSimulatorTimer->IsActive() )
+        {
+    	iEventSimulatorTimer->Start( TTimeIntervalMicroSeconds32(KFMRadioRdsEventSimulationDelay),
+    					             TTimeIntervalMicroSeconds32(KFMRadioRdsEventSimulationDelay), 
+    					             TCallBack(StaticRdsSimulationCallback, this));
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverSimulator::StopReceiver
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverSimulator::StopReceiver()
+    {
+    iEventSimulatorTimer->Cancel();
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverSimulator::SetRadioEngineForRadioFmTunerSimulation
+// ---------------------------------------------------------------------------
+//
+void CFMRadioRdsReceiverSimulator::SetRadioEngineForRadioFmTunerSimulation( CRadioEngine* aEngine )
+	{ 
+	iEngine = aEngine;
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioRdsReceiverSimulator::StaticRdsSimulationCallback
+// ---------------------------------------------------------------------------
+//
+TInt CFMRadioRdsReceiverSimulator::StaticRdsSimulationCallback( TAny* aSelfPtr )
+	{
+	TFMRadioRdsSimulationEvent events[] = { EFMRadioRdsEventRadioTextPlus,
+	                                        EFMRadioRdsEventRadioTextPlus,
+	                                        EFMRadioRdsEventRadioTextPlus,
+	                                        EFMRadioRdsEventRadioTextPlus,
+	                                        EFMRadioRdsEventSignalOn,
+									//   EFMRadioRdsEventAFBegin,
+							        //   EFMRadioRdsEventAFEnd,
+									   EFMRadioRdsEventPS,
+									   EFMRadioRdsEventRadioText,
+                                       //EFMRadioRdsEventSignalOff,
+                                       //EFMRadioRdsEventSignalOn,
+                                       EFMRadioRdsEventPS,
+                                       EFMRadioRdsEventPS,
+                                 //      EFMRadioRdsEventRadioText,
+                                 //      EFMRadioRdsEventRadioText
+                                       EFMRadioRdsEventAFBegin,
+                                       EFMRadioRdsEventPS,
+                                       EFMRadioRdsEventAFEnd,
+                                       EFMRadioRdsEventSignalOff,
+                                       EFMRadioRdsEventRadioTextPlus};
+
+    TRdsPSName serviceNames[] = 
+        { 
+        _L("RadioXYZ"), 
+        _L("Some"), 
+        _L("program"), 
+        _L("service"), 
+        _L("text") 
+        };
+    
+    TRdsRadioText radioTexts[] = 
+        { 
+        _L("radio text"),
+		_L("radio text radio text radio text"),
+		_L("full radio text full radio text full radio text full radio textt") 
+		};
+    
+    TRdsRadioText radioTextsPlus[] = 
+        { 
+        _L("The rock song"),
+        _L("Album of the year"),
+        _L("Rock 'n' Rollers"),
+        _L("http://www.symbianfoundation.org/"),
+        _L("Disco Dancers"),
+        _L("The disco song"),
+        _L("The Greatest"),
+        _L("http://developer.symbian.org/"),
+        };
+    
+    TRdsRTplusClass radioTextsPlusClasses[] = 
+        { 
+        ERTplusItemTitle,
+        ERTplusItemAlbum,
+        ERTplusItemArtist,
+        ERTplusProgramHomepage,
+        ERTplusItemArtist,
+        ERTplusItemTitle,
+        ERTplusItemAlbum,
+        ERTplusProgramHomepage,
+        };
+    
+    TInt frequencies[] = { 103100000, 95800000 }; // Frequencies in hz
+    
+    TInt numEvents = sizeof( events ) / sizeof( TFMRadioRdsSimulationEvent );
+    TInt numServiceNames = sizeof( serviceNames ) / sizeof( TRdsPSName );
+    TInt numRadioTexts = sizeof( radioTexts ) / sizeof( TRdsRadioText );
+    TInt numRadioTextsPlus = sizeof( radioTextsPlus ) / sizeof( TRdsRadioText );
+    TInt numFrequencies = sizeof( frequencies ) / sizeof( TInt );
+    
+	CFMRadioRdsReceiverSimulator* self = static_cast<CFMRadioRdsReceiverSimulator*>(aSelfPtr);
+	if( self )
+		{
+        switch( events[self->iEventIterator] )
+            {
+            case EFMRadioRdsEventSignalOn:
+                {
+                self->MrroRdsEventSignalChange( ETrue );
+                break;
+                }
+                
+            case EFMRadioRdsEventSignalOff:
+                {
+                self->MrroRdsEventSignalChange( EFalse );
+                break;
+                }
+                
+            case EFMRadioRdsEventPS:
+                {
+                self->MrroRdsDataPS( serviceNames[self->iPsIterator] );
+                self->iPsIterator++;
+                if( self->iPsIterator >= numServiceNames )
+                    {
+                    self->iPsIterator = 0;
+                    }
+                break;
+                }
+            case EFMRadioRdsEventRadioText:
+                {
+                self->MrroRdsDataRT( radioTexts[self->iRadioTextIterator] );
+                self->iRadioTextIterator++;
+                if( self->iRadioTextIterator >= numRadioTexts )
+                    {
+                    self->iRadioTextIterator = 0;
+                    }
+                break;
+                }   
+            case EFMRadioRdsEventAFBegin:
+                {
+                if ( self->AutomaticSwitchingEnabled() )
+                	{
+                	 self->MrroRdsSearchBeginAF();
+                	}
+                break;
+                }
+                
+            case EFMRadioRdsEventAFEnd:
+                {
+                if ( self->AutomaticSwitchingEnabled() )
+                	{ 
+                     // Simulate MrftoFrequencyChange method from MRadioFmTunerObserver
+                     if( self->iEngine )
+                     	{
+                     	self->iEngine->MrftoFrequencyChange( frequencies[self->iFrequencyIterator] );
+                     	}
+                     
+                     self->MrroRdsSearchEndAF( KErrNone, frequencies[self->iFrequencyIterator] );
+                     
+                     self->iFrequencyIterator++;
+                     if( self->iFrequencyIterator >= numFrequencies )
+                         {
+                         self->iFrequencyIterator = 0;
+                         }
+                	}
+                break;
+                }
+            case EFMRadioRdsEventRadioTextPlus:
+                {
+                self->MrroRdsDataRTplus( radioTextsPlusClasses[self->iRadioTextPlusIterator], 
+                                         radioTextsPlus[self->iRadioTextPlusIterator]);
+                self->iRadioTextPlusIterator++;
+                if( self->iRadioTextPlusIterator >= numRadioTextsPlus )
+                    {
+                    self->iRadioTextPlusIterator = 0;
+                    }
+                break;
+                }                 
+            default:
+                break;
+            }
+        self->iEventIterator++;
+        if( self->iEventIterator >= numEvents )
+            {
+            self->iEventIterator = 0;
+            }
+		}
+	return KErrNone;
+	}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/src/fmradioregion.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,152 @@
+/*
+* Copyright (c) 2004-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: provides information about FM region
+*
+*/
+
+
+// INCLUDE FILES
+#include <barsread.h>
+#include "fmradioregion.h"
+
+// ================= MEMBER FUNCTIONS =======================
+
+// C++ default constructor can NOT contain any code, that
+// might leave.
+//
+CFMRadioRegion::CFMRadioRegion()
+    {
+    }
+
+// EPOC default constructor can leave.
+void CFMRadioRegion::ConstructL(TResourceReader& aRr)
+    {
+	iId = static_cast<TFMRadioRegionSetting>(aRr.ReadUint16());
+	iStepSize = static_cast<TUint16>( aRr.ReadUint16() );
+	iMinFreq = aRr.ReadUint32();
+	iMaxFreq = aRr.ReadUint32();
+	iDecimalCount = aRr.ReadInt16();
+
+	TInt countryCodeCount = aRr.ReadInt16();
+	for(TInt i = 0 ; i < countryCodeCount ; i++)
+		{
+		TPtrC code;
+		code.Set(aRr.ReadTPtrC());
+		User::LeaveIfError(iCountryCodes.Append(code.AllocL()));
+		}
+
+	iName = aRr.ReadHBufC16L();
+	iSettingName = aRr.ReadHBufC16L();
+    }
+
+// Two-phased constructor.
+CFMRadioRegion* CFMRadioRegion::NewL(TResourceReader& aRr)
+    {
+    CFMRadioRegion* self = new (ELeave) CFMRadioRegion;
+    
+    CleanupStack::PushL(self);
+    self->ConstructL(aRr);
+    CleanupStack::Pop();
+
+    return self;
+    }
+
+    
+// Destructor
+CFMRadioRegion::~CFMRadioRegion()
+    {
+    iCountryCodes.ResetAndDestroy();
+	iCountryCodes.Close();
+	delete iName;
+	delete iSettingName;
+    }
+
+// ---------------------------------------------------------
+// CFMRadioRegion::Id
+// Get the id of region
+// ---------------------------------------------------------
+//
+TFMRadioRegionSetting CFMRadioRegion::Id() const
+	{
+	return iId;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioRegion::StepSize
+// Get the step interval of region
+// ---------------------------------------------------------
+//
+TUint32 CFMRadioRegion::StepSize() const
+	{
+	return iStepSize;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioRegion::MinFreq
+// ---------------------------------------------------------
+//
+TUint32 CFMRadioRegion::MinFrequency() const
+	{
+	return iMinFreq;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioRegion::MaxFreq
+// ---------------------------------------------------------
+//
+TUint32 CFMRadioRegion::MaxFrequency() const
+	{
+	return iMaxFreq;
+	}
+	
+// ---------------------------------------------------------
+// CFMRadioRegion::DecimalCount
+// ---------------------------------------------------------
+//
+TInt CFMRadioRegion::DecimalCount() const
+	{
+	return iDecimalCount;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioRegion::CountryCode
+// Get the country code of region
+// ---------------------------------------------------------
+//
+const RFMRadioCountryCodeArray& CFMRadioRegion::CountryCodes()
+	{
+	return iCountryCodes;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioRegion::Name
+// Get the name of region
+// ---------------------------------------------------------
+//
+const TDesC16& CFMRadioRegion::Name() const
+	{
+	return *iName;
+	}
+
+// ---------------------------------------------------------
+// CFMRadioRegion::SettingItemName
+// Get the name of region
+// ---------------------------------------------------------
+//
+const TDesC16& CFMRadioRegion::SettingItemName() const
+	{
+	return *iSettingName;
+	}
+
+//  End of File  
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradioengine/src/fmradiosystemeventdetector.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,427 @@
+/*
+* 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: Observer for system events
+*
+*/
+
+#include "fmradiovariant.hrh" // include first for variation
+#include <e32def.h> // Define before audiopolicy defs
+#include <e32std.h> // Define before audiopolicy defs
+#include <eikdef.h>
+#include <sacls.h>
+#include <voiceuidomainpskeys.h>
+#include <ctsydomainpskeys.h>
+#ifndef __WINS__
+
+#ifdef __FMRADIO_ADVANCED_AUTO_RESUME
+
+const TInt KFMRadioAudioCategoryArrayGranularity = 3;
+#include <internal/audiopolicypubsubdata.h>
+#include <internal/audiosw_pubsubkeys.h>
+
+#else
+
+#include <AudioClientsListPSData.h>
+#include <AudioClientsListPSKeys.h>
+
+#endif // __FMRADIO_ADVANCED_AUTO_RESUME
+
+#endif //__WINS__
+
+#include "debug.h"
+#include "fmradiosystemeventdetector.h"
+#include "fmradiosystemeventdetectorobserver.h"
+
+const TInt KFMRadioAutoResumeDelay = 2000000; // micro seconds -> 2 seconds
+
+// ================= MEMBER FUNCTIONS =======================
+
+// ---------------------------------------------------------------------------
+// CFMRadioSystemEventDetector::CFMRadioSystemEventDetector
+// C++ default constructor can NOT contain any code, that might leave.
+// ---------------------------------------------------------------------------
+//
+CFMRadioSystemEventDetector::CFMRadioSystemEventDetector(MFMRadioSystemEventDetectorObserver&  aObserver) 
+    :   iObserver( aObserver ),
+        iIsNetworkCoverage( EFalse),
+        iIsVoiceUiActive( EFalse )
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioSystemEventDetector::ConstructL
+// EPOC default constructor can leave.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioSystemEventDetector::ConstructL()
+    {
+    CFMRadioPropertyObserver* networkObserver =
+        CFMRadioPropertyObserver::NewLC( *this,
+                                        KUidSystemCategory,
+                                        KUidNetworkStatusValue,
+                                        CFMRadioPropertyObserver::EFMRadioPropertyInt );
+        
+    iPropertyArray.AppendL( networkObserver );
+    CleanupStack::Pop( networkObserver );
+    
+    CFMRadioPropertyObserver* voiceUiObserver =	
+        CFMRadioPropertyObserver::NewLC( *this, 
+                                        KPSUidVoiceUiAccMonitor, 
+                                        KVoiceUiOpenKey, 
+                                        CFMRadioPropertyObserver::EFMRadioPropertyInt );
+                                                
+    iPropertyArray.AppendL( voiceUiObserver );
+    CleanupStack::Pop( voiceUiObserver );
+    // Initialize call state observer.
+    iCallStatusObserver = CFMRadioPropertyObserver::NewL( *this, 
+                                                      	  KPSUidCtsyCallInformation, 
+                                                      	  KCTsyCallState, 
+                                                      	  CFMRadioPropertyObserver::EFMRadioPropertyInt);
+										    
+    iCallStatusObserver->ActivateL();
+    iIsCallActive = iCallStatusObserver->ValueInt() != EPSCTsyCallStateNone;
+
+    iAutoResumeTimer = CPeriodic::NewL( CActive::EPriorityStandard );
+
+#ifndef __WINS__
+#ifdef __FMRADIO_ADVANCED_AUTO_RESUME
+    // Define audio types for not resuming.
+    // Audio categories are currently defined by adaptation of each hw platform.
+    // Nokia adaptation uses following definitions, which must be replaced by corresponding
+    // adaptation specific definitions of licensee adaptation.
+    // No general Symbian Foundation definitions for categories exists yet.
+    iNoAutoResumeAudioCategories = RArray<TInt>( KFMRadioAudioCategoryArrayGranularity );
+    iNoAutoResumeAudioCategories.AppendL( ECatMediaPlayer );
+    iNoAutoResumeAudioCategories.AppendL( ECatMobileTv );
+    iNoAutoResumeAudioCategories.AppendL( ECatUnknownPlayer );
+    iNoAutoResumeAudioCategories.Compress();
+#endif // __FMRADIO_ADVANCED_AUTO_RESUME
+    // Start listening audio client events.
+    CFMRadioPropertyObserver* audioPolicyObserver =
+        CFMRadioPropertyObserver::NewLC( *this,
+                                        KPSUidMMFAudioServer,
+                                        KAudioPolicyAudioClients,
+                                        CFMRadioPropertyObserver::EFMRadioPropertyByteArray );
+                         
+     iPropertyArray.AppendL( audioPolicyObserver );
+     CleanupStack::Pop( audioPolicyObserver );
+#endif	
+    for ( TInt i = 0; i < iPropertyArray.Count(); i++ )
+        {
+        iPropertyArray[i]->ActivateL();	
+        }
+    
+    TInt networkAvailability = iPropertyArray[EFMRadioNetworkCoverageProperty]->ValueInt();
+            
+    if (networkAvailability == ESANetworkAvailable)
+        {
+        iIsNetworkCoverage = ETrue;
+        }
+    else
+        {
+        iIsNetworkCoverage = EFalse;
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioSystemEventDetector::~CFMRadioSystemEventDetector
+// Destructor
+// ---------------------------------------------------------------------------
+//
+CFMRadioSystemEventDetector::~CFMRadioSystemEventDetector()
+    {
+    delete iCallStatusObserver;
+    iPropertyArray.ResetAndDestroy();
+    iPropertyArray.Close();
+    iNoAutoResumeAudioCategories.Close();
+    delete iAutoResumeTimer;  
+    }
+    
+// ---------------------------------------------------------------------------
+// CFMRadioSystemEventDetector::NewL
+// Two-phased constructor.
+// ---------------------------------------------------------------------------
+//
+CFMRadioSystemEventDetector* CFMRadioSystemEventDetector::NewL(
+                                    MFMRadioSystemEventDetectorObserver&  aObserver)
+    {
+    CFMRadioSystemEventDetector* self = new (ELeave) CFMRadioSystemEventDetector(aObserver);
+    
+    CleanupStack::PushL( self );
+    self->ConstructL();
+    CleanupStack::Pop();
+	
+    return self;
+    }
+    
+// ---------------------------------------------------------------------------
+// CFMRadioSystemEventDetector::HandlePropertyChangeL
+// Handling of the int property changes is done here. 
+// Observer components are getting notifications in correspondence with what 
+// has changed
+// ---------------------------------------------------------------------------
+//
+void CFMRadioSystemEventDetector::HandlePropertyChangeL( const TUid& aCategory, 
+                                                    const TUint aKey, 
+                                                    const TInt aValue )
+	{
+    if (aCategory == KUidSystemCategory && aKey == KUidNetworkStatusValue)
+    	{
+    	switch (aValue)
+    		{
+    		case ESANetworkAvailable:
+    			{
+				if (!iIsNetworkCoverage)
+				    {
+				    FTRACE( FPrint( _L("CFMRadioSystemEventDetector - iObserver NetworkUpCallbackL") ) );
+				    iIsNetworkCoverage = ETrue;
+				    iObserver.NetworkUpCallbackL();
+				    }
+    			break;
+    			}
+    		case ESANetworkUnAvailable:
+    			{
+    			if (iIsNetworkCoverage)
+    			    {
+    			    FTRACE( FPrint( _L("CFMRadioSystemEventDetector - iObserver NetworkDownCallbackL") ) );
+    			    iIsNetworkCoverage = EFalse;
+    			    iObserver.NetworkDownCallbackL();
+    			    }
+    			break;
+    			}
+    		default:
+    			{
+    			break;   			
+    			}
+    		}
+    	}
+	else if ( aCategory == KPSUidCtsyCallInformation && aKey == KCTsyCallState )
+    	{
+		if ( ( !iIsCallActive ) && ( aValue > EPSCTsyCallStateNone ) ) 
+			{
+			FTRACE( FPrint( _L("CFMRadioSystemEventDetector - iObserver iIsCallActive = ETrue;") ) );
+			iIsCallActive = ETrue;
+			iObserver.CallActivatedCallbackL();
+			}
+		else if ( ( iIsCallActive ) && ( aValue <= EPSCTsyCallStateNone ) )
+			{
+			FTRACE( FPrint( _L("CFMRadioSystemEventDetector - iObserver iIsCallActive = EFalse;") ) );
+			iIsCallActive = EFalse;
+			iObserver.CallDeactivatedCallbackL();	
+			}
+		else
+		    {
+		    // No change
+		    }
+    	}
+	else if ( aCategory == KPSUidVoiceUiAccMonitor && aKey == KVoiceUiOpenKey )
+        {
+        switch (aValue)
+    		{
+    		case KVoiceUiIsClose:
+    			{
+				if (iIsVoiceUiActive)
+				    {
+				    iIsVoiceUiActive = EFalse;
+                    FTRACE( FPrint( _L("CFMRadioSystemEventDetector - iObserver KVoiceUiIsClose") ) );
+                    if ( iNumberOfActiveAudioClients == 0 )
+                        {
+                        NotifyAudioResourcesAvailability();
+                        }
+				    }
+    			break;
+    			}
+    		case KVoiceUiIsOpen:
+    			{
+    			FTRACE( FPrint( _L("CFMRadioSystemEventDetector - iObserver KVoiceUiIsOpen") ) );
+    			if (!iIsVoiceUiActive)
+    			    {
+    			    iIsVoiceUiActive = ETrue;
+    			    
+    			    }
+    			break;
+    			}
+    		default:
+    			{
+    			break;   			
+    			}
+    		}
+        }
+    else // NOP
+    	{
+    	}    	
+	    	
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioSystemEventDetector::HandlePropertyChangeErrorL
+// This is a callback function which is called when a P&S components returns 
+// an error
+// ---------------------------------------------------------------------------
+//
+void CFMRadioSystemEventDetector::HandlePropertyChangeErrorL( const TUid& /*aCategory*/, 
+                                                         	  const TUint /*aKey*/, 
+                                                         	  TInt /*aError*/ )
+	{
+	}
+
+#ifndef __WINS__
+// ---------------------------------------------------------------------------
+// Handling of the byte array property changes is done here. 
+// Observer components are getting notifications in correspondence with what 
+// has changed
+// ---------------------------------------------------------------------------
+//
+void CFMRadioSystemEventDetector::HandlePropertyChangeL( const TUid& aCategory, 
+                                                    const TUint aKey, 
+                                                    const TDesC8& aValue)
+	{
+    if ( aCategory == KPSUidMMFAudioServer )
+        {        
+        if ( aKey == KAudioPolicyAudioClients )
+            {
+            TAudioClientList audioClients;
+            audioClients.Copy( aValue );
+            
+            iNumberOfActiveAudioClients = audioClients().iNumOfProcesses;                                                           
+            FTRACE(FPrint(_L("CFMRadioSystemEventDetector::HandlePropertyChangeL() number of audio clients: = %d"), iNumberOfActiveAudioClients));
+            
+            TBool autoResumePossible = ETrue;
+            
+            if ( iNumberOfActiveAudioClients > 0 )
+                {
+                // cancel any previously started audio resume call
+                iAutoResumeTimer->Cancel();
+                }
+            
+            // Check all playing audios!            
+            for ( TInt i = 0; i < iNumberOfActiveAudioClients; i++ )
+                {
+                TInt cat = audioClients().iClientCategoryList[i];                                                            
+                FTRACE( FPrint( _L("CFMRadioSystemEventDetector - audio category %d"), cat ) );
+
+                if ( iNoAutoResumeAudioCategories.Find(cat) != KErrNotFound )
+                    {
+                    FTRACE( FPrint( _L("CFMRadioSystemEventDetector - Radio audio will not be resumed") ) );
+                    autoResumePossible = EFalse;
+                    }
+                else
+                    {
+                    FTRACE( FPrint( _L("CFMRadioSystemEventDetector - radio audio might be resumed") ) );                                      
+                    }
+                }
+            
+                // Decide audio resource availability from audio category info.
+                if ( !autoResumePossible )
+            		{
+            		// Auto resume forbidden
+            		FTRACE( FPrint( _L("CFMRadioSystemEventDetector::HandlePropertyChangeL - AudioAutoResumeForbiddenL ") ) );
+            		iObserver.AudioAutoResumeForbiddenL();
+            		}
+            	else if ( iNumberOfActiveAudioClients == 0 )
+            		{
+            		if ( !iIsVoiceUiActive )
+            		    {            		    
+            		    FTRACE( FPrint( _L("CFMRadioSystemEventDetector::HandlePropertyChangeL - NotifyAudioResourcesAvailabilityL") ) );
+            		    NotifyAudioResourcesAvailability();
+            		    }
+            		}
+				else
+					{
+					// NOP. Some auto resume neutral audio is playing
+					}
+            }
+        }
+ 	}
+
+
+#endif //__WINS__
+
+#ifdef __WINS__
+// ---------------------------------------------------------------------------
+// Dummy version for WINS in order to avoid compiler warnings. 
+// The real implementation of function is above.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioSystemEventDetector::HandlePropertyChangeL( const TUid& /*aCategory*/, 
+                                                    const TUint /*aKey*/, 
+                                                    const TDesC8& /*aValue*/)
+	{
+ 	}
+#endif // __WINS__
+
+// Handling of the text property changes is done here. 
+// Observer components are getting notifications in correspondence with what 
+// has changed
+// ---------------------------------------------------------------------------
+//
+void CFMRadioSystemEventDetector::HandlePropertyChangeL( const TUid& /*aCategory*/, 
+                                                    const TUint /*aKey*/, 
+                                                    const TDesC& /*aValue*/)
+	{
+	}
+	
+// ---------------------------------------------------------------------------
+// CFMRadioSystemEventDetector::IsNetworkCoverage
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioSystemEventDetector::IsNetworkCoverage() const
+	{
+#ifdef __WINS__
+    return ETrue;
+#else
+	return iIsNetworkCoverage;
+#endif
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioSystemEventDetector::IsCallActive
+// ---------------------------------------------------------------------------
+//
+TBool CFMRadioSystemEventDetector::IsCallActive() const
+	{
+	return iIsCallActive;
+	}
+
+// ---------------------------------------------------------------------------
+// CFMRadioSystemEventDetector::NotifyAudioResourcesAvailability
+// ---------------------------------------------------------------------------
+//
+void CFMRadioSystemEventDetector::NotifyAudioResourcesAvailability()
+    {
+    FTRACE( FPrint( _L("CFMRadioSystemEventDetector::NotifyAudioResourcesAvailability") ) );
+    // call observer interface after a delay
+    iAutoResumeTimer->Cancel();
+    iAutoResumeTimer->Start( TTimeIntervalMicroSeconds32( KFMRadioAutoResumeDelay ),
+                             TTimeIntervalMicroSeconds32( 0 ),
+                             TCallBack( StaticAutoResumeTimerCallback, this ) );    
+    }
+    
+// ---------------------------------------------------------------------------
+// CFMRadioSystemEventDetector::StaticAutoResumeTimerCallback
+// ---------------------------------------------------------------------------
+//
+TInt CFMRadioSystemEventDetector::StaticAutoResumeTimerCallback( TAny* aSelfPtr )
+    {
+    FTRACE( FPrint( _L("CFMRadioSystemEventDetector::StaticAutoResumeTimerCallback") ) );
+    CFMRadioSystemEventDetector* self = static_cast<CFMRadioSystemEventDetector*>( aSelfPtr );
+    if ( self )
+        {
+        self->iAutoResumeTimer->Cancel();
+        TRAP_IGNORE( self->iObserver.AudioResourcesAvailableL() )
+        }
+    return KErrNone;
+    }
+
+// end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradiomcpplugin/group/bld.inf	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,32 @@
+/*
+* 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:  Component definition for the 
+*               FM Radio Content Publisher plugin.
+*
+*/
+
+#include <platform_paths.hrh>
+
+// Platforms the component needs to be built on
+//
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+
+PRJ_MMPFILES
+fmradiomcpplugin.mmp
+
+// End of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradiomcpplugin/group/fmradiomcpplugin.mmp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,71 @@
+/*
+* 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: Project definition file for project
+*              FM Radio Content Publisher plugin. 
+*
+*/
+
+#include <platform_paths.hrh>
+#include <data_caging_paths.hrh>
+#include "../resources/fmradiomcpplugin.hrh"	
+
+TARGET          fmradiomcpplugin100.dll
+TARGETTYPE      PLUGIN
+UID             0x10009D8D KFMRadioMCPPluginDllUid
+
+CAPABILITY      CAP_ECOM_PLUGIN
+VENDORID        VID_DEFAULT
+
+PAGED
+
+SOURCEPATH      ../resources
+START RESOURCE 2001f497.rss
+TARGET  fmradiomcpplugin100.rsc
+TARGETPATH ECOM_RESOURCE_DIR
+END
+
+START RESOURCE  fmradiomcpplugin.rss
+HEADER
+TARGETPATH RESOURCE_FILES_DIR
+LANGUAGE_IDS 
+END
+
+APP_LAYER_SYSTEMINCLUDE
+
+USERINCLUDE     ../inc
+USERINCLUDE     ../../fmradio/inc
+USERINCLUDE     ../resources
+USERINCLUDE     ../../activeidleengine/inc
+USERINCLUDE     ../../fmradioactionhandler/inc
+USERINCLUDE     ../../fmradioactionhandler/resources
+USERINCLUDE     ../../fmradioengine/inc
+USERINCLUDE     ../../loc
+
+SOURCEPATH      ../src
+SOURCE          fmradiomcpplugin.cpp
+
+LIBRARY         avkon.lib
+LIBRARY         bafl.lib 
+LIBRARY         cone.lib
+LIBRARY         commonengine.lib
+LIBRARY         ecom.lib
+LIBRARY         efsrv.lib
+LIBRARY         euser.lib
+LIBRARY         liwservicehandler.lib
+LIBRARY         fmradioactiveidleengine200.lib
+LIBRARY         fmradioengine.lib
+
+DEBUGLIBRARY flogger.lib
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradiomcpplugin/inc/fmradiomcpplugin.h	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,113 @@
+/*
+* 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:  Declaration for the class CFMRadioMCPPlugin.
+*
+*/
+
+#ifndef FMRADIOMCPPLUGIN_H
+#define FMRADIOMCPPLUGIN_H
+
+#include <fmradiointernalpskeys.h>
+#include <mcpplugin.h>
+#include <mcppluginobserver.h>
+
+#include "fmradioactiveidleenginenotifyhandler.h"
+
+class CFMRadioActiveIdleEngine;
+class MFMRadioActiveIdleEngineNotifyHandler;
+
+/**
+* Music content publisher plugin for FM Radio.
+*
+* Implements plugin which publishes FM Radio state to affected parties.
+* 
+* @lib fmradiomcpplugin100.lib
+* 
+*/
+NONSHARABLE_CLASS( CFMRadioMCPPlugin ) : public CMCPPlugin,
+                                         public MFMRadioActiveIdleEngineNotifyHandler
+    {
+public:
+    
+    static CFMRadioMCPPlugin* NewL( MMCPPluginObserver* aObserver );
+    ~CFMRadioMCPPlugin();
+
+// from base class CMCPPlugin
+    void Deactivate();
+
+// from base class MFMRadioActiveIdleEngineNotifyHandler
+    void HandleRadioVolumeChangeL( TInt aVolume );
+    void HandleTuningStateChangeL( TFMRadioPSTuningState aTuningState );
+    void HandleFrequencyChangeL( TInt aFrequency );
+    void HandleChannelChangeL( TInt aId );
+    void HandleChannelModifyL( TInt aId );
+    void HandleMuteStateChangeL( TFMRadioPSRadioMuteState aMuteState );
+    void HandleApplicationRunningStateChangeL( TFMRadioPSApplicationRunningState aRunningState );
+    void HandleFrequencyDecimalCountChangeL( TFMRadioPSFrequencyDecimalCount aDecimalCount );
+    void HandleAntennaStatusChangeL( TFMRadioPSHeadsetStatus aAntennaStatus );
+    void HandlePowerStateChangeL( TFMRadioPSRadioPowerState aPowerState );
+    void HandleRDSProgramServiceChangeL( const TDesC& aProgramService );
+    void HandleRDSRadioTextChangeL( const TDesC& aRdsText );
+    void HandleChannelNameChangeL( const TDesC& aName );
+    void HandlePresetListCountChangeL( TInt aPresetCount );    
+    void HandlePresetListFocusChangeL( TInt aPresetFocus );  
+    
+private:
+    void InstallFMRadioCommandActionL( const TDesC& aCommand, TMCPTriggerDestination aDestination );
+    void ActivateL();
+    void InstallEmptyActionL( TMCPTriggerDestination aDestination );
+    void DimmNextAndPrevious();
+    void PublishApplicationIconL( TMCPImageDestination aDestination );
+    void PublishFrequencyL( TInt aFrequency, TMCPTextDestination aDestination );
+    void UpdatePublishedToolBarL(TUint aToolBarState);
+    void UpdateToolBarL( TBool aForceApplicationClosing = EFalse );    
+    void UpdateMusicWidgetTextL( TBool aForceApplicationClosing = EFalse );
+    
+    /**
+     * Transfers the given frequency number as a descriptor
+     * @param aFrequency The frequency to be formatted
+     * @return The frequency descriptor. Pushed to Cleanup Stack. Ownership is transfered.
+     */
+    HBufC* FrequencyStringLC( TInt aFrequency );
+    
+private:
+    CFMRadioMCPPlugin( MMCPPluginObserver* aObserver );
+    void ConstructL();
+    void InitializeResourceLoadingL();
+
+private:
+    MMCPPluginObserver* iObserver;
+
+    CFMRadioActiveIdleEngine* iEngine;
+    TBool iActive;
+    TInt iResourceOffset;
+    RBuf iAntennaNotConnectedText;
+    RBuf iTuningText;
+    RBuf iSavedStationFormat;
+    RBuf iSavedStationFormatNoName;
+    RBuf iFrequencyFormat;
+    
+    TUint iTbPreviousState;
+    TUint iTbMuteUnmuteState;
+    TUint iTbNextState;
+    TInt iPresetCount;
+
+    /**
+     * Name of the mif-file that provides the published icons.
+     * Owned.
+     */
+    RBuf iMifFileName;
+    };
+
+#endif /* FMRADIOMCPPLUGIN_H */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradiomcpplugin/resources/2001f497.rss	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,55 @@
+/*
+* 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 plugin registration resource for FM Radio Content Publisher Plugin.
+*
+*/
+
+#include <mcppluginuids.hrh>
+#include <ecom/registryinfov2.rh>
+
+#include "fmradiomcpplugin.hrh"
+
+// ---------------------------------------------------------------------------
+// Resource information for the ECOM DLL.
+// ---------------------------------------------------------------------------
+//
+RESOURCE REGISTRY_INFO theInfo
+    {
+    resource_format_version = RESOURCE_FORMAT_VERSION_2;
+
+    dll_uid = KFMRadioMCPPluginDllUid;
+
+    interfaces = 
+        {
+        INTERFACE_INFO
+            {
+            // Plugin interface
+            interface_uid = KMCPPluginUid;
+
+            implementations = 
+                {
+                // Plugin implementation
+                IMPLEMENTATION_INFO
+                    {
+                    implementation_uid = KFMRadioMCPPluginImplementationUid;
+                    version_no         = 1;
+                    display_name       = "";
+                    default_data       = "";
+                    opaque_data        = "";
+                    rom_only           = 0;
+                    }
+                };
+            }
+        };
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradiomcpplugin/resources/fmradiomcpplugin.hrh	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,27 @@
+/*
+* 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: Definitions for the FM Radio Content Publisher plugin.
+*
+*/
+
+#ifndef FMRADIOMCPPLUGIN_HRH
+#define FMRADIOMCPPLUGIN_HRH
+
+// Ecom DLL UID for FM Radio Music Content Publisher Plugin.
+#define KFMRadioMCPPluginDllUid 0x2001F497
+
+// Ecom implementation UID for FM Radio Music Content Publisher Plugin.
+#define KFMRadioMCPPluginImplementationUid 0x2001FCB7
+
+#endif /* FMRADIOMCPPLUGIN_HRH */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradiomcpplugin/resources/fmradiomcpplugin.rss	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,45 @@
+/*
+* 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: Resource definitions for FM Radio Content Publisher Plugin.
+*
+*/
+
+NAME    FMCP
+
+#include <uikon.rh>
+#include <fmradio.loc>
+
+// ---------------------------------------------------------------------------
+// The signature of the resource file.
+// ---------------------------------------------------------------------------
+//
+RESOURCE RSS_SIGNATURE
+    {
+    }
+
+// ---------------------------------------------------------------------------
+// The default document name of the application.
+// ---------------------------------------------------------------------------
+//
+RESOURCE TBUF
+    {
+    buf = "";
+    }
+
+RESOURCE TBUF r_qtn_fmradio_widget_con_headset { buf = qtn_fmradio_widget_con_headset; }
+RESOURCE TBUF r_qtn_fmradio_widget_tuning { buf = qtn_fmradio_widget_tuning; }
+RESOURCE TBUF r_qtn_fmradio_widget_station_saved { buf = qtn_fmradio_widget_station_saved; }
+RESOURCE TBUF r_qtn_fmradio_widget_station_saved_freq { buf = qtn_fmradio_widget_station_saved_freq; }
+RESOURCE TBUF r_qtn_fmradio_widget_notsaved_frequency { buf = qtn_fmradio_widget_notsaved_frequency; }
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/fmradiomcpplugin/src/fmradiomcpplugin.cpp	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,767 @@
+/*
+* 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: Implementation for the FM Radio Content Publisher Plugin.
+*
+*/
+
+#include <AknUtils.h>
+#include <bautils.h>
+#include <coemain.h>
+#include <data_caging_path_literals.hrh>
+#include <data_caging_paths_strings.hrh>
+#include <e32cmn.h>
+#include <ecom/implementationproxy.h>
+#include <liwvariant.h>
+#include <StringLoader.h>
+#include <AknsConstants.h>
+#include <AknsItemID.h>
+#include <fmradiomcpplugin.rsg>
+#include <fmradio.mbg>
+
+#include "fmradioactionhandler.h"
+#include "fmradioactionhandler.hrh"
+#include "fmradioactionhandlerdefs.h"
+#include "fmradioactiveidleengine.h"
+#include "fmradioactiveidleenginenotifyhandler.h"
+#include "fmradiodefines.h"
+#include "debug.h"
+#include "fmradiomcpplugin.h"
+#include "fmradiomcpplugin.hrh"
+
+_LIT( KFMRadioMifFileName, "fmradio.mif" );
+_LIT( KFMRadioMifDir, "\\resource\\apps\\" );
+
+_LIT( KFMRadioMCPPluginResourceFileName, "fmradiomcpplugin.rsc" );
+_LIT8( KFMRadioPluginUid, "plugin_id" );
+_LIT8( KFMRadioData, "data" );
+_LIT8( KType, "type" );
+
+const TUint KFMRadioPrevious        = 0x001; //000000000001
+const TUint KFMRadioNext            = 0x002; //000000000010
+const TUint KFMRadioMute            = 0x004; //000000000100
+const TUint KFMRadioUnmute          = 0x008; //000000001000
+const TUint KFMRadioPreviousDimmed  = 0x010; //000000010000
+const TUint KFMRadioNextDimmed      = 0x020; //000000100000
+const TUint KFMRadioMuteDimmed      = 0x040; //000001000000
+const TUint KFMRadioUnmuteDimmed    = 0x080; //000010000000
+
+CFMRadioMCPPlugin* CFMRadioMCPPlugin::NewL( MMCPPluginObserver* aObserver )
+    {
+    CFMRadioMCPPlugin* self = new ( ELeave ) CFMRadioMCPPlugin( aObserver );
+    CleanupStack::PushL( self );
+
+    self->ConstructL();
+    
+    CleanupStack::Pop( self );
+    return self;
+    }
+
+CFMRadioMCPPlugin::~CFMRadioMCPPlugin()
+    {
+    if ( iResourceOffset > 0 )
+        {
+        CCoeEnv::Static()->DeleteResourceFile( iResourceOffset );
+        }
+
+    delete iEngine;
+    iAntennaNotConnectedText.Close();
+    iTuningText.Close();
+    iSavedStationFormat.Close();
+    iSavedStationFormatNoName.Close();
+    iFrequencyFormat.Close();
+    
+    iMifFileName.Close();
+    }
+
+CFMRadioMCPPlugin::CFMRadioMCPPlugin( MMCPPluginObserver* aObserver )
+    : iObserver( aObserver )
+    {
+    }
+
+void CFMRadioMCPPlugin::ConstructL()
+    {
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::ConstructL" )));
+    InitializeResourceLoadingL();
+    
+    CCoeEnv* coeEnv = CCoeEnv::Static();
+
+    iAntennaNotConnectedText.Assign( StringLoader::LoadL( R_QTN_FMRADIO_WIDGET_CON_HEADSET, coeEnv ) );
+    iTuningText.Assign( StringLoader::LoadL( R_QTN_FMRADIO_WIDGET_TUNING, coeEnv ) );
+    iSavedStationFormat.Assign( StringLoader::LoadL( R_QTN_FMRADIO_WIDGET_STATION_SAVED, coeEnv ) );
+    iSavedStationFormatNoName.Assign( StringLoader::LoadL( R_QTN_FMRADIO_WIDGET_STATION_SAVED_FREQ, coeEnv ) );
+    iFrequencyFormat.Assign( StringLoader::LoadL( R_QTN_FMRADIO_WIDGET_NOTSAVED_FREQUENCY, coeEnv ) );
+    
+    // Release the resource file, because we don't want to keep file handle open.
+    // That would prevent updating the binary with SIS. 
+    if ( iResourceOffset > 0 )
+        {
+        coeEnv->DeleteResourceFile( iResourceOffset );
+        iResourceOffset = 0;
+        }
+    
+    TFindFile finder( coeEnv->FsSession() );
+    TInt err = finder.FindByDir( KFMRadioMifFileName, KFMRadioMifDir );
+    if ( err == KErrNone )
+        {
+        iMifFileName.CreateL( finder.File() );
+        }
+    
+    iEngine = CFMRadioActiveIdleEngine::NewL( *this );
+    iEngine->ActivateL();
+    
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::ConstructL - Exiting." )));    
+    }
+
+// ---------------------------------------------------------------------------
+// Initialize resource file for loading resources.
+// ---------------------------------------------------------------------------
+//
+void CFMRadioMCPPlugin::InitializeResourceLoadingL()
+    {
+    CCoeEnv* coeEnv = CCoeEnv::Static();
+    RFs fs( coeEnv->FsSession() );
+    TFileName fileName; 
+    TFileName baseResource;
+    TFindFile finder( fs );
+    TLanguage language( ELangNone );
+    
+    TParsePtrC parse( KFMRadioMCPPluginResourceFileName );
+    _LIT( resourceFileWildExt, ".r*" );
+
+    // Make sure to find all resource files, not only .rsc files as it may be so
+    // that there is only .r01, .r02, etc. files available
+    fileName.Copy( parse.Name() );
+    fileName.Append( resourceFileWildExt );
+
+    // TFindFile applies search order that is from 
+    // drive Y to A, then Z
+    CDir* entries = NULL;
+    TInt err = finder.FindWildByDir( fileName , KDC_RESOURCE_FILES_DIR, entries );
+    delete entries;
+    entries = NULL;
+    TBool found = EFalse;
+    while ( !found && err == KErrNone )
+        {
+        // Found file
+        fileName.Zero();
+        TParsePtrC foundPath( finder.File() );
+        fileName.Copy( foundPath.DriveAndPath() );
+        fileName.Append( KFMRadioMCPPluginResourceFileName );
+        BaflUtils::NearestLanguageFile( fs, fileName, language );
+        if ( language != ELangNone && BaflUtils::FileExists( fs, fileName ) )
+            {
+            found = ETrue;
+            iResourceOffset = coeEnv->AddResourceFileL( fileName );
+            }
+        else
+            {
+            if ( language == ELangNone &&
+                 !baseResource.Compare( KNullDesC ) &&
+                 BaflUtils::FileExists( fs, fileName ) )
+                {
+                baseResource.Copy( fileName );
+                }
+            err = finder.FindWild( entries );
+            delete entries;
+            entries = NULL;
+            }
+        }
+
+    if ( !found && baseResource.Compare( KNullDesC ) )
+        {
+        // If we found *.rsc then better to use that than nothing
+        if ( BaflUtils::FileExists( fs, baseResource ) )
+            {
+            iResourceOffset = coeEnv->AddResourceFileL( baseResource );
+            found = ETrue;
+            }
+        }
+
+    if( !found )
+        {
+        User::Leave( KErrNotFound );
+        }
+    }
+
+void CFMRadioMCPPlugin::Deactivate()
+    {
+    iActive = EFalse;
+    }
+
+void CFMRadioMCPPlugin::ActivateL()
+    {
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::ActivateL()" )));
+    iActive = ETrue;
+    iObserver->BecameActiveL( this );
+    
+    iObserver->PublishTextL( this, EMusicWidgetDefaultText, KNullDesC );
+    
+    iObserver->PublishImageL( this, EMusicWidgetImage1,
+                    KAknsIIDQgnIndiRadioDefault,
+                    iMifFileName,
+                    EMbmFmradioQgn_indi_radio_default,
+                    EMbmFmradioQgn_indi_radio_default_mask );
+
+    InstallFMRadioCommandActionL( KFMRadioCommandValueStartNowPlaying, EMusicWidgetTrigger1 );
+    HandleChannelChangeL( iEngine->Channel() );
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioMCPPlugin::UpdatePublishedToolBarL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioMCPPlugin::UpdatePublishedToolBarL( TUint aToolBarState )
+    {
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdatePublishedToolBarL - Entering." ))); 
+    if ( iActive )
+        {
+        TAknsItemID iconId;
+        if ( KFMRadioPrevious & aToolBarState )
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdatePublishedToolBarL - 1 Enter" ))); 
+            iconId.Set( EAknsMajorGeneric, EAknsMinorGenericQgnPropImageTbPrev );
+            iObserver->PublishImageL( this, 
+                                      EMusicWidgetToolbarB1, 
+                                      iconId, 
+                                      iMifFileName, 
+                                      EMbmFmradioQgn_prop_image_tb_prev, 
+                                      EMbmFmradioQgn_prop_image_tb_prev_mask );
+            InstallFMRadioCommandActionL( KFMRadioCommandValueStepPrevious, EMusicWidgetTB1Trigger );
+            iTbPreviousState = KFMRadioPrevious;
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdatePublishedToolBarL - 1 Exit" ))); 
+            }
+
+        if ( KFMRadioPreviousDimmed & aToolBarState )
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdatePublishedToolBarL - 2 Enter" )));
+            iconId.Set( EAknsMajorGeneric, EAknsMinorGenericQgnPropImageTbPrevDimmed ); 
+            iObserver->PublishImageL( this, 
+                                      EMusicWidgetToolbarB1, 
+                                      iconId,
+                                      iMifFileName, 
+                                      EMbmFmradioQgn_prop_image_tb_prev_dimmed, 
+                                      EMbmFmradioQgn_prop_image_tb_prev_dimmed_mask );
+            InstallEmptyActionL( EMusicWidgetTB1Trigger );
+            iTbPreviousState = KFMRadioPreviousDimmed; 
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdatePublishedToolBarL - 2 Exit" ))); 
+            }
+        
+        if ( KFMRadioNext & aToolBarState )
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdatePublishedToolBarL - 3 Enter" ))); 
+            iconId.Set( EAknsMajorGeneric, EAknsMinorGenericQgnPropImageTbNext );
+            iObserver->PublishImageL( this, 
+                                      EMusicWidgetToolbarB3, 
+                                      iconId, 
+                                      iMifFileName, 
+                                      EMbmFmradioQgn_prop_image_tb_next, 
+                                      EMbmFmradioQgn_prop_image_tb_next_mask );
+            InstallFMRadioCommandActionL( KFMRadioCommandValueStepNext, EMusicWidgetTB3Trigger );
+            iTbNextState = KFMRadioNext;
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdatePublishedToolBarL - 3 Exit" ))); 
+            }
+        
+        if ( KFMRadioNextDimmed & aToolBarState )
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdatePublishedToolBarL - 4 Enter" ))); 
+            iconId.Set( EAknsMajorGeneric, EAknsMinorGenericQgnPropImageTbNextDimmed );
+            iObserver->PublishImageL( this, 
+                                      EMusicWidgetToolbarB3, 
+                                      iconId, 
+                                      iMifFileName, 
+                                      EMbmFmradioQgn_prop_image_tb_next_dimmed, 
+                                      EMbmFmradioQgn_prop_image_tb_next_dimmed_mask );
+            InstallEmptyActionL( EMusicWidgetTB3Trigger );
+            iTbNextState = KFMRadioNextDimmed;            
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdatePublishedToolBarL - 4 Exit" ))); 
+            }
+        
+        if ( KFMRadioMute & aToolBarState )
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdatePublishedToolBarL - 5 Enter" ))); 
+            iconId.Set( EAknsMajorGeneric, EAknsMinorGenericQgnIndiMusicWidgetTbRadioSound );
+            iObserver->PublishImageL( this, 
+                                      EMusicWidgetToolbarB2, 
+                                      iconId, 
+                                      iMifFileName, 
+                                      EMbmFmradioQgn_indi_music_widget_tb_radio_sound, 
+                                      EMbmFmradioQgn_indi_music_widget_tb_radio_sound_mask );
+            InstallFMRadioCommandActionL( KFMRadioCommandValueUnmute, EMusicWidgetTB2Trigger );
+            iTbMuteUnmuteState = KFMRadioMute;
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdatePublishedToolBarL - 5 Exit" ))); 
+            }
+        
+        if ( KFMRadioUnmute & aToolBarState )
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdatePublishedToolBarL - 6 Enter" ))); 
+            iconId.Set( EAknsMajorGeneric, EAknsMinorGenericQgnIndiMusicWidgetTbRadioSoundMuted );
+            iObserver->PublishImageL( this,
+                                      EMusicWidgetToolbarB2,
+                                      iconId,
+                                      iMifFileName,
+                                      EMbmFmradioQgn_indi_music_widget_tb_radio_sound_muted,
+                                      EMbmFmradioQgn_indi_music_widget_tb_radio_sound_muted_mask );
+            InstallFMRadioCommandActionL( KFMRadioCommandValueMute, EMusicWidgetTB2Trigger );
+            iTbMuteUnmuteState = KFMRadioUnmute;            
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdatePublishedToolBarL - 6 Exit" ))); 
+            }
+        
+        if ( KFMRadioMuteDimmed & aToolBarState )
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdatePublishedToolBarL - 7 Enter" ))); 
+            iconId.Set( EAknsMajorGeneric, EAknsMinorGenericQgnIndiMusicWidgetTbRadioSoundDimmed );
+            iObserver->PublishImageL( this, 
+                                      EMusicWidgetToolbarB2, 
+                                      iconId, 
+                                      iMifFileName, 
+                                      EMbmFmradioQgn_indi_music_widget_tb_radio_sound_dimmed, 
+                                      EMbmFmradioQgn_indi_music_widget_tb_radio_sound_dimmed_mask );
+            InstallEmptyActionL( EMusicWidgetTB2Trigger );
+            iTbMuteUnmuteState = KFMRadioMuteDimmed; 
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdatePublishedToolBarL - 7 Exit" ))); 
+            }
+        
+        if ( KFMRadioUnmuteDimmed & aToolBarState )
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdatePublishedToolBarL - 8 Enter" ))); 
+            iconId.Set( EAknsMajorGeneric, EAknsMinorGenericQgnIndiMusicWidgetTbRadioSoundMutedDimmed );
+            iObserver->PublishImageL( this, 
+                                      EMusicWidgetToolbarB2, 
+                                      iconId, 
+                                      iMifFileName, 
+                                      EMbmFmradioQgn_indi_music_widget_tb_radio_sound_muted_dimmed, 
+                                      EMbmFmradioQgn_indi_music_widget_tb_radio_sound_muted_dimmed_mask );
+            InstallEmptyActionL( EMusicWidgetTB2Trigger );
+            iTbMuteUnmuteState = KFMRadioUnmuteDimmed;
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdatePublishedToolBarL - 8 Exit" ))); 
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioMCPPlugin::UpdateToolBarL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioMCPPlugin::UpdateToolBarL( TBool aForceApplicationClosing )
+    {
+    if ( iActive )
+        {
+        TUint muteDimmedState = iEngine->MuteState() == EFMRadioPSMuteStateOn ?
+                KFMRadioUnmuteDimmed : KFMRadioMuteDimmed;
+        // Update Next and Previous buttons.
+        if ( iEngine->AntennaStatus() == EFMRadioPSHeadsetDisconnected )
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdateToolBarL - 1" )));
+            UpdatePublishedToolBarL( KFMRadioPreviousDimmed | muteDimmedState |  KFMRadioNextDimmed);
+            return;
+            }
+        else if ( iEngine->ApplicationRunningState() != EFMRadioPSApplicationRunning || aForceApplicationClosing )
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdateToolBarL - 2" )));
+            UpdatePublishedToolBarL( KFMRadioPreviousDimmed | muteDimmedState |  KFMRadioNextDimmed);
+            return;
+            }
+        else if ( iEngine->PowerState() != EFMRadioPSRadioPowerOn )
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdateToolBarL - 3" )));
+            UpdatePublishedToolBarL( KFMRadioPreviousDimmed | muteDimmedState |  KFMRadioNextDimmed);
+            return;
+            }
+        else if ( iEngine->TuningState() != EFMRadioPSTuningUninitialized )
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdateToolBarL - 4" )));
+            UpdatePublishedToolBarL( KFMRadioPreviousDimmed |  KFMRadioNextDimmed );
+            }
+        else if ( iPresetCount > 1 || ( iPresetCount == 1 && iEngine->Channel() == KErrNotFound ) )
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdateToolBarL - 5" )));
+            UpdatePublishedToolBarL( KFMRadioPrevious | KFMRadioNext );
+            }
+        else
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdateToolBarL - 6" )));
+            UpdatePublishedToolBarL( KFMRadioPreviousDimmed | KFMRadioNextDimmed );
+            }
+
+        // Update Mute/Unmute button
+        if ( iEngine->ApplicationRunningState() != EFMRadioPSApplicationRunning || aForceApplicationClosing )
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdateToolBarL - 7" )));
+            UpdatePublishedToolBarL( muteDimmedState );
+            }
+        else if ( iEngine->TuningState() != EFMRadioPSTuningUninitialized )
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdateToolBarL - 8" )));
+            UpdatePublishedToolBarL( muteDimmedState );
+            }
+        else
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdateToolBarL - 9" )));
+            HandleMuteStateChangeL( iEngine->MuteState() );
+            }
+        }
+    }
+// ---------------------------------------------------------------------------
+// CFMRadioMCPPlugin::UpdateMusicWidgetTextL
+// ---------------------------------------------------------------------------
+//
+void CFMRadioMCPPlugin::UpdateMusicWidgetTextL( TBool aForceApplicationClosing )
+    {
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdateMusicWidgetTextL" )));
+    if ( iActive )
+        {
+        TInt rightToLeftCharWidth = AknLayoutUtils::LayoutMirrored() ? sizeof(TText16) : 0;
+        
+        // Homescreen publishing
+        if ( iEngine->AntennaStatus() == EFMRadioPSHeadsetDisconnected && !aForceApplicationClosing )
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdateMusicWidgetTextL - Publishing HS antenna not connected: \"%S\""), &iAntennaNotConnectedText ));        
+            iObserver->PublishTextL( this, EMusicWidgetText1, iAntennaNotConnectedText );
+            }
+        else if ( iEngine->TuningState() != EFMRadioPSTuningUninitialized && !aForceApplicationClosing )
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdateMusicWidgetTextL - Publishing HS tuning: \"%S\""), &iTuningText ));        
+            iObserver->PublishTextL( this, EMusicWidgetText1, iTuningText );
+            }
+        else if ( iPresetCount && iEngine->Channel() != KErrNotFound )
+            {
+            if( iEngine->ChannelName().Length() )
+                {
+                // Station saved and name is available
+                RBuf name;
+                // For widget
+                // Preserve space for the channel name, format string and maximum index number
+                name.CreateL( iEngine->ChannelName().Length() + 
+                              iSavedStationFormat.Length() + 
+                              KDefaultRealWidth + 
+                              rightToLeftCharWidth );
+                name.CleanupClosePushL();
+                StringLoader::Format( name, iSavedStationFormat, KErrNotFound, iEngine->Channel() + 1 );
+                
+                HBufC* tempName = name.AllocL();
+                StringLoader::Format( name, *tempName, KErrNotFound, iEngine->ChannelName() );
+                delete tempName;
+                tempName = NULL;
+                
+                if ( rightToLeftCharWidth )
+                    {
+                    //E.g. 1. Name -> Name .1
+                    name.Insert( 0, KRightToLeftMark );
+                    }
+                
+                FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdateMusicWidgetTextL - Publishing Music Widget saved station: \"%S\""), &name ));
+                iObserver->PublishTextL( this, EMusicWidgetText1, name );
+                CleanupStack::PopAndDestroy(); // name
+                }
+            else
+                {
+                // Station saved, but name for it is not available
+                HBufC* frequencyString = FrequencyStringLC( iEngine->Frequency() );
+                RBuf formattedFrequency;
+                
+                // For widget
+                formattedFrequency.CreateL( iSavedStationFormatNoName.Length() + 
+                                            frequencyString->Length() + 
+                                            KDefaultRealWidth + 
+                                            rightToLeftCharWidth );
+                formattedFrequency.CleanupClosePushL();
+                StringLoader::Format( formattedFrequency, iSavedStationFormatNoName, KErrNotFound, iEngine->Channel() + 1 );
+                
+                HBufC* tempFrequency = formattedFrequency.AllocL();
+                StringLoader::Format( formattedFrequency, *tempFrequency, KErrNotFound, *frequencyString );
+                delete tempFrequency;
+                tempFrequency = NULL;
+                AknTextUtils::LanguageSpecificNumberConversion( formattedFrequency );
+
+                if ( rightToLeftCharWidth )
+                    {
+                    //E.g. 1. Name -> Name .1
+                    formattedFrequency.Insert( 0, KRightToLeftMark );
+                    }
+
+                FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdateMusicWidgetTextL - Publishing Music Widget saved station with frequency: \"%S\""), &formattedFrequency ));
+                iObserver->PublishTextL( this, EMusicWidgetText1, formattedFrequency );
+                CleanupStack::PopAndDestroy( 2 ); // formattedFrequency, frequencyString
+                }
+            }
+        else if ( iEngine->RDSProgramService().Length() > 0 )
+            {
+            FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdateMusicWidgetTextL - Publishing HS PS name: \"%S\""), &iEngine->RDSProgramService() ));
+            iObserver->PublishTextL( this, EMusicWidgetText1, iEngine->RDSProgramService() );
+            }
+        else
+            {
+            TInt currentFrequency = iEngine->Frequency();
+            // publish only valid frequency
+            if ( currentFrequency > 0 )
+                {
+                HBufC* frequencyString = FrequencyStringLC( currentFrequency );
+                
+                RBuf formattedFrequency;
+                // For widget
+                // Preserve space for the format string and maximum index number
+                formattedFrequency.CreateL( iFrequencyFormat.Length() + 
+                                            frequencyString->Length() + 
+                                            rightToLeftCharWidth );
+                formattedFrequency.CleanupClosePushL();
+                StringLoader::Format( formattedFrequency, iFrequencyFormat, KErrNotFound, *frequencyString );
+                AknTextUtils::LanguageSpecificNumberConversion( formattedFrequency );
+               
+                if ( rightToLeftCharWidth )
+                    {
+                    //E.g. 1. Name -> Name .1
+                    formattedFrequency.Insert( 0, KRightToLeftMark );
+                    }
+                
+                FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::UpdateMusicWidgetTextL - Publishing Music Widget frequency: \"%S\""), &formattedFrequency ));
+                iObserver->PublishTextL( this, EMusicWidgetText1, formattedFrequency );
+                CleanupStack::PopAndDestroy( 2 ); // formattedFrequency,frequencyString
+                }
+            else
+                {
+                // Publish empty text instead of 0.00 MHz
+                iObserver->PublishTextL( this, EMusicWidgetText1, KNullDesC );
+                }
+            }
+        }
+    }
+
+// ---------------------------------------------------------------------------
+// CFMRadioMCPPlugin::FrequencyStringLC
+// ---------------------------------------------------------------------------
+//
+HBufC* CFMRadioMCPPlugin::FrequencyStringLC( TInt aFrequency )
+    {
+    TReal frequency = static_cast<TReal>( aFrequency / static_cast<TReal>( KHzConversionFactor ));
+    TRealFormat format( KFrequencyMaxLength, iEngine->FrequencyDecimalCount() );
+    TBuf<KDefaultRealWidth> frequencyString;
+    frequencyString.Num( frequency, format );
+    
+    return frequencyString.AllocLC();
+    }
+
+void CFMRadioMCPPlugin::HandleRadioVolumeChangeL( TInt /* aVolume */ )
+    {
+    }
+
+void CFMRadioMCPPlugin::HandleTuningStateChangeL( TFMRadioPSTuningState FDEBUGVAR( aTuningState ) )
+    {
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandleTuningStateChangeL: aTuningState=[%d]"), aTuningState));
+
+    if ( iActive )
+        {
+        UpdateMusicWidgetTextL();
+        UpdateToolBarL();
+        }
+ 
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandleTuningStateChangeL - Exiting." )));    
+    }
+
+void CFMRadioMCPPlugin::HandleFrequencyChangeL( TInt FDEBUGVAR( aFrequency ) )
+    {
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandleFrequencyChangeL: aFrequency=%d"), aFrequency));
+    }
+
+void CFMRadioMCPPlugin::HandleChannelChangeL( TInt FDEBUGVAR( aId ) )
+    {
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandleChannelChangeL: aId=[%d]"), aId ));  
+    if ( iActive )
+        {
+        UpdateMusicWidgetTextL();
+        UpdateToolBarL();
+        }
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandleChannelChangeL - Exiting." ))); 
+    }
+
+void CFMRadioMCPPlugin::HandleChannelModifyL( TInt aId )
+    {
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandleChannelModifyL: aId=[%d]"), aId ));
+    if ( iActive && aId == iEngine->Channel() )
+        {
+        UpdateMusicWidgetTextL();
+        }
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandleChannelModifyL - Exiting." )));
+    }
+
+void CFMRadioMCPPlugin::HandleMuteStateChangeL( TFMRadioPSRadioMuteState aMuteState )
+    {
+    if ( iActive )
+        {
+        switch( aMuteState )
+            {
+            case EFMRadioPSMuteStateOn:
+                if ( iEngine->ApplicationRunningState() != EFMRadioPSApplicationRunning ||
+                        iEngine->AntennaStatus() == EFMRadioPSHeadsetDisconnected )
+                    {
+                    UpdatePublishedToolBarL( KFMRadioUnmuteDimmed );
+                    }
+                else
+                    {
+                    UpdatePublishedToolBarL( KFMRadioUnmute );
+                    }
+                break;
+            case EFMRadioPSMuteStateOff:
+            case EFMRadioPSMuteStateUninitialized:
+                if ( iEngine->ApplicationRunningState() != EFMRadioPSApplicationRunning ||
+                        iEngine->AntennaStatus() == EFMRadioPSHeadsetDisconnected )
+                    {
+                    UpdatePublishedToolBarL( KFMRadioMuteDimmed );
+                    }
+                 else
+                    {
+                    UpdatePublishedToolBarL( KFMRadioMute );
+                    }
+                break;
+            default:break;
+            }
+        }    
+    }
+
+void CFMRadioMCPPlugin::HandleApplicationRunningStateChangeL( TFMRadioPSApplicationRunningState aRunningState )
+    {
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandleApplicationRunningStateChangeL - aRunningState=%d"), aRunningState ));
+    
+    switch ( aRunningState )
+        {
+        case EFMRadioPSApplicationRunning:
+            break;
+        case EFMRadioPSApplicationClosing:
+            UpdateMusicWidgetTextL( ETrue );
+            UpdateToolBarL( ETrue );
+            Deactivate();
+            break;
+        default:
+            break;
+        }
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandleApplicationRunningStateChangeL - Exiting." )));
+    }
+
+void CFMRadioMCPPlugin::HandleFrequencyDecimalCountChangeL( TFMRadioPSFrequencyDecimalCount /* aDecimalCount */ )
+    {
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandleFrequencyDecimalCountChangeL." )));    
+    if ( iActive )
+        {
+        UpdateMusicWidgetTextL();
+        }
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandleFrequencyDecimalCountChangeL - Exiting." )));  
+    }
+
+void CFMRadioMCPPlugin::HandleAntennaStatusChangeL( TFMRadioPSHeadsetStatus /*aAntennaStatus*/ )
+    {
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandleAntennaStatusChangeL - Enter")));    
+    if ( iActive )
+        {
+        UpdateMusicWidgetTextL();
+        UpdateToolBarL();
+        }
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandleAntennaStatusChangeL - Exiting.")));    
+    }
+
+void CFMRadioMCPPlugin::HandlePresetListCountChangeL( TInt aPresetCount )
+    {
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandlePresetListCountChangeL(%d) - Enter"), aPresetCount));    
+    iPresetCount = aPresetCount;
+    if ( iActive )
+        {
+        if( !aPresetCount )
+            {
+            UpdateMusicWidgetTextL();
+            }
+        UpdateToolBarL();
+        }
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandlePresetListCountChangeL - Exiting.")));    
+    }
+
+void CFMRadioMCPPlugin::HandlePresetListFocusChangeL( TInt FDEBUGVAR( aPresetFocus ) )
+    {
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandlePresetListFocusChangeL - %d"), aPresetFocus ));    
+    }
+
+void CFMRadioMCPPlugin::HandleRDSProgramServiceChangeL( const TDesC& /*aProgramService*/ )
+    {
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandleRDSProgramServiceChangeL." )));    
+    if ( iActive )
+        {
+        UpdateMusicWidgetTextL();
+        }
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandleRDSProgramServiceChangeL - Exiting." )));    
+    }
+
+void CFMRadioMCPPlugin::HandleRDSRadioTextChangeL( const TDesC& /*aRdsText*/ )
+    {
+    }
+
+void CFMRadioMCPPlugin::HandleChannelNameChangeL( const TDesC& /*aName*/ )
+    {
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandleChannelNameChangeL." )));    
+    }
+
+void CFMRadioMCPPlugin::HandlePowerStateChangeL( TFMRadioPSRadioPowerState aPowerState )
+    {
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandlePowerStateChangeL(%d)."), aPowerState ));
+    if( aPowerState == EFMRadioPSRadioPowerOn )
+        {
+        ActivateL();
+        }
+    if ( iActive )
+        {
+        UpdateMusicWidgetTextL();
+        UpdateToolBarL();
+        }
+    FTRACE(FPrint(_L(" *** S60 FMRadio -- CFMRadioMCPPlugin::HandlePowerStateChangeL - Exiting." ))); 
+    }
+
+void CFMRadioMCPPlugin::InstallEmptyActionL( TMCPTriggerDestination aDestination )
+    {
+    CLiwDefaultMap* mapTrigger = CLiwDefaultMap::NewLC();
+    iObserver->PublishActionL( this, aDestination, mapTrigger );
+    CleanupStack::PopAndDestroy( mapTrigger );
+    }
+
+void CFMRadioMCPPlugin::InstallFMRadioCommandActionL( const TDesC& aCommand, TMCPTriggerDestination aDestination )
+    {
+    CLiwDefaultMap* mapTrigger = CLiwDefaultMap::NewLC();
+    CLiwDefaultMap* mapData = CLiwDefaultMap::NewLC();
+
+    mapTrigger->InsertL( KFMRadioPluginUid, TLiwVariant( TUid::Uid( KFMRadioActionHandlerImplementationUid ) ) );
+    mapData->InsertL( KType, TLiwVariant( aCommand ) );
+    mapData->InsertL( KFMRadioCommand , TLiwVariant( aCommand ) );
+    mapTrigger->InsertL( KFMRadioData, TLiwVariant( mapData ) );
+    
+    if ( iActive )
+        {
+        iObserver->PublishActionL( this, aDestination, mapTrigger );
+        }
+    
+    CleanupStack::PopAndDestroy( mapData );
+    CleanupStack::PopAndDestroy( mapTrigger );
+    }
+
+/** Provides a key-value pair table, that is used to identify the correct construction function for the requested interface. */
+const TImplementationProxy KFMRadioMCPPluginImplementationTable[] =
+    {
+    IMPLEMENTATION_PROXY_ENTRY( KFMRadioMCPPluginImplementationUid, CFMRadioMCPPlugin::NewL )
+    };
+
+const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount );
+
+// ---------------------------------------------------------------------------
+// Returns the implementations provided by this ECOM plugin DLL.
+// ---------------------------------------------------------------------------
+//
+EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
+    {
+    aTableCount = sizeof( KFMRadioMCPPluginImplementationTable ) / sizeof( TImplementationProxy );
+    return KFMRadioMCPPluginImplementationTable;
+    }
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/group/bld.inf	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,41 @@
+/*
+* 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 provides the information required for building the 
+*              whole of a FMRadio.  
+*
+*/
+
+#include <platform_paths.hrh>
+
+PRJ_PLATFORMS
+DEFAULT
+
+PRJ_EXPORTS
+// export central repository configuration files
+../conf/fmradio.confml CONFML_EXPORT_PATH(fmradio.confml, customsw)
+../conf/fmradio_2001b25e.crml CRML_EXPORT_PATH(fmradio_2001b25e.crml, customsw)
+
+// export localization source loc file
+../loc/fmradio.loc       	APP_LAYER_LOC_EXPORT_PATH(fmradio.loc)
+
+PRJ_MMPFILES
+#include "../activeidleengine/group/bld.inf"
+#include "../fmradioengine/group/bld.inf"
+#include "../fmradioactionhandler/group/bld.inf"
+#include "../fmradiomcpplugin/group/bld.inf"
+#include "../fmradio/group/bld.inf"
+//  Help exports
+#include "../help/group/bld.inf"
+//  End of File  
+
Binary file fmradio/help/data/xhtml.zip has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/help/group/bld.inf	Wed Sep 01 12:30:32 2010 +0100
@@ -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:
+* 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/radio.hlp.hrh	MW_LAYER_PLATFORM_EXPORT_PATH(csxhelp/radio.hlp.hrh)
+../rom/fmradiohelps_variant.iby		CUSTOMER_APP_LAYER_IBY_EXPORT_PATH(fmradiohelps_variant.iby)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/help/inc/radio.hlp.hrh	Wed Sep 01 12:30:32 2010 +0100
@@ -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:
+*
+*/
+	
+//
+// radio.hlp.hrh generated by CSXHelp Utilities.
+//           
+
+#ifndef __RADIO_HLP_HRH__
+#define __RADIO_HLP_HRH__
+
+_LIT(KFMRADIO_HLP_MAIN, "FMRADIO_HLP_MAIN"); // 
+_LIT(KFMRADIO_HLP_SEARCH, "FMRADIO_HLP_SEARCH"); // 
+_LIT(KFMRADIO_HLP_LIST, "FMRADIO_HLP_LIST"); // 
+
+#endif 
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/help/rom/fmradiohelps_variant.iby	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,28 @@
+/*
+* 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:  Help contents for image building
+*
+*/
+
+#ifndef __FMRADIOHELPS_VARIANT_IBY__
+#define __FMRADIOHELPS_VARIANT_IBY__
+
+#if defined(FF_S60_HELPS_IN_USE) && defined(__S60_FM_RADIO_APPLICATION)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10207A89\contents.zip, RESOURCE_FILES_DIR\xhtml\%02d\0x10207A89\contents.zip)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10207A89\index.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10207A89\index.xml)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10207A89\keywords.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10207A89\keywords.xml)
+    data=LOCALISE(DATAZ_\resource\xhtml\%02d\0x10207A89\meta.xml, RESOURCE_FILES_DIR\xhtml\%02d\0x10207A89\meta.xml)
+#endif
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/inc/fmradioactiveidle.hrh	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,28 @@
+/*
+* 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 idle definitions
+*
+*/
+
+
+#ifndef FMRADIOACTIVEIDLE_HRH
+#define FMRADIOACTIVEIDLE_HRH
+
+// Ecom DLL UID for FMRadio Active Idle plugin.
+#define AI_UID_ECOM_DLL_CONTENTPUBLISHER_FMRADIOPLUGIN 0x20010140
+
+// Ecom implementation UID for FMRadio Active Idle plugin.
+#define AI_UID_ECOM_IMPLEMENTATION_CONTENTPUBLISHER_FMRADIOPLUGIN 0x20010141
+
+#endif // FMRADIOACTIVEIDLE_HRH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/inc/fmradiovariant.hrh	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,38 @@
+/*
+* Copyright (c) 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:  Local variation flags for OMA Provisioning
+*
+*/
+
+
+#ifndef FMRADIOVARIANT_HRH
+#define FMRADIOVARIANT_HRH
+
+/**
+* Local variation flags for FM Radio
+*/
+
+// flag to determine whether an internnal antenna is supported
+#define KFMRadioInternalAntennaSupported    0x02
+
+#ifdef ASW_CORE_AUDIO_PLATFORM_VERSION // Nokia specific adaptation.
+
+#define __FMRADIO_ADVANCED_AUTO_RESUME
+
+#endif // ASW_CORE_AUDIO_PLATFORM_VERSION
+
+
+#endif // FMRADIOVARIANT_HRH
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/loc/fmradio.loc	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,679 @@
+/*
+* Copyright (c) 2006-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 a localisation file for FMRadio
+*/
+
+
+// Application titles
+//
+
+// d: Application title from list.
+// l: list_single_large_graphic_pane_t1
+//
+#define qtn_fmradio_app_menu_list       "FM Radio"
+
+// d: Application title from grid.
+// l: cell_app_pane_t1
+//
+#define qtn_fmradio_app_menu_grid       "FM Radio"
+
+// d: Main view title
+// l: title_pane_t2/opt9
+//
+#define qtn_fmradio_title			"FM Radio"
+
+// d: Stations view title
+// l: title_pane_t2/opt9
+//
+#define qtn_fmradio_stations_title	"Stations"
+
+// d: Search stations view title
+// l: title_pane_t2/opt9
+//
+#define qtn_fmradio_search_stations_title	"Search stations"
+
+// Menu items
+//
+
+// d: Option list item in the Main view.
+// d: Opens Nokia Music Store when it is the only store available.
+// l: list_single_pane_t1_cp2
+//
+#define qtn_fmradio_options_music_store "Go to Music Store"
+
+// d: Option list item in the Main view.
+// d: Opens a submenu with Nokia Music Store and other additional stores
+// l: list_single_pane_t1_cp2/opt3
+//
+#define qtn_fmradio_options_music_store_submenu "Go to Music Store"
+
+// d: Option list submenu item in the Main view for Go to Music Store.
+// d: For enabling access to Nokia Music Store when there are
+// d: also other music stores (e.g. operator music store) available.
+// l: list_single_popup_submenu_pane_t1
+//
+#define qtn_fmradio_options_nokia_music_store "Nokia Music Store"	
+
+// d: Option list item in the Main view.
+// d: Opens Web address.
+// l: list_single_pane_t1_cp2
+//
+#define qtn_fmradio_options_web_address "Go to Web address"
+
+// d: Option list item in the Main view.
+// d: Opens Stations view.
+// l: list_single_pane_t1_cp2
+//
+#define qtn_fmradio_options_stations	"Stations"
+
+// d: Option list item in Main and Search stations views.
+// d: Saves a single station.
+// l: list_single_pane_t1_cp2
+//
+#define qtn_fmradio_options_save		"Save"
+
+// d: Option list item in Main and Stations views.
+// d: Renames currently selected station.
+// l: list_single_pane_t1_cp2
+//
+#define qtn_fmradio_options_rename        "Rename"
+
+// d: General menu string, in all views.
+// d: Activates the IHF-speaker 
+// l: list_single_pane_t1_cp2
+//
+#define qtn_fmradio_options_activate   "Activate loudspeaker"
+
+// d: General menu string, in all views.
+// d: Deactivate the IHF-speaker. 
+// l: list_single_pane_t1_cp2
+//
+#define qtn_fmradio_options_deactivate  "Deactivate loudspeaker"
+
+// d: Option list item in the Main view for Alternative frequency (AF) setting. 
+// d: Opens the submenu for AF setting.
+// l: list_single_pane_t1_cp2/opt3
+//
+#define qtn_fmradio_options_alternative_freq	"Alternative frequency"
+
+// d: Option list submenu item in the Main view for Alternative frequency.
+// d: For setting alternative frequency on.
+// l: list_single_popup_submenu_pane_t1/opt1
+//
+#define qtn_fmradio_options_on			"On"
+
+// d: Option list submenu item in the Main view for Alternative frequency.
+// d: For setting alternative frequency off.
+// l: list_single_popup_submenu_pane_t1/opt1
+//
+#define qtn_fmradio_options_off			"Off"
+
+// d: Option list item in the Stations view.
+// d: Deletes focused station.
+// l: list_single_pane_t1_cp2
+//
+#define qtn_fmradio_options_delete		"Delete"
+
+// d: Option list item in the Stations view.
+// d: Opens Search stations view.
+// l: list_single_pane_t1_cp2
+//
+#define qtn_fmradio_options_search_stations	"Search stations"
+
+// d: Option list item in the Stations view.
+// d: Opens dialog for manual tuning.
+// l: list_single_pane_t1_cp2
+//
+#define qtn_fmradio_options_tune_manually		"Tune manually"
+
+// d: Option list item in the Search stations view. 
+// d: Saves all found stations and returns to Stations view.
+// l: list_single_pane_t1_cp2
+//
+#define qtn_fmradio_options_save_all	"Save all"
+
+
+
+// Data queries
+//
+
+// d: Data query heading.
+// d: Query for entering a new name for saved station.
+// l: popup_query_data_window_t3/opt2
+//
+#define qtn_fmradio_query_rename           "New name:"
+
+// d: Data query heading
+// d: Query for setting a frequency manually. 
+// l: heading_pane_t1
+//
+#define qtn_fmradio_query_frequency	 "Frequency (MHz):"
+
+
+
+// List queries
+//
+
+// d: List query heading for region selection.
+// d: Opened if no network coverage, when the application is started for the first time.
+// l: heading_pane_t1
+//
+#define qtn_fmradio_popup_head_select_reg            "Select region:"
+
+// d: List query item for region selection.
+// l: list_single_pane_t1_cp2
+//
+#define qtn_fmradio_reg_japan                        "Japan"
+
+// d: List query item for region selection.
+// l: list_single_pane_t1_cp2
+//
+#define qtn_fmradio_reg_america                      "America"
+
+// d: List query item for region selection.
+// l: list_single_pane_t1_cp2
+//
+#define qtn_fmradio_reg_other                        "Other"
+
+// d: List query heading for how the user wants the stations to be saved.
+// d: If the station list already contains saved channel(s).
+// l: heading_pane_t1
+//
+#define qtn_fmradio_list_query_save_all              "Save all:"
+
+// d: List query item for save all selection.
+// d: Appends the new stations to the end of the list.
+// l: list_single_pane_t1_cp2
+//
+#define qtn_fmradio_list_query_append                "Append to the Stations list"
+
+// d: List query item for save all and station list full -selections.
+// d: Replaces all existing stations with the new ones on the list.
+// l: list_single_pane_t1_cp2
+//
+#define qtn_fmradio_list_query_replace_all           "Replace existing stations"
+
+// d: List query heading for how the user wants the stations to be saved,
+// d: when the stations to be saved do not fit on the stations list.
+// l: heading_pane_t1
+//
+#define qtn_fmradio_list_query_list_full             "Station list full:"
+
+// d: List query item for station list full related saving.
+// d: Appends only the new stations that fits to the end of the list.
+// l: list_single_pane_t1_cp2
+//
+#define qtn_fmradio_list_query_all_fits              "Append all that fits"
+
+
+
+// Confirmation queries
+//
+
+// d: Confirmation query for the Main view. 
+// d: Displayed when the user is about to change to Stations view and current frequency is not saved.
+// l: popup_note_window
+//
+#define qtn_fmradio_query_save_current		"Current station is not saved. Save now?"
+
+// d: Confirmation query for the Stations view.
+// d: Displayed when the user is about to delete a station from the list.
+// d: %U is the name of the station, max length 20 characters.
+// l: popup_note_window
+//
+#define qtn_fmradio_query_delete      "Delete %U?"
+
+// d: Confirmation query
+// d: Displayed when the user is about to delete a station from the list.
+// d: %U is the frequency of the saved station. max length 6 characters.
+// l: popup_note_window
+//
+#define qtn_fmradio_query_delete_mhz  "Delete %U MHz?"
+
+// d: Confirmation query
+// d: Displayed when radio is started in off-line mode.
+// l: popup_note_window
+//
+#define qtn_fmradio_query_offline_activate	"Activate Radio in off-line mode?"
+
+// d: Confirmation query 
+// d: Displayed if the off-line mode is activated while the Radio is on.
+// l: popup_note_window
+//
+#define qtn_fmradio_query_offline_use	"Continue using the Radio in off-line mode?"
+
+// d: Confirmation query 
+// d: Displayed when the RT+ feature is enabled for the first time.
+// l: popup_note_window
+//
+#define qtn_fmradio_query_rtplus_enabled "’+’ mark got enabled. When this happens, additional services like Music Store are available in the Options menu."
+
+// d: Confirmation query 
+// d: Shown if the 3.5mm analog audio accessory required as antenna is not connected
+// l: popup_note_window
+//
+#define qtn_fmradio_error_con_headset     "Please connect your wired headset with the phone’s 3.5mm connector"
+
+// d: Confirmation query 
+// d: Replaces all existing stations with the new ones on the list.
+// l: popup_note_window
+//
+#define qtn_fmradio_query_replace_all     "Replace existing stations?"
+
+// Information notes
+//
+
+// d: Information note for a start-up wizard.
+// d: No stations found with the First time usage wizard.
+// l: popup_note_window
+//
+#define qtn_fmradio_no_stations_found	"No stations found"
+
+// d: Information note for radio roaming.
+// d: Displayed after the frquency band has been set.
+// l: popup_note_window
+//
+#define qtn_fmradio_conf_freq_band_set_autom	"Local frequency band automatically set for radio"
+
+// d: Information note for radio roaming.
+// d: Displayed after the user has selected the region.
+// l: popup_note_window
+// 
+#define qtn_fmradio_conf_freq_band_set_manual		"Frequency band set for radio according to region."
+
+// d: Information note for the Search stations view.
+// d: Displayed when Save all is selected from Search stations view.
+// d: %N is the amount of saved stations, max value 100.
+// l: popup_note_window
+//
+#define qtn_fmradio_saving_done	"%N stations saved to the Stations list."
+
+// d: Information note for the Search stations view.
+// d: Displayed when one station with a name is saved in Search stations view.
+// d: %U is the name of the saved station, max length 20 characters.
+// l: popup_note_window
+//
+#define qtn_fmradio_saving_done_one	"%U saved to the Stations list."
+
+// d: Information note for the Search stations view.
+// d: Displayed when one station without a name is saved in Search stations view.
+// d: %U is the frequency of the saved station, max length 6 characters.
+// l: popup_note_window
+//
+#define qtn_fmradio_saving_done_one_no_name	"'%U MHz' saved to the Stations list."
+
+// d: Information note when Fm Transmitter is launched when FM Radio is on, FM Radio gets closed
+// l: popup_note_window
+//
+#define qtn_fmradio_note_fmtx_close_application 	"FM Radio cannot be used when the FM transmitter is on. FM Radio is closed."
+
+// d: Information note when Fm Radio is tried to be launched when FM Transmitter is on. FM Radio is not launched.
+// l: popup_note_window
+//
+#define qtn_fmradio_note_fmtx_unable_to_start 	"FM Radio cannot be started when FM transmitter is on."
+
+
+
+// Wait notes
+//
+
+// d: Wait note 
+// d: Search stations view station list fill ongoing
+// d: List fill ongoing on the background, so this note shown as small as possible.
+// l: popup_note_wait_window/opt3
+//
+#define qtn_fmradio_wait_note_scanning                "Scanning..."
+
+
+
+// Main view
+//
+
+// d: Custom RDS indicator displayed on the Media Idle (Main pane).
+// l: fmrd2_indi_pane_t3
+//
+#define qtn_fmradio_rds		"RDS"
+
+// d: Custom AF indicator displayed on the Media Idle (Main pane).
+// l: fmrd2_indi_pane_t2
+//
+#define qtn_fmradio_af		"AF"
+
+// d: Custom RT+ indicator displayed on the Media Idle (Main pane).
+// d: Enabled, if Music Store and/or Web address access are available via
+// d: RT+ information that radio Station is possibly sending 
+// l: fmrd2_indi_pane_t1
+//
+#define qtn_fmradio_rtplus "+"
+
+// d: String shown on the Media Idle (Main pane).
+// d: %U is the station frequency. Shown with one or two decimals, depending on region.
+// d: Max length for %U is 6 characters.
+// l: None
+//
+#define qtn_fmradio_media_idle_freq "%U MHz"
+
+// d: String shown on the main pane.
+// d: %U is the station frequency. Shown with one or two decimals, depending on region.
+// d: Max length for %U is 6 characters.
+// l: area_fmrd2_info_pane_t2
+//
+#define qtn_fmradio_freq    	"%U MHz"
+
+// d: String shown on the main pane.
+// d: %N is the station memory location and %U is the frequency.
+// d: Memory location number max value is 100.
+// d: Frequency is shown with one or two decimals, max length 6 characters.
+// d: there should be two spaces between %N. and %U. "%N.  %U MHz" 
+// l: area_fmrd2_info_pane_t1
+//
+#define qtn_fmradio_mem_location_freq    "%N.  %U MHz"
+
+// d: String shown on the main pane.
+// d: %N is the station memory location and %U is station name.
+// d: Memory location number max value is 100.
+// d: Station name max length 20 characters.
+// l: area_fmrd2_info_pane_t1
+//
+#define qtn_fmradio_mem_location_name 	"%N. %U"
+
+// d: String shown on the main pane.
+// d: Tuning animation text.
+// l: area_fmrd2_info_pane_t4
+//
+#define qtn_fmradio_scanning	"Tuning"
+
+// d: String shown on the main pane.
+// d: When next/prev button is short pressed and no stations stored, this is displayed on place of the station information.
+// l: popup_note_window
+//
+#define qtn_fmradio_use_long_tap		"No stations saved. You can tune stations by long pressing the previous and next buttons."
+
+
+
+// Stations view
+//
+
+// d: String shown on the stations list 1nd row.
+// d: %U is the frequency of the saved station.
+// d: Frequency is shown with one or two decimals, max length 6 characters.
+// d: Frequency shown on the 1st row, when a station has no saved name.
+// l: list_double_number_pane_t2
+//
+#define qtn_fmradio_double1_freq	"%U MHz"
+
+// d: String shown on the stations list 2nd row.
+// d: %U is the frequency of the saved station, max length 6 characters.
+// d: Frequency is shown with one or two decimals.
+// d: Frequency shown on the 2nd row, when a station has a name.
+// l: list_double_number_pane_t3
+//
+#define qtn_fmradio_double2_freq	"%U MHz"
+
+// d: String shown on the empty stations list.
+// l: main_list_empty_pane
+//
+#define qtn_fmradio_list_no_stations	"No saved stations. You can search stations via Options->Search stations"
+
+
+
+// Search Stations view
+//
+
+// d: String shown on the search stations list row.
+// d: %U is the frequency of the saved station.
+// d: Frequency is shown with one or two decimals, max length 6 characters.
+// d: When a found station has not (yet) a name available.
+// l: list_single_pane_t1
+//
+#define qtn_fmradio_single_freq			"%U MHz"
+
+// d: String shown on the search stations list row.
+// d: %0U is the frequency of the saved station and %1U is the station PSNAME.
+// d: Frequency is shown with one or two decimals, max length 6 characters.
+// d: Station name max length 20 characters.
+// l: list_single_pane_t1
+//
+#define qtn_fmradio_single_freq_name		"%0U MHz %1U"
+
+// d: String shown on the empty search stations list.
+// l: main_list_empty_pane
+//
+#define qtn_fmradio_list_no_stations_found	"(No stations found)"
+
+
+
+// Homescreen Widget
+//
+
+// d: String shown on the Homescreen Widget.
+// d: Shown when the application is tuning for a station.
+// l: hscr_music_header_text
+//
+#define qtn_fmradio_widget_tuning	"Tuning..."
+
+// d: String shown on the Homescreen Widget.
+// d: Shown if the 3.5mm analog audio accessory required as antenna is not connected
+// l: hscr_music_header_text
+//
+#define qtn_fmradio_widget_con_headset     "Connect wired headset with 3.5mm connector"
+
+// d: String shown on the Homescreen Widget.
+// d: Currently active channel index and name 
+// d: separated by a dot.
+// d: Index number max value is 100.
+// d: Station name max length 20 characters.
+// l: hscr_music_header_text
+//
+#define qtn_fmradio_widget_station_saved	"%N. %U"
+
+// d: String shown on the Homescreen Widget.
+// d: Currently active channel index and frequency
+// d: separated by a dot.
+// d: Index number max value is 100.
+// d: Frequency is shown with one or two decimals, max length 6 characters.
+// l: hscr_music_header_text
+//
+#define qtn_fmradio_widget_station_saved_freq	"%N. %U MHz"
+
+// d: String shown on the Homescreen Widget.
+// d: Displays currently active channel frequency.
+// d: Frequency is shown with one or two decimals, max length 6 characters.
+// l: hscr_music_header_text
+//
+#define qtn_fmradio_widget_notsaved_frequency	"%U MHz"
+
+
+
+// Music Suite
+//
+
+// d: The title for the most recently played radio station.
+// d: First row of Music Suite Now Playing item.
+// d: This is when the FM Radio has been the last application
+// d: to control the audio in Music Suite. 
+// l: aalist_double_graphic_pane_t1
+//
+#define qtn_fmradio_suite_last_played "Last Played" 
+
+
+// d: The title for the currently playing radio station.
+// d: First row of Music Suite Now Playing item. 
+// d: This is when FM Radio controls the audio in Music SUite.
+// l: aalist_double_graphic_pane_t1
+//
+#define qtn_fmradio_suite_now_playing "Now Playing"
+
+// d: Second row of Music Suite Now Playing item.
+// d: Currently active channel index and name 
+// d: separated by a dot.
+// d: Index number max value is 100.
+// d: Station name max length 20 characters.
+// l: list_logical_template_3_detail
+//
+#define qtn_fmradio_suite_playing_saved_with_name	"%N. %U"
+
+// d: Second row of Music Suite Now Playing item.
+// d: Currently active channel index and frequency 
+// d: separated by a dot.
+// d: Index number max value is 100.
+// d: Frequency is shown with one or two decimals, max length 6 characters.
+// l: list_logical_template_3_detail
+//
+#define qtn_fmradio_suite_playing_saved_without_name	"%N. %U MHz"
+
+// d: Second row of Music Suite Now Playing item.
+// d: Currently active channel frequency. 
+// d: Frequency is shown with one or two decimals, max length 6 characters.
+// l: list_logical_template_3_detail
+//
+#define qtn_fmradio_suite_playing_not_saved	"%U MHz"
+
+
+
+// Toolbar tooltips
+// 
+
+// d: Main view tooltip text.
+// l: popup_preview_text_window_t1
+//
+#define qtn_fmradio_tooltip_stations	"Stations"
+
+// d: Stations view tooltip text.
+// l: popup_preview_text_window_t1
+//
+#define qtn_fmradio_tooltip_search_stations "Search stations"
+
+// d: Stations view tooltip text.
+// l: popup_preview_text_window_t1
+//
+#define qtn_fmradio_tooltip_save_all	"Save all"
+
+// d: Stations view tooltip text.
+// l: popup_preview_text_window_t1
+//
+#define qtn_fmradio_tooltip_activate_loudspeaker    "Activate loudspeaker"
+
+// d: Stations view tooltip text.
+// l: popup_preview_text_window_t1
+//
+#define qtn_fmradio_tooltip_deactivate_loudspeaker    "Deactivate loudspeaker"
+
+// d: Stations view tooltip text.
+// l: popup_preview_text_window_t1
+//
+#define qtn_fmradio_tooltip_tune_manually    "Tune manually"
+
+// d: main view toolbar extension tooltip
+// l: popup_preview_text_window_t1
+//
+#define qtn_fmradio_tooltip_delete  "Delete channel"
+
+// d: main view toolbar extension tooltip
+// l: popup_preview_text_window_t1
+//
+#define qtn_fmradio_tooltip_save        "Save channel"
+
+// d: main view toolbar extension tooltip
+// l: popup_preview_text_window_t1
+//
+#define qtn_fmradio_tooltip_rename  "Rename channel"
+
+// d: main view toolbar extension tooltip
+// l: popup_preview_text_window_t1
+//
+#define qtn_fmradio_tooltip_web "Go to web adress"
+
+// d: main view toolbar extension tooltip
+// l: popup_preview_text_window_t1
+//
+#define qtn_fmradio_tooltip_nokia_music_store "Ovi Music"
+
+// d: main view toolbar extension tooltip
+// d: extension menu button
+// l: popup_preview_text_window_t1
+//
+#define qtn_fmradio_tooltip_extension "Expand Toolbar"
+
+// d: main view toolbar extension tooltip
+// l: popup_preview_text_window_t1
+//
+#define qtn_fmradio_tooltip_recognise_song "Recognise song"
+
+// d: main view toolbar extension tooltip
+// l: popup_preview_text_window_t1
+//
+#define qtn_fmradio_tooltip_operator_music_store "Music Store"
+
+// Toolbar extension
+//
+
+// d: main view toolbar extension command text
+// l: cell_tb_ext_pane_t1/opt1
+//
+#define qtn_tbextension_delete "Delete"
+
+// d: main view toolbar extension command text
+// l: cell_tb_ext_pane_t1/opt1
+//
+#define qtn_tbextension_save   "Save"
+
+// d: main view toolbar extension command text
+// l: cell_tb_ext_pane_t1/opt1
+//
+#define qtn_tbextension_list_view "Stations"
+
+// d: main view toolbar extension command text
+// l: cell_tb_ext_pane_t1/opt1
+//
+#define qtn_tbextension_rename "Rename"
+
+// d: main view toolbar extension command text
+// l: cell_tb_ext_pane_t1/opt1
+//
+#define qtn_tbextension_station_web "Station’s web"
+
+// d: main view toolbar extension command text
+// l: cell_tb_ext_pane_t1/opt1
+//
+#define qtn_tbextension_ovi_music "Ovi Music Store"
+
+// d: main view toolbar extension command text
+// l: cell_tb_ext_pane_t1/opt1
+//
+#define qtn_tbextension_operator_music "Music Store"
+
+// d: main view toolbar extension command text
+// l: cell_tb_ext_pane_t1/opt1
+//
+#define qtn_tbextension_activate_loudspeaker "Activate loudspeaker"
+
+// d: main view toolbar extension command text
+// l: cell_tb_ext_pane_t1/opt1
+//
+#define qtn_tbextension_deactivate_loudspeaker "Deactivate loudspeaker"
+
+// d: main view toolbar extension command text
+// l: cell_tb_ext_pane_t1/opt1
+//
+#define qtn_tbextension_recognise_song "Recognise song"
+
+// Stylus popup menu items
+
+// d: Stations view stylus menu text
+// l: list_single_pane_t1_cp2
+//
+#define qtn_fmradio_move                "Move"
+
+// End of File
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/sis/fmradio_cenrep_updated/fmradiocenrep.pkg	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,32 @@
+;
+; 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: FMRadio packet file with central repository
+;
+
+;Languages
+&EN
+
+;packet-header (name, uid, major, minor, build, type)
+#{"FMRadio Cenrep File"},(0x10202BE9),3,0,0,TYPE=SP
+
+; Localised vendor name
+%{"Symbian"}
+
+; Unique Vendor name
+:"Symbian"
+
+; FM Radio Central Repository File
+"..\..\fmradioengine\cenrep\2001B25E.cre" - "c:\private\10202be9\2001B25E.cre"
+
+; NOTE: 2001B25E.cre is the binary version of 2001B25E.txt
\ No newline at end of file
Binary file fmradio/sis/fmradio_cenrep_updated/fmradiocenrep.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/sis/fmradio_cenrep_updated/package.pkg	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,50 @@
+;
+; 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: FMRadio packet file with central repository
+;
+
+;Languages
+&EN
+
+;packet-header (name, uid, major, minor, build, type)
+#{"FMRadio"},(0x10207A89),3,0,0,TYPE=SA,RU
+
+; Localised vendor name
+%{"Symbian"}
+
+; Unique Vendor name
+:"Symbian"
+
+; EXE/DLL
+"\epoc32\release\armv5\urel\fmradio.exe"                            -"!:\sys\bin\fmradio.exe"
+"\epoc32\release\armv5\urel\fmradioengine.dll"                      -"!:\sys\bin\fmradioengine.dll"
+"\epoc32\release\armv5\urel\fmradioactiveidleengine200.dll"         -"!:\sys\bin\fmradioactiveidleengine200.dll"
+"\epoc32\release\armv5\urel\fmradiomcpplugin100.dll"                -"!:\sys\bin\fmradiomcpplugin100.dll"
+"\epoc32\release\armv5\urel\fmradioactionhandler.dll"               -"!:\sys\bin\fmradioactionhandler.dll"
+
+; Resources
+"\epoc32\data\z\private\10003a3f\import\apps\fmradio_reg.rsc"       -"!:\private\10003a3f\import\apps\fmradio_reg.rsc"
+"\epoc32\data\Z\resource\apps\fmradio.rsc"                          -"!:\resource\apps\fmradio.rsc"
+"\epoc32\data\Z\resource\fmradioengine.rsc"                         -"!:\resource\fmradioengine.rsc"
+"\epoc32\data\Z\resource\fmradiomcpplugin.rsc"                      -"!:\resource\fmradiomcpplugin.rsc" 
+"\epoc32\data\Z\resource\plugins\fmradiomcpplugin100.rsc"           -"!:\resource\plugins\fmradiomcpplugin100.rsc"
+"\epoc32\data\Z\resource\plugins\fmradioactionhandler.rsc"          -"!:\resource\plugins\fmradioactionhandler.rsc"
+
+
+; Other files
+"\epoc32\data\Z\resource\apps\fmradio_aif.mif"                      -"!:\resource\apps\fmradio_aif.mif"
+"\epoc32\data\Z\resource\apps\fmradio.mif"                          -"!:\resource\apps\fmradio.mif"
+
+; Cenrep update
+@"fmradiocenrep.sis", (0x10202BE9)
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/sis/fmradio_default/package.pkg	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,46 @@
+;
+; 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: FMRadio packet file
+;
+
+;Languages
+&EN
+
+;packet-header (name, uid, major, minor, build, type)
+#{"FMRadio"},(0x10207A89),3,0,0,TYPE=SA,RU
+
+; Localised vendor name
+%{"Symbian"}
+
+; Unique Vendor name
+:"Symbian"
+
+; EXE/DLL
+"\epoc32\release\armv5\urel\fmradio.exe"                            -"!:\sys\bin\fmradio.exe"
+"\epoc32\release\armv5\urel\fmradioengine.dll"                      -"!:\sys\bin\fmradioengine.dll"
+"\epoc32\release\armv5\urel\fmradioactiveidleengine200.dll"         -"!:\sys\bin\fmradioactiveidleengine200.dll"
+"\epoc32\release\armv5\urel\fmradiomcpplugin100.dll"                -"!:\sys\bin\fmradiomcpplugin100.dll"
+"\epoc32\release\armv5\urel\fmradioactionhandler.dll"               -"!:\sys\bin\fmradioactionhandler.dll"
+
+; Resources
+"\epoc32\data\z\private\10003a3f\import\apps\fmradio_reg.rsc"       -"!:\private\10003a3f\import\apps\fmradio_reg.rsc"
+"\epoc32\data\Z\resource\apps\fmradio.rsc"                          -"!:\resource\apps\fmradio.rsc"
+"\epoc32\data\Z\resource\fmradioengine.rsc"                         -"!:\resource\fmradioengine.rsc"
+"\epoc32\data\Z\resource\fmradiomcpplugin.rsc"                      -"!:\resource\fmradiomcpplugin.rsc"	
+"\epoc32\data\Z\resource\plugins\fmradiomcpplugin100.rsc"           -"!:\resource\plugins\fmradiomcpplugin100.rsc"
+"\epoc32\data\Z\resource\plugins\fmradioactionhandler.rsc"          -"!:\resource\plugins\fmradioactionhandler.rsc"
+
+; Other files
+"\epoc32\data\Z\resource\apps\fmradio_aif.mif"                      -"!:\resource\apps\fmradio_aif.mif"
+"\epoc32\data\Z\resource\apps\fmradio.mif"                          -"!:\resource\apps\fmradio.mif"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/sis/fmradio_default/stub.pkg	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,46 @@
+;
+; 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: FMRadio packet file
+;
+
+;Languages
+&EN
+
+;packet-header (name, uid, major, minor, build, type)
+#{"FMRadio"},(0x10207A89),4,0,0,TYPE=SA
+
+; Localised vendor name
+%{"Symbian"}
+
+; Unique Vendor name
+:"Symbian"
+
+; EXE/DLL
+""-"z:\sys\bin\fmradio.exe"
+""-"z:\sys\bin\fmradioengine.dll"
+""-"z:\sys\bin\fmradioactiveidleengine200.dll"
+""-"z:\sys\bin\fmradiomcpplugin100.dll"
+""-"z:\sys\bin\fmradioactionhandler.dll"
+
+; Resources
+""-"z:\private\10003a3f\import\apps\fmradio_reg.r*"
+""-"z:\resource\apps\fmradio.r*"
+""-"z:\resource\fmradioengine.r*"
+""-"z:\resource\fmradiomcpplugin.r*"
+""-"z:\resource\plugins\fmradiomcpplugin100.rsc"
+""-"z:\resource\plugins\fmradioactionhandler.rsc"
+
+; Other files
+""-"z:\resource\apps\fmradio_aif.mif"
+""-"z:\resource\apps\fmradio.mif"
\ No newline at end of file
Binary file fmradio/sis/fmradio_default/stub.sis has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fmradio/sis/fmradio_iad_update_test/package.pkg	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,46 @@
+;
+; 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: FMRadio packet file
+;
+
+;Languages
+&EN
+
+;packet-header (name, uid, major, minor, build, type)
+#{"FMRadio"},(0x10207A89),3,9,9,TYPE=SA,RU
+
+; Localised vendor name
+%{"Symbian"}
+
+; Unique Vendor name
+:"Symbian"
+
+; EXE/DLL
+"\epoc32\release\armv5\udeb\fmradio.exe"                            -"!:\sys\bin\fmradio.exe"
+"\epoc32\release\armv5\udeb\fmradioengine.dll"                      -"!:\sys\bin\fmradioengine.dll"
+"\epoc32\release\armv5\udeb\fmradioactiveidleengine200.dll"         -"!:\sys\bin\fmradioactiveidleengine200.dll"
+"\epoc32\release\armv5\udeb\fmradiomcpplugin100.dll"                -"!:\sys\bin\fmradiomcpplugin100.dll"
+"\epoc32\release\armv5\udeb\fmradioactionhandler.dll"               -"!:\sys\bin\fmradioactionhandler.dll"
+
+; Resources
+"\epoc32\data\z\private\10003a3f\import\apps\fmradio_reg.rsc"       -"!:\private\10003a3f\import\apps\fmradio_reg.rsc"
+"\epoc32\data\Z\resource\apps\fmradio.rsc"                          -"!:\resource\apps\fmradio.rsc"
+"\epoc32\data\Z\resource\fmradioengine.rsc"                         -"!:\resource\fmradioengine.rsc"
+"\epoc32\data\Z\resource\fmradiomcpplugin.rsc"                      -"!:\resource\fmradiomcpplugin.rsc"	
+"\epoc32\data\Z\resource\plugins\fmradiomcpplugin100.rsc"           -"!:\resource\plugins\fmradiomcpplugin100.rsc"
+"\epoc32\data\Z\resource\plugins\fmradioactionhandler.rsc"          -"!:\resource\plugins\fmradioactionhandler.rsc"
+
+; Other files
+"\epoc32\data\Z\resource\apps\fmradio_aif.mif"                      -"!:\resource\apps\fmradio_aif.mif"
+"\epoc32\data\Z\resource\apps\fmradio.mif"                          -"!:\resource\apps\fmradio.mif"
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/group/bld.inf	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,19 @@
+/*
+* 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 "../fmradio/group/bld.inf"
--- a/layers.sysdef.xml	Tue Aug 31 15:15:02 2010 +0300
+++ b/layers.sysdef.xml	Wed Sep 01 12:30:32 2010 +0100
@@ -1,13 +1,13 @@
 <?xml version="1.0"?>
-<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_5_1.dtd" [
+<!DOCTYPE SystemDefinition SYSTEM "sysdef_1_4_0.dtd" [
   <!ENTITY layer_real_source_path "sf/app/radio" >
 ]>
 
-<SystemDefinition name="radio" schema="1.5.1">
+<SystemDefinition name="radio" schema="1.4.0">
   <systemModel>
     <layer name="app_layer">
       <module name="radio">
-        <unit unitID="vado.radio" mrp="" bldFile="&layer_real_source_path;" name="radio" proFile="radio.pro" qmakeArgs="-r" />        
+        <unit unitID="vado.radio" mrp="" bldFile="&layer_real_source_path;/group" name="radio" />
       </module>
     </layer>
   </systemModel>
--- a/radio.pro	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +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:
-#
-
-TEMPLATE = subdirs
-CONFIG += ordered
-
-symbian: {
-    BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"radioengine/group/bld.inf\""
-    SUBDIRS += radioapp
-    SUBDIRS += radiohswidget
-}
\ No newline at end of file
Binary file radioapp/bin/fmradio_en_US.qm has changed
--- a/radioapp/buildflags.pri	Tue Aug 31 15:15:02 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:
-#
-
-
-# ##########################################################
-# Start of Flag definitions
-# Add or remove comments to disable or enable the features
-# ##########################################################
-
-# Use of some debugging controls that are not part of official UI spec
-# RADIOFLAGS += USE_DEBUGGING_CONTROLS
-
-# Flag to use dummy radio data read from XML file
-# RADIOFLAGS += USE_DUMMY_RADIO_DATA
-
-# Flag to initialize radio stations with dummy rt
-# RADIOFLAGS += INIT_STATIONS_WITH_DUMMY_RT
-
-# Functional testing
-# RADIOFLAGS += SHOW_CALLSIGN_IN_ANY_REGION
-
-# Build flag to add EXPORTUNFROZEN to the pro file
-# RADIOFLAGS += USE_UNFROZEN_EXPORTS
-
-# Enables the assert macros
-# RADIOFLAGS += ENABLE_ASSERTS
-
-# ##########################################################
-# Start of Logging flag definitions
-# ##########################################################
-
-# Full logging flag that enables the full logging including also timestamps
-# Enabled by default in debug builds
-# CONFIG(debug, debug|release) : LOGGING_FLAGS += LOGGING_ENABLED
-
-# Uncomment to enable full logging in release builds
-LOGGING_FLAGS *= LOGGING_ENABLED
-
-# Timestamp logging flag that enables only timestamp logging
-# LOGGING_FLAGS += TIMESTAMP_LOGGING_ENABLED
-
-# Combines Ui and Engine logs by feeding UI traces to the engine logger
-LOGGING_FLAGS += COMBINE_WITH_ENGINE_LOGGER
-
-# Logging level
-# 1 - Normal level
-# 2 - More verbose level
-# 3 - Most verbose level
-LOGGING_FLAGS += LOGGING_LEVEL=1
-
-# Select which radio component is being logged
-# 1 - Radio application
-# 2 - Radio homescreen widget
-LOGGING_FLAGS += LOGGED_COMPONENT=1
-
-contains(LOGGING_FLAGS, TIMESTAMP_LOGGING_ENABLED)|contains(LOGGING_FLAGS, LOGGING_ENABLED) {
-
-    # Writes debug prints to file if enabled
-    #LOGGING_FLAGS += TRACE_TO_FILE
-
-    # Settings for the log file name
-    symbian:contains(LOGGING_FLAGS, TRACE_TO_FILE) {
-        LOGGING_FLAGS += \"TRACE_OUTPUT_FILE=\\\"c:/logs/radio/fmradioui.txt\\\"\"
-        LOGGING_FLAGS += FILTER_BY_LOGMARKER=true
-    }
-}
-
-# Method for testing signal-slot connections
-# 1 - Log failed connection
-# 2 - Log failed connection and halt debugger
-LOGGING_FLAGS += CONNECT_TEST_MODE=2
-
-win32: {
-    LOGGING_FLAGS *= LOGGING_ENABLED    # Logging is always enabled in Win32 environment
-    RADIOFLAGS += VID_DEFAULT=0
-}
-
-DEFINES += $$LOGGING_FLAGS
-
-# ##########################################################
-# End of Flag definitions
-# ##########################################################
-
-# Copy all radio flags to defines to define them as preprocessor macros
-DEFINES += $$RADIOFLAGS
-CONFIG += $$RADIOFLAGS
-CONFIG += $$LOGGING_FLAGS
-
-symbian: {
-    DEFINES                 += SYMBIAN
-    TARGET.EPOCALLOWDLLDATA = 1
-    TARGET.VID              = VID_DEFAULT
-    TARGET.CAPABILITY       = CAP_GENERAL_DLL
-    INCLUDEPATH             += $$APP_LAYER_SYSTEMINCLUDE
-    SYMBIAN_PLATFORMS       = WINSCW ARMV5
-    MMP_RULES               += SMPSAFE
-}
-
-# QT 4.7 changes the def file location so force them to stay where they are
-defFilePath     = ..
-
-win32: {
-    DEFINES     += BUILD_WIN32
-    DESTDIR     = ../bin
-    LIBS        += -L../bin
-    INCLUDEPATH += ../radioenginewrapper/inc
-    INCLUDEPATH += ../radioapplication/win32_stubs
-    HEADERS     += ../radioapplication/win32_stubs/*.h
-    SOURCES     += ../radioapplication/win32_stubs/*.cpp
-}
-
-USE_UNFROZEN_EXPORTS {
-    symbian:MMP_RULES   += "exportunfrozen"
-    symbian:DEF_FILE    = not_used.def
-}
-
-# Place generated files away from the source folder
-MOC_DIR         = /epoc32/build/radioapp/$$TMP_DIR_NAME
-RCC_DIR         = /epoc32/build/radioapp/$$TMP_DIR_NAME
-OBJECTS_DIR     = /epoc32/build/radioapp/$$TMP_DIR_NAME
--- a/radioapp/bwins/fmradioenginewrapperu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +0,0 @@
-EXPORTS
-	?skipPrevious@RadioEngineWrapperObserver@@UAEXXZ @ 1 NONAME ; void RadioEngineWrapperObserver::skipPrevious(void)
-	?volumeChanged@RadioEngineWrapperObserver@@UAEXH@Z @ 2 NONAME ; void RadioEngineWrapperObserver::volumeChanged(int)
-	?init@RadioEngineWrapper@@QAE_NXZ @ 3 NONAME ; bool RadioEngineWrapper::init(void)
-	?settings@RadioEngineWrapper@@QAEAAVRadioSettingsIf@@XZ @ 4 NONAME ; class RadioSettingsIf & RadioEngineWrapper::settings(void)
-	?region@RadioEngineWrapper@@QBE?AW4Region@RadioRegion@@XZ @ 5 NONAME ; enum RadioRegion::Region RadioEngineWrapper::region(void) const
-	?initCombinedLogger@RadioLogger@@SAXXZ @ 6 NONAME ; void RadioLogger::initCombinedLogger(void)
-	?removeObserver@RadioEngineWrapper@@QAEXPAVRadioEngineWrapperObserver@@@Z @ 7 NONAME ; void RadioEngineWrapper::removeObserver(class RadioEngineWrapperObserver *)
-	?decreaseVolume@RadioEngineWrapper@@QAEXXZ @ 8 NONAME ; void RadioEngineWrapper::decreaseVolume(void)
-	?isRadioOn@RadioEngineWrapper@@QBE_NXZ @ 9 NONAME ; bool RadioEngineWrapper::isRadioOn(void) const
-	?addObserver@RadioEngineWrapper@@QAEXPAVRadioEngineWrapperObserver@@@Z @ 10 NONAME ; void RadioEngineWrapper::addObserver(class RadioEngineWrapperObserver *)
-	?isAntennaAttached@RadioEngineWrapper@@QBE_NXZ @ 11 NONAME ; bool RadioEngineWrapper::isAntennaAttached(void) const
-	?toggleAudioRoute@RadioEngineWrapper@@QAEXXZ @ 12 NONAME ; void RadioEngineWrapper::toggleAudioRoute(void)
-	?setVolume@RadioEngineWrapper@@QAEXH@Z @ 13 NONAME ; void RadioEngineWrapper::setVolume(int)
-	?setMute@RadioEngineWrapper@@QAEX_N0@Z @ 14 NONAME ; void RadioEngineWrapper::setMute(bool, bool)
-	??0RadioEngineWrapper@@QAE@AAVRadioStationHandlerIf@@@Z @ 15 NONAME ; RadioEngineWrapper::RadioEngineWrapper(class RadioStationHandlerIf &)
-	?cancelSeeking@RadioEngineWrapper@@QAEXXZ @ 16 NONAME ; void RadioEngineWrapper::cancelSeeking(void)
-	?d_func@RadioEngineWrapper@@AAEPAVRadioEngineWrapperPrivate@@XZ @ 17 NONAME ; class RadioEngineWrapperPrivate * RadioEngineWrapper::d_func(void)
-	?d_func@RadioEngineWrapper@@ABEPBVRadioEngineWrapperPrivate@@XZ @ 18 NONAME ; class RadioEngineWrapperPrivate const * RadioEngineWrapper::d_func(void) const
-	?releaseCombinedLogger@RadioLogger@@SAXXZ @ 19 NONAME ; void RadioLogger::releaseCombinedLogger(void)
-	??1RadioEngineWrapper@@QAE@XZ @ 20 NONAME ; RadioEngineWrapper::~RadioEngineWrapper(void)
-	?radioStatusChanged@RadioEngineWrapperObserver@@UAEX_N@Z @ 21 NONAME ; void RadioEngineWrapperObserver::radioStatusChanged(bool)
-	?increaseVolume@RadioEngineWrapperObserver@@UAEXXZ @ 22 NONAME ; void RadioEngineWrapperObserver::increaseVolume(void)
-	?frequencyStepSize@RadioEngineWrapper@@QBEIXZ @ 23 NONAME ; unsigned int RadioEngineWrapper::frequencyStepSize(void) const
-	??0MethodLogger@@QAE@PBD0@Z @ 24 NONAME ; MethodLogger::MethodLogger(char const *, char const *)
-	?isFrequencyValid@RadioEngineWrapper@@QBE_NI@Z @ 25 NONAME ; bool RadioEngineWrapper::isFrequencyValid(unsigned int) const
-	?setFrequency@RadioEngineWrapper@@QAEXIH@Z @ 26 NONAME ; void RadioEngineWrapper::setFrequency(unsigned int, int)
-	?setRdsEnabled@RadioEngineWrapper@@QAEX_N@Z @ 27 NONAME ; void RadioEngineWrapper::setRdsEnabled(bool)
-	?logMsg@RadioLogger@@SAXPBDW4Mode@1@@Z @ 28 NONAME ; void RadioLogger::logMsg(char const *, enum RadioLogger::Mode)
-	?audioRouteChanged@RadioEngineWrapperObserver@@UAEX_N@Z @ 29 NONAME ; void RadioEngineWrapperObserver::audioRouteChanged(bool)
-	?isMuted@RadioEngineWrapper@@QBE_NXZ @ 30 NONAME ; bool RadioEngineWrapper::isMuted(void) const
-	?isUsingLoudspeaker@RadioEngineWrapper@@QBE_NXZ @ 31 NONAME ; bool RadioEngineWrapper::isUsingLoudspeaker(void) const
-	?currentFrequency@RadioEngineWrapper@@QBEIXZ @ 32 NONAME ; unsigned int RadioEngineWrapper::currentFrequency(void) const
-	?skipNext@RadioEngineWrapperObserver@@UAEXXZ @ 33 NONAME ; void RadioEngineWrapperObserver::skipNext(void)
-	?isInManualSeekMode@RadioEngineWrapper@@QBE_NXZ @ 34 NONAME ; bool RadioEngineWrapper::isInManualSeekMode(void) const
-	?muteChanged@RadioEngineWrapperObserver@@UAEX_N@Z @ 35 NONAME ; void RadioEngineWrapperObserver::muteChanged(bool)
-	?startSeeking@RadioEngineWrapper@@QAEXW4Direction@Seek@@H@Z @ 36 NONAME ; void RadioEngineWrapper::startSeeking(enum Seek::Direction, int)
-	?decreaseVolume@RadioEngineWrapperObserver@@UAEXXZ @ 37 NONAME ; void RadioEngineWrapperObserver::decreaseVolume(void)
-	?minFrequency@RadioEngineWrapper@@QBEIXZ @ 38 NONAME ; unsigned int RadioEngineWrapper::minFrequency(void) const
-	?rdsAvailabilityChanged@RadioEngineWrapperObserver@@UAEX_N@Z @ 39 NONAME ; void RadioEngineWrapperObserver::rdsAvailabilityChanged(bool)
-	?tunedToFrequency@RadioEngineWrapperObserver@@UAEXIH@Z @ 40 NONAME ; void RadioEngineWrapperObserver::tunedToFrequency(unsigned int, int)
-	??1MethodLogger@@QAE@XZ @ 41 NONAME ; MethodLogger::~MethodLogger(void)
-	?antennaStatusChanged@RadioEngineWrapperObserver@@UAEX_N@Z @ 42 NONAME ; void RadioEngineWrapperObserver::antennaStatusChanged(bool)
-	?setManualSeekMode@RadioEngineWrapper@@QAEX_N@Z @ 43 NONAME ; void RadioEngineWrapper::setManualSeekMode(bool)
-	?increaseVolume@RadioEngineWrapper@@QAEXXZ @ 44 NONAME ; void RadioEngineWrapper::increaseVolume(void)
-	?maxFrequency@RadioEngineWrapper@@QBEIXZ @ 45 NONAME ; unsigned int RadioEngineWrapper::maxFrequency(void) const
-
--- a/radioapp/bwins/fmradiopresetstorageu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-EXPORTS
-	??1RadioPresetStorage@@QAE@XZ @ 1 NONAME ; RadioPresetStorage::~RadioPresetStorage(void)
-	?savePreset@RadioPresetStorage@@QAE_NABVRadioStationIf@@@Z @ 2 NONAME ; bool RadioPresetStorage::savePreset(class RadioStationIf const &)
-	?maxNumberOfPresets@RadioPresetStorage@@QBEHXZ @ 3 NONAME ; int RadioPresetStorage::maxNumberOfPresets(void) const
-	??0RadioPresetStorage@@QAE@XZ @ 4 NONAME ; RadioPresetStorage::RadioPresetStorage(void)
-	?nextPreset@RadioPresetStorage@@QBEHH@Z @ 5 NONAME ; int RadioPresetStorage::nextPreset(int) const
-	?deletePreset@RadioPresetStorage@@QAE_NH@Z @ 6 NONAME ; bool RadioPresetStorage::deletePreset(int)
-	?firstPreset@RadioPresetStorage@@QBEHXZ @ 7 NONAME ; int RadioPresetStorage::firstPreset(void) const
-	?readPreset@RadioPresetStorage@@QAE_NHAAVRadioStationIf@@@Z @ 8 NONAME ; bool RadioPresetStorage::readPreset(int, class RadioStationIf &)
-	?presetCount@RadioPresetStorage@@QBEHXZ @ 9 NONAME ; int RadioPresetStorage::presetCount(void) const
-	?d_func@RadioPresetStorage@@AAEPAVRadioPresetStoragePrivate@@XZ @ 10 NONAME ; class RadioPresetStoragePrivate * RadioPresetStorage::d_func(void)
-	?d_func@RadioPresetStorage@@ABEPBVRadioPresetStoragePrivate@@XZ @ 11 NONAME ; class RadioPresetStoragePrivate const * RadioPresetStorage::d_func(void) const
-	?readFrequencies@RadioPresetStorage@@QAEXAAV?$QList@I@@@Z @ 12 NONAME ; void RadioPresetStorage::readFrequencies(class QList<unsigned int> &)
-
--- a/radioapp/bwins/fmradiouiengineu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,255 +0,0 @@
-EXPORTS
-	?tr@RadioUiEngine@@SA?AVQString@@PBD0@Z @ 1 NONAME ; class QString RadioUiEngine::tr(char const *, char const *)
-	?setFrequency@RadioHistoryItem@@QAEXI@Z @ 2 NONAME ; void RadioHistoryItem::setFrequency(unsigned int)
-	?currentStation@RadioStationModel@@QBEABVRadioStation@@XZ @ 3 NONAME ; class RadioStation const & RadioStationModel::currentStation(void) const
-	?rowCount@RadioHistoryModel@@UBEHABVQModelIndex@@@Z @ 4 NONAME ; int RadioHistoryModel::rowCount(class QModelIndex const &) const
-	?contains@RadioStationModel@@QBE_NI@Z @ 5 NONAME ; bool RadioStationModel::contains(unsigned int) const
-	?qt_metacast@RadioUiEngine@@UAEPAXPBD@Z @ 6 NONAME ; void * RadioUiEngine::qt_metacast(char const *)
-	?parseFrequency@RadioStation@@SA?AVQString@@I@Z @ 7 NONAME ; class QString RadioStation::parseFrequency(unsigned int)
-	??0RadioStation@@QAE@ABV0@@Z @ 8 NONAME ; RadioStation::RadioStation(class RadioStation const &)
-	?region@RadioUiEngine@@QBE?AW4Region@RadioRegion@@XZ @ 9 NONAME ; enum RadioRegion::Region RadioUiEngine::region(void) const
-	?frequency@RadioStation@@QBEIXZ @ 10 NONAME ; unsigned int RadioStation::frequency(void) const
-	?setFavoriteByFrequency@RadioStationModel@@QAEXI_N@Z @ 11 NONAME ; void RadioStationModel::setFavoriteByFrequency(unsigned int, bool)
-	?isInitialized@RadioUiEngine@@QBE_NXZ @ 12 NONAME ; bool RadioUiEngine::isInitialized(void) const
-	?staticMetaObject@RadioUiEngine@@2UQMetaObject@@B @ 13 NONAME ; struct QMetaObject const RadioUiEngine::staticMetaObject
-	?indexFromFrequency@RadioStationModel@@QAEHI@Z @ 14 NONAME ; int RadioStationModel::indexFromFrequency(unsigned int)
-	?stationsInRange@RadioStationModel@@QAE?AV?$QList@VRadioStation@@@@II@Z @ 15 NONAME ; class QList<class RadioStation> RadioStationModel::stationsInRange(unsigned int, unsigned int)
-	?settings@RadioUiEngine@@QAEAAVRadioSettingsIf@@XZ @ 16 NONAME ; class RadioSettingsIf & RadioUiEngine::settings(void)
-	?emitAntennaStatusChanged@RadioUiEngine@@AAEX_N@Z @ 17 NONAME ; void RadioUiEngine::emitAntennaStatusChanged(bool)
-	?hasPiCode@RadioStation@@QBE_NXZ @ 18 NONAME ; bool RadioStation::hasPiCode(void) const
-	??_ERadioScannerEngine@@UAE@I@Z @ 19 NONAME ; RadioScannerEngine::~RadioScannerEngine(unsigned int)
-	?setFavoriteByPreset@RadioStationModel@@QAEXH_N@Z @ 20 NONAME ; void RadioStationModel::setFavoriteByPreset(int, bool)
-	?rdsAvailabilityChanged@RadioUiEngine@@IAEX_N@Z @ 21 NONAME ; void RadioUiEngine::rdsAvailabilityChanged(bool)
-	?findPresetIndex@RadioStationModel@@QAEHHAAVRadioStation@@@Z @ 22 NONAME ; int RadioStationModel::findPresetIndex(int, class RadioStation &)
-	?stationHandlerIf@RadioStationModel@@QAEAAVRadioStationHandlerIf@@XZ @ 23 NONAME ; class RadioStationHandlerIf & RadioStationModel::stationHandlerIf(void)
-	?qt_metacall@RadioHistoryModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 24 NONAME ; int RadioHistoryModel::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?frequencyString@RadioStation@@QBE?AVQString@@XZ @ 25 NONAME ; class QString RadioStation::frequencyString(void) const
-	?emitVolumeChanged@RadioUiEngine@@AAEXH@Z @ 26 NONAME ; void RadioUiEngine::emitVolumeChanged(int)
-	?qt_metacall@RadioUiEngine@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 27 NONAME ; int RadioUiEngine::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?reset@RadioStation@@AAEXXZ @ 28 NONAME ; void RadioStation::reset(void)
-	?createScannerEngine@RadioUiEngine@@QAE?AV?$QSharedPointer@VRadioScannerEngine@@@@XZ @ 29 NONAME ; class QSharedPointer<class RadioScannerEngine> RadioUiEngine::createScannerEngine(void)
-	?emitAudioRouteChanged@RadioUiEngine@@AAEX_N@Z @ 30 NONAME ; void RadioUiEngine::emitAudioRouteChanged(bool)
-	?addItem@RadioHistoryModel@@AAEXABVQString@@0ABVRadioStation@@@Z @ 31 NONAME ; void RadioHistoryModel::addItem(class QString const &, class QString const &, class RadioStation const &)
-	?d_func@RadioScannerEngine@@ABEPBVRadioScannerEnginePrivate@@XZ @ 32 NONAME ; class RadioScannerEnginePrivate const * RadioScannerEngine::d_func(void) const
-	??4RadioStation@@QAEAAV0@ABV0@@Z @ 33 NONAME ; class RadioStation & RadioStation::operator=(class RadioStation const &)
-	?toggleAudioRoute@RadioUiEngine@@QAEXXZ @ 34 NONAME ; void RadioUiEngine::toggleAudioRoute(void)
-	?stationModel@RadioUiEngine@@QAEAAVRadioStationModel@@XZ @ 35 NONAME ; class RadioStationModel & RadioUiEngine::stationModel(void)
-	?unsetType@RadioStation@@QAEXV?$QFlags@W4TypeFlag@RadioStation@@@@@Z @ 36 NONAME ; void RadioStation::unsetType(class QFlags<enum RadioStation::TypeFlag>)
-	?toggleTagging@RadioHistoryModel@@QAEXABVRadioHistoryItem@@H@Z @ 37 NONAME ; void RadioHistoryModel::toggleTagging(class RadioHistoryItem const &, int)
-	?muteChanged@RadioUiEngine@@IAEX_N@Z @ 38 NONAME ; void RadioUiEngine::muteChanged(bool)
-	?maxFrequency@RadioUiEngine@@QBEIXZ @ 39 NONAME ; unsigned int RadioUiEngine::maxFrequency(void) const
-	?setIcons@RadioStationModel@@QAEXABVQIcon@@0@Z @ 40 NONAME ; void RadioStationModel::setIcons(class QIcon const &, class QIcon const &)
-	?saveStation@RadioStationModel@@QAEXAAVRadioStation@@@Z @ 41 NONAME ; void RadioStationModel::saveStation(class RadioStation &)
-	?getStaticMetaObject@RadioHistoryModel@@SAABUQMetaObject@@XZ @ 42 NONAME ; struct QMetaObject const & RadioHistoryModel::getStaticMetaObject(void)
-	?findUnusedPresetIndex@RadioStationModel@@AAEHXZ @ 43 NONAME ; int RadioStationModel::findUnusedPresetIndex(void)
-	?hasChanged@RadioStation@@QBE_NXZ @ 44 NONAME ; bool RadioStation::hasChanged(void) const
-	?trUtf8@RadioScannerEngine@@SA?AVQString@@PBD0H@Z @ 45 NONAME ; class QString RadioScannerEngine::trUtf8(char const *, char const *, int)
-	?isScanning@RadioUiEngine@@QBE_NXZ @ 46 NONAME ; bool RadioUiEngine::isScanning(void) const
-	?dynamicPsCheckEnded@RadioStationModel@@AAEXXZ @ 47 NONAME ; void RadioStationModel::dynamicPsCheckEnded(void)
-	?d_func@RadioHistoryModel@@AAEPAVRadioHistoryModelPrivate@@XZ @ 48 NONAME ; class RadioHistoryModelPrivate * RadioHistoryModel::d_func(void)
-	?skipStation@RadioUiEngine@@QAEIW4Mode@StationSkip@@IH@Z @ 49 NONAME ; unsigned int RadioUiEngine::skipStation(enum StationSkip::Mode, unsigned int, int)
-	?setFrequency@RadioStation@@AAEXI@Z @ 50 NONAME ; void RadioStation::setFrequency(unsigned int)
-	?piCodeToCallSign@RadioStation@@AAE?AVQString@@I@Z @ 51 NONAME ; class QString RadioStation::piCodeToCallSign(unsigned int)
-	?seekStation@RadioUiEngine@@QAEXH@Z @ 52 NONAME ; void RadioUiEngine::seekStation(int)
-	?favoriteChanged@RadioStationModel@@IAEXABVRadioStation@@@Z @ 53 NONAME ; void RadioStationModel::favoriteChanged(class RadioStation const &)
-	?radioStatusChanged@RadioUiEngine@@IAEX_N@Z @ 54 NONAME ; void RadioUiEngine::radioStatusChanged(bool)
-	?setIcons@RadioHistoryModel@@QAEXABVQIcon@@0@Z @ 55 NONAME ; void RadioHistoryModel::setIcons(class QIcon const &, class QIcon const &)
-	?isCurrentSongRecognized@RadioHistoryModel@@QBE_NXZ @ 56 NONAME ; bool RadioHistoryModel::isCurrentSongRecognized(void) const
-	?addStation@RadioStationModel@@QAEXABVRadioStation@@@Z @ 57 NONAME ; void RadioStationModel::addStation(class RadioStation const &)
-	?clearRadioTextPlus@RadioHistoryModel@@AAEXXZ @ 58 NONAME ; void RadioHistoryModel::clearRadioTextPlus(void)
-	?favoriteCount@RadioStationModel@@QAEHXZ @ 59 NONAME ; int RadioStationModel::favoriteCount(void)
-	??1RadioScannerEngine@@UAE@XZ @ 60 NONAME ; RadioScannerEngine::~RadioScannerEngine(void)
-	?tunedToFrequency@RadioUiEngine@@IAEXIH@Z @ 61 NONAME ; void RadioUiEngine::tunedToFrequency(unsigned int, int)
-	?tr@RadioUiEngine@@SA?AVQString@@PBD0H@Z @ 62 NONAME ; class QString RadioUiEngine::tr(char const *, char const *, int)
-	?launchBrowser@RadioUiEngine@@QAEXABVQString@@@Z @ 63 NONAME ; void RadioUiEngine::launchBrowser(class QString const &)
-	?isScanning@RadioScannerEngine@@QBE_NXZ @ 64 NONAME ; bool RadioScannerEngine::isScanning(void) const
-	??1RadioHistoryItem@@QAE@XZ @ 65 NONAME ; RadioHistoryItem::~RadioHistoryItem(void)
-	?trUtf8@RadioScannerEngine@@SA?AVQString@@PBD0@Z @ 66 NONAME ; class QString RadioScannerEngine::trUtf8(char const *, char const *)
-	?hasName@RadioStation@@QBE_NXZ @ 67 NONAME ; bool RadioStation::hasName(void) const
-	?emitDataChanged@RadioStationModel@@AAEXABVRadioStation@@@Z @ 68 NONAME ; void RadioStationModel::emitDataChanged(class RadioStation const &)
-	?setPowerOff@RadioUiEngine@@QAEXH@Z @ 69 NONAME ; void RadioUiEngine::setPowerOff(int)
-	?isRadioOn@RadioUiEngine@@QBE_NXZ @ 70 NONAME ; bool RadioUiEngine::isRadioOn(void) const
-	?continueScanning@RadioScannerEngine@@QAEXXZ @ 71 NONAME ; void RadioScannerEngine::continueScanning(void)
-	?trUtf8@RadioHistoryModel@@SA?AVQString@@PBD0H@Z @ 72 NONAME ; class QString RadioHistoryModel::trUtf8(char const *, char const *, int)
-	?list@RadioStationModel@@QBEABV?$QMap@IVRadioStation@@@@XZ @ 73 NONAME ; class QMap<unsigned int, class RadioStation> const & RadioStationModel::list(void) const
-	?tr@RadioStationModel@@SA?AVQString@@PBD0@Z @ 74 NONAME ; class QString RadioStationModel::tr(char const *, char const *)
-	?findClosest@RadioStationModel@@QAE?AVRadioStation@@IW4Mode@StationSkip@@@Z @ 75 NONAME ; class RadioStation RadioStationModel::findClosest(unsigned int, enum StationSkip::Mode)
-	?flags@RadioStationModel@@UBE?AV?$QFlags@W4ItemFlag@Qt@@@@ABVQModelIndex@@@Z @ 76 NONAME ; class QFlags<enum Qt::ItemFlag> RadioStationModel::flags(class QModelIndex const &) const
-	?launchRadioServer@RadioUiEngine@@SAXXZ @ 77 NONAME ; void RadioUiEngine::launchRadioServer(void)
-	?staticMetaObject@RadioScannerEngine@@2UQMetaObject@@B @ 78 NONAME ; struct QMetaObject const RadioScannerEngine::staticMetaObject
-	?id@RadioHistoryItem@@QBEHXZ @ 79 NONAME ; int RadioHistoryItem::id(void) const
-	?stationsInRange@RadioUiEngine@@QAE?AV?$QList@VRadioStation@@@@II@Z @ 80 NONAME ; class QList<class RadioStation> RadioUiEngine::stationsInRange(unsigned int, unsigned int)
-	?trUtf8@RadioUiEngine@@SA?AVQString@@PBD0@Z @ 81 NONAME ; class QString RadioUiEngine::trUtf8(char const *, char const *)
-	?tr@RadioScannerEngine@@SA?AVQString@@PBD0H@Z @ 82 NONAME ; class QString RadioScannerEngine::tr(char const *, char const *, int)
-	?setPiCode@RadioStation@@AAE_NHW4Region@RadioRegion@@@Z @ 83 NONAME ; bool RadioStation::setPiCode(int, enum RadioRegion::Region)
-	?data_ptr@RadioHistoryItem@@QAEAAV?$QSharedDataPointer@VRadioHistoryItemPrivate@@@@XZ @ 84 NONAME ; class QSharedDataPointer<class RadioHistoryItemPrivate> & RadioHistoryItem::data_ptr(void)
-	?radioText@RadioStation@@QBE?AVQString@@XZ @ 85 NONAME ; class QString RadioStation::radioText(void) const
-	?setData@RadioStationModel@@UAE_NABVQModelIndex@@ABVQVariant@@H@Z @ 86 NONAME ; bool RadioStationModel::setData(class QModelIndex const &, class QVariant const &, int)
-	?lastVolume@RadioUiEngine@@SAHXZ @ 87 NONAME ; int RadioUiEngine::lastVolume(void)
-	?isInManualSeekMode@RadioUiEngine@@QBE_NXZ @ 88 NONAME ; bool RadioUiEngine::isInManualSeekMode(void) const
-	?itemAtIndex@RadioHistoryModel@@QBE?AVRadioHistoryItem@@ABVQModelIndex@@@Z @ 89 NONAME ; class RadioHistoryItem RadioHistoryModel::itemAtIndex(class QModelIndex const &) const
-	?setVolume@RadioUiEngine@@QAEXH@Z @ 90 NONAME ; void RadioUiEngine::setVolume(int)
-	?setFavorite@RadioStation@@QAEX_N@Z @ 91 NONAME ; void RadioStation::setFavorite(bool)
-	?d_func@RadioStationModel@@ABEPBVRadioStationModelPrivate@@XZ @ 92 NONAME ; class RadioStationModelPrivate const * RadioStationModel::d_func(void) const
-	?emitChangeSignals@RadioStationModel@@AAEXABVRadioStation@@V?$QFlags@W4ChangeFlag@RadioStation@@@@@Z @ 93 NONAME ; void RadioStationModel::emitChangeSignals(class RadioStation const &, class QFlags<enum RadioStation::ChangeFlag>)
-	?tr@RadioStationModel@@SA?AVQString@@PBD0H@Z @ 94 NONAME ; class QString RadioStationModel::tr(char const *, char const *, int)
-	?hasUrl@RadioStation@@QBE_NXZ @ 95 NONAME ; bool RadioStation::hasUrl(void) const
-	??1RadioStationModel@@UAE@XZ @ 96 NONAME ; RadioStationModel::~RadioStationModel(void)
-	?isMuted@RadioUiEngine@@QBE_NXZ @ 97 NONAME ; bool RadioUiEngine::isMuted(void) const
-	?renameStation@RadioStationModel@@QAEXHABVQString@@@Z @ 98 NONAME ; void RadioStationModel::renameStation(int, class QString const &)
-	?currentFrequency@RadioUiEngine@@QBEIXZ @ 99 NONAME ; unsigned int RadioUiEngine::currentFrequency(void) const
-	?emitItemAdded@RadioHistoryModel@@AAEXXZ @ 100 NONAME ; void RadioHistoryModel::emitItemAdded(void)
-	?setUserDefinedName@RadioStation@@QAEXABVQString@@@Z @ 101 NONAME ; void RadioStation::setUserDefinedName(class QString const &)
-	?setUrl@RadioStation@@AAEXABVQString@@@Z @ 102 NONAME ; void RadioStation::setUrl(class QString const &)
-	?hasDynamicPs@RadioStation@@QBE_NXZ @ 103 NONAME ; bool RadioStation::hasDynamicPs(void) const
-	??1RadioStation@@UAE@XZ @ 104 NONAME ; RadioStation::~RadioStation(void)
-	?getStaticMetaObject@RadioScannerEngine@@SAABUQMetaObject@@XZ @ 105 NONAME ; struct QMetaObject const & RadioScannerEngine::getStaticMetaObject(void)
-	?callSignString@RadioStation@@AAE?AVQString@@I@Z @ 106 NONAME ; class QString RadioStation::callSignString(unsigned int)
-	?isValid@RadioStation@@QBE_NXZ @ 107 NONAME ; bool RadioStation::isValid(void) const
-	?data_ptr@RadioStation@@QAEAAV?$QSharedDataPointer@VRadioStationPrivate@@@@XZ @ 108 NONAME ; class QSharedDataPointer<class RadioStationPrivate> & RadioStation::data_ptr(void)
-	?trUtf8@RadioUiEngine@@SA?AVQString@@PBD0H@Z @ 109 NONAME ; class QString RadioUiEngine::trUtf8(char const *, char const *, int)
-	?reset@RadioHistoryItem@@QAEXXZ @ 110 NONAME ; void RadioHistoryItem::reset(void)
-	?trUtf8@RadioStationModel@@SA?AVQString@@PBD0@Z @ 111 NONAME ; class QString RadioStationModel::trUtf8(char const *, char const *)
-	?setRadioTextPlus@RadioStation@@AAEXHABVQString@@@Z @ 112 NONAME ; void RadioStation::setRadioTextPlus(int, class QString const &)
-	?setChangeFlags@RadioStation@@AAEXV?$QFlags@W4ChangeFlag@RadioStation@@@@@Z @ 113 NONAME ; void RadioStation::setChangeFlags(class QFlags<enum RadioStation::ChangeFlag>)
-	??0RadioStationModel@@QAE@AAVRadioUiEnginePrivate@@@Z @ 114 NONAME ; RadioStationModel::RadioStationModel(class RadioUiEnginePrivate &)
-	?stationDataChanged@RadioStationModel@@IAEXABVRadioStation@@@Z @ 115 NONAME ; void RadioStationModel::stationDataChanged(class RadioStation const &)
-	?frequency@RadioHistoryItem@@QBEIXZ @ 116 NONAME ; unsigned int RadioHistoryItem::frequency(void) const
-	?currentStation@RadioStationModel@@QAEAAVRadioStation@@XZ @ 117 NONAME ; class RadioStation & RadioStationModel::currentStation(void)
-	?isDetached@RadioHistoryItem@@QBE_NXZ @ 118 NONAME ; bool RadioHistoryItem::isDetached(void) const
-	?genre@RadioStation@@QBEHXZ @ 119 NONAME ; int RadioStation::genre(void) const
-	?qt_metacall@RadioScannerEngine@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 120 NONAME ; int RadioScannerEngine::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?emitTunedToFrequency@RadioUiEngine@@AAEXIH@Z @ 121 NONAME ; void RadioUiEngine::emitTunedToFrequency(unsigned int, int)
-	??0RadioStation@@QAE@XZ @ 122 NONAME ; RadioStation::RadioStation(void)
-	?psType@RadioStation@@QBE?AV?$QFlags@W4PsTypeFlag@RadioStation@@@@XZ @ 123 NONAME ; class QFlags<enum RadioStation::PsTypeFlag> RadioStation::psType(void) const
-	??1RadioHistoryModel@@UAE@XZ @ 124 NONAME ; RadioHistoryModel::~RadioHistoryModel(void)
-	?d_func@RadioUiEngine@@ABEPBVRadioUiEnginePrivate@@XZ @ 125 NONAME ; class RadioUiEnginePrivate const * RadioUiEngine::d_func(void) const
-	?findStation@RadioStationModel@@QBE?AVRadioStation@@IW4Criteria@FindCriteria@@@Z @ 126 NONAME ; class RadioStation RadioStationModel::findStation(unsigned int, enum FindCriteria::Criteria) const
-	?scannerEngine@RadioUiEngine@@QAEPAVRadioScannerEngine@@XZ @ 127 NONAME ; class RadioScannerEngine * RadioUiEngine::scannerEngine(void)
-	?setManualSeekMode@RadioUiEngine@@QAEX_N@Z @ 128 NONAME ; void RadioUiEngine::setManualSeekMode(bool)
-	?isSongRecognitionAppAvailable@RadioUiEngine@@QAE_NXZ @ 129 NONAME ; bool RadioUiEngine::isSongRecognitionAppAvailable(void)
-	?startScanning@RadioScannerEngine@@QAEXXZ @ 130 NONAME ; void RadioScannerEngine::startScanning(void)
-	?emitStationFound@RadioScannerEngine@@AAEXABVRadioStation@@@Z @ 131 NONAME ; void RadioScannerEngine::emitStationFound(class RadioStation const &)
-	?isValid@RadioHistoryItem@@QBE_NXZ @ 132 NONAME ; bool RadioHistoryItem::isValid(void) const
-	?setPsType@RadioStation@@AAEXV?$QFlags@W4PsTypeFlag@RadioStation@@@@@Z @ 133 NONAME ; void RadioStation::setPsType(class QFlags<enum RadioStation::PsTypeFlag>)
-	?setFrequency@RadioUiEngine@@QAEXIH@Z @ 134 NONAME ; void RadioUiEngine::setFrequency(unsigned int, int)
-	?data@RadioHistoryModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 135 NONAME ; class QVariant RadioHistoryModel::data(class QModelIndex const &, int) const
-	??4RadioHistoryItem@@QAEAAV0@ABV0@@Z @ 136 NONAME ; class RadioHistoryItem & RadioHistoryItem::operator=(class RadioHistoryItem const &)
-	?url@RadioStation@@QBE?AVQString@@XZ @ 137 NONAME ; class QString RadioStation::url(void) const
-	?historyModel@RadioUiEngine@@QAEAAVRadioHistoryModel@@XZ @ 138 NONAME ; class RadioHistoryModel & RadioUiEngine::historyModel(void)
-	?emitRdsAvailabilityChanged@RadioUiEngine@@AAEX_N@Z @ 139 NONAME ; void RadioUiEngine::emitRdsAvailabilityChanged(bool)
-	?isAntennaAttached@RadioUiEngine@@QBE_NXZ @ 140 NONAME ; bool RadioUiEngine::isAntennaAttached(void) const
-	?setStation@RadioHistoryItem@@QAEXABVQString@@@Z @ 141 NONAME ; void RadioHistoryItem::setStation(class QString const &)
-	?qt_metacast@RadioStationModel@@UAEPAXPBD@Z @ 142 NONAME ; void * RadioStationModel::qt_metacast(char const *)
-	?hasSentRds@RadioStation@@QBE_NXZ @ 143 NONAME ; bool RadioStation::hasSentRds(void) const
-	?presetIndex@RadioStation@@QBEHXZ @ 144 NONAME ; int RadioStation::presetIndex(void) const
-	?cancel@RadioScannerEngine@@QAEXXZ @ 145 NONAME ; void RadioScannerEngine::cancel(void)
-	?staticMetaObject@RadioStationModel@@2UQMetaObject@@B @ 146 NONAME ; struct QMetaObject const RadioStationModel::staticMetaObject
-	?addRecognizedSong@RadioUiEngine@@QAEXABVQString@@0ABVRadioStation@@@Z @ 147 NONAME ; void RadioUiEngine::addRecognizedSong(class QString const &, class QString const &, class RadioStation const &)
-	?emitMuteChanged@RadioUiEngine@@AAEX_N@Z @ 148 NONAME ; void RadioUiEngine::emitMuteChanged(bool)
-	?setDynamicPsText@RadioStation@@AAEXABVQString@@@Z @ 149 NONAME ; void RadioStation::setDynamicPsText(class QString const &)
-	?currentSongReset@RadioHistoryModel@@IAEXXZ @ 150 NONAME ; void RadioHistoryModel::currentSongReset(void)
-	?removeByPresetIndex@RadioStationModel@@QAEXH@Z @ 151 NONAME ; void RadioStationModel::removeByPresetIndex(int)
-	?d_func@RadioScannerEngine@@AAEPAVRadioScannerEnginePrivate@@XZ @ 152 NONAME ; class RadioScannerEnginePrivate * RadioScannerEngine::d_func(void)
-	?isRenamed@RadioStation@@QBE_NXZ @ 153 NONAME ; bool RadioStation::isRenamed(void) const
-	?stationAt@RadioStationModel@@QBE?AVRadioStation@@H@Z @ 154 NONAME ; class RadioStation RadioStationModel::stationAt(int) const
-	?removeStation@RadioStationModel@@QAEXABVRadioStation@@@Z @ 155 NONAME ; void RadioStationModel::removeStation(class RadioStation const &)
-	?openMusicStore@RadioUiEngine@@QAEXABVRadioHistoryItem@@W4MusicStore@1@@Z @ 156 NONAME ; void RadioUiEngine::openMusicStore(class RadioHistoryItem const &, enum RadioUiEngine::MusicStore)
-	?metaObject@RadioUiEngine@@UBEPBUQMetaObject@@XZ @ 157 NONAME ; struct QMetaObject const * RadioUiEngine::metaObject(void) const
-	?dynamicPsChanged@RadioStationModel@@IAEXABVRadioStation@@@Z @ 158 NONAME ; void RadioStationModel::dynamicPsChanged(class RadioStation const &)
-	?setType@RadioStation@@QAEXV?$QFlags@W4TypeFlag@RadioStation@@@@@Z @ 159 NONAME ; void RadioStation::setType(class QFlags<enum RadioStation::TypeFlag>)
-	??0RadioHistoryItem@@QAE@XZ @ 160 NONAME ; RadioHistoryItem::RadioHistoryItem(void)
-	?removeByFrequency@RadioStationModel@@QAEXI@Z @ 161 NONAME ; void RadioStationModel::removeByFrequency(unsigned int)
-	?isUsingLoudspeaker@RadioUiEngine@@QBE_NXZ @ 162 NONAME ; bool RadioUiEngine::isUsingLoudspeaker(void) const
-	?findPresetIndex@RadioStationModel@@QAEHH@Z @ 163 NONAME ; int RadioStationModel::findPresetIndex(int)
-	??0RadioHistoryItem@@QAE@ABV0@@Z @ 164 NONAME ; RadioHistoryItem::RadioHistoryItem(class RadioHistoryItem const &)
-	?metaObject@RadioStationModel@@UBEPBUQMetaObject@@XZ @ 165 NONAME ; struct QMetaObject const * RadioStationModel::metaObject(void) const
-	?getStaticMetaObject@RadioStationModel@@SAABUQMetaObject@@XZ @ 166 NONAME ; struct QMetaObject const & RadioStationModel::getStaticMetaObject(void)
-	?isPoweringOff@RadioUiEngine@@QBE_NXZ @ 167 NONAME ; bool RadioUiEngine::isPoweringOff(void) const
-	?lastTunedFrequency@RadioUiEngine@@SAII@Z @ 168 NONAME ; unsigned int RadioUiEngine::lastTunedFrequency(unsigned int)
-	?tr@RadioScannerEngine@@SA?AVQString@@PBD0@Z @ 169 NONAME ; class QString RadioScannerEngine::tr(char const *, char const *)
-	?removeAll@RadioHistoryModel@@QAEX_N@Z @ 170 NONAME ; void RadioHistoryModel::removeAll(bool)
-	?hasGenre@RadioStation@@QBE_NXZ @ 171 NONAME ; bool RadioStation::hasGenre(void) const
-	?audioRouteChanged@RadioUiEngine@@IAEX_N@Z @ 172 NONAME ; void RadioUiEngine::audioRouteChanged(bool)
-	?setPowerOn@RadioUiEngine@@QAEXXZ @ 173 NONAME ; void RadioUiEngine::setPowerOn(void)
-	?tr@RadioHistoryModel@@SA?AVQString@@PBD0H@Z @ 174 NONAME ; class QString RadioHistoryModel::tr(char const *, char const *, int)
-	?dynamicPsText@RadioStation@@QBE?AVQString@@XZ @ 175 NONAME ; class QString RadioStation::dynamicPsText(void) const
-	?isFirstTimeStart@RadioUiEngine@@QAE_NXZ @ 176 NONAME ; bool RadioUiEngine::isFirstTimeStart(void)
-	?setMute@RadioUiEngine@@QAEX_N@Z @ 177 NONAME ; void RadioUiEngine::setMute(bool)
-	?setGenre@RadioStation@@AAEXH@Z @ 178 NONAME ; void RadioStation::setGenre(int)
-	??0RadioScannerEngine@@QAE@AAVRadioUiEnginePrivate@@@Z @ 179 NONAME ; RadioScannerEngine::RadioScannerEngine(class RadioUiEnginePrivate &)
-	?emitRadioStatusChanged@RadioUiEngine@@AAEX_N@Z @ 180 NONAME ; void RadioUiEngine::emitRadioStatusChanged(bool)
-	??_ERadioUiEngine@@UAE@I@Z @ 181 NONAME ; RadioUiEngine::~RadioUiEngine(unsigned int)
-	?init@RadioUiEngine@@QAE_NXZ @ 182 NONAME ; bool RadioUiEngine::init(void)
-	?setRadioText@RadioStation@@AAEXABVQString@@@Z @ 183 NONAME ; void RadioStation::setRadioText(class QString const &)
-	?changeFlags@RadioStation@@QBE?AV?$QFlags@W4ChangeFlag@RadioStation@@@@XZ @ 184 NONAME ; class QFlags<enum RadioStation::ChangeFlag> RadioStation::changeFlags(void) const
-	?findFrequency@RadioStationModel@@QBE_NIAAVRadioStation@@W4Criteria@FindCriteria@@@Z @ 185 NONAME ; bool RadioStationModel::findFrequency(unsigned int, class RadioStation &, enum FindCriteria::Criteria) const
-	?d_func@RadioStationModel@@AAEPAVRadioStationModelPrivate@@XZ @ 186 NONAME ; class RadioStationModelPrivate * RadioStationModel::d_func(void)
-	?addRadioTextPlus@RadioHistoryModel@@AAEXHABVQString@@ABVRadioStation@@@Z @ 187 NONAME ; void RadioHistoryModel::addRadioTextPlus(int, class QString const &, class RadioStation const &)
-	?qt_metacast@RadioHistoryModel@@UAEPAXPBD@Z @ 188 NONAME ; void * RadioHistoryModel::qt_metacast(char const *)
-	?setDetail@RadioStationModel@@QAEXV?$QFlags@W4DetailFlag@RadioStationModel@@@@@Z @ 189 NONAME ; void RadioStationModel::setDetail(class QFlags<enum RadioStationModel::DetailFlag>)
-	??1RadioUiEngine@@UAE@XZ @ 190 NONAME ; RadioUiEngine::~RadioUiEngine(void)
-	?tr@RadioHistoryModel@@SA?AVQString@@PBD0@Z @ 191 NONAME ; class QString RadioHistoryModel::tr(char const *, char const *)
-	?time@RadioHistoryItem@@QBE?AVQString@@XZ @ 192 NONAME ; class QString RadioHistoryItem::time(void) const
-	?reportChangedData@RadioHistoryModel@@AAEXHH@Z @ 193 NONAME ; void RadioHistoryModel::reportChangedData(int, int)
-	?artist@RadioHistoryItem@@QBE?AVQString@@XZ @ 194 NONAME ; class QString RadioHistoryItem::artist(void) const
-	?initialize@RadioStationModel@@QAEXPAVRadioPresetStorage@@PAVRadioEngineWrapper@@@Z @ 195 NONAME ; void RadioStationModel::initialize(class RadioPresetStorage *, class RadioEngineWrapper *)
-	?isType@RadioStation@@QBE_NV?$QFlags@W4TypeFlag@RadioStation@@@@@Z @ 196 NONAME ; bool RadioStation::isType(class QFlags<enum RadioStation::TypeFlag>) const
-	?resetCurrentSong@RadioHistoryModel@@QAEXXZ @ 197 NONAME ; void RadioHistoryModel::resetCurrentSong(void)
-	?d_func@RadioHistoryModel@@ABEPBVRadioHistoryModelPrivate@@XZ @ 198 NONAME ; class RadioHistoryModelPrivate const * RadioHistoryModel::d_func(void) const
-	?volumeChanged@RadioUiEngine@@IAEXH@Z @ 199 NONAME ; void RadioUiEngine::volumeChanged(int)
-	?title@RadioHistoryItem@@QBE?AVQString@@XZ @ 200 NONAME ; class QString RadioHistoryItem::title(void) const
-	?stationFound@RadioScannerEngine@@IAEXABVRadioStation@@@Z @ 201 NONAME ; void RadioScannerEngine::stationFound(class RadioStation const &)
-	?resetChangeFlags@RadioStation@@QAEXXZ @ 202 NONAME ; void RadioStation::resetChangeFlags(void)
-	?powerOffRequested@RadioUiEngine@@IAEXXZ @ 203 NONAME ; void RadioUiEngine::powerOffRequested(void)
-	?metaObject@RadioScannerEngine@@UBEPBUQMetaObject@@XZ @ 204 NONAME ; struct QMetaObject const * RadioScannerEngine::metaObject(void) const
-	?qt_metacast@RadioScannerEngine@@UAEPAXPBD@Z @ 205 NONAME ; void * RadioScannerEngine::qt_metacast(char const *)
-	?callSignChar@RadioStation@@AAEDI@Z @ 206 NONAME ; char RadioStation::callSignChar(unsigned int)
-	??_ERadioStation@@UAE@I@Z @ 207 NONAME ; RadioStation::~RadioStation(unsigned int)
-	?antennaStatusChanged@RadioUiEngine@@IAEX_N@Z @ 208 NONAME ; void RadioUiEngine::antennaStatusChanged(bool)
-	?staticMetaObject@RadioHistoryModel@@2UQMetaObject@@B @ 209 NONAME ; struct QMetaObject const RadioHistoryModel::staticMetaObject
-	?setFirstTimeStartPerformed@RadioUiEngine@@QAEX_N@Z @ 210 NONAME ; void RadioUiEngine::setFirstTimeStartPerformed(bool)
-	??0RadioStation@@AAE@HI@Z @ 211 NONAME ; RadioStation::RadioStation(int, unsigned int)
-	?qt_metacall@RadioStationModel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 212 NONAME ; int RadioStationModel::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?isDetached@RadioStation@@QBE_NXZ @ 213 NONAME ; bool RadioStation::isDetached(void) const
-	??0RadioHistoryItem@@QAE@ABVQString@@0@Z @ 214 NONAME ; RadioHistoryItem::RadioHistoryItem(class QString const &, class QString const &)
-	?name@RadioStation@@QBE?AVQString@@XZ @ 215 NONAME ; class QString RadioStation::name(void) const
-	?hasDataChanged@RadioStation@@QBE_NV?$QFlags@W4ChangeFlag@RadioStation@@@@@Z @ 216 NONAME ; bool RadioStation::hasDataChanged(class QFlags<enum RadioStation::ChangeFlag>) const
-	?removeAll@RadioStationModel@@QAEXW4RemoveMode@1@@Z @ 217 NONAME ; void RadioStationModel::removeAll(enum RadioStationModel::RemoveMode)
-	?data@RadioStationModel@@UBE?AVQVariant@@ABVQModelIndex@@H@Z @ 218 NONAME ; class QVariant RadioStationModel::data(class QModelIndex const &, int) const
-	?itemAdded@RadioHistoryModel@@IAEXXZ @ 219 NONAME ; void RadioHistoryModel::itemAdded(void)
-	?getStaticMetaObject@RadioUiEngine@@SAABUQMetaObject@@XZ @ 220 NONAME ; struct QMetaObject const & RadioUiEngine::getStaticMetaObject(void)
-	?setShowDetails@RadioHistoryModel@@QAEX_N@Z @ 221 NONAME ; void RadioHistoryModel::setShowDetails(bool)
-	?launchSongRecognition@RadioUiEngine@@QAEXXZ @ 222 NONAME ; void RadioUiEngine::launchSongRecognition(void)
-	?rowCount@RadioStationModel@@UBEHABVQModelIndex@@@Z @ 223 NONAME ; int RadioStationModel::rowCount(class QModelIndex const &) const
-	?iterateCallSign@RadioStation@@AAE?AVQString@@HH@Z @ 224 NONAME ; class QString RadioStation::iterateCallSign(int, int)
-	?toggleMute@RadioUiEngine@@QAEXXZ @ 225 NONAME ; void RadioUiEngine::toggleMute(void)
-	?piCode@RadioStation@@QBEHXZ @ 226 NONAME ; int RadioStation::piCode(void) const
-	?genreToString@RadioUiEngine@@QAE?AVQString@@HW4Target@GenreTarget@@@Z @ 227 NONAME ; class QString RadioUiEngine::genreToString(int, enum GenreTarget::Target)
-	??0RadioUiEngine@@QAE@PAVQObject@@@Z @ 228 NONAME ; RadioUiEngine::RadioUiEngine(class QObject *)
-	?hasRadiotext@RadioStation@@QBE_NXZ @ 229 NONAME ; bool RadioStation::hasRadiotext(void) const
-	?setCurrentTime@RadioHistoryItem@@QAEXXZ @ 230 NONAME ; void RadioHistoryItem::setCurrentTime(void)
-	?d_func@RadioUiEngine@@AAEPAVRadioUiEnginePrivate@@XZ @ 231 NONAME ; class RadioUiEnginePrivate * RadioUiEngine::d_func(void)
-	?station@RadioHistoryItem@@QBE?AVQString@@XZ @ 232 NONAME ; class QString RadioHistoryItem::station(void) const
-	??_ERadioHistoryModel@@UAE@I@Z @ 233 NONAME ; RadioHistoryModel::~RadioHistoryModel(unsigned int)
-	?minFrequency@RadioUiEngine@@QBEIXZ @ 234 NONAME ; unsigned int RadioUiEngine::minFrequency(void) const
-	?isTagged@RadioHistoryItem@@QBE_NXZ @ 235 NONAME ; bool RadioHistoryItem::isTagged(void) const
-	?addScannedFrequency@RadioScannerEngine@@QAEXI@Z @ 236 NONAME ; void RadioScannerEngine::addScannedFrequency(unsigned int)
-	?setShowTagged@RadioHistoryModel@@QAEX_N@Z @ 237 NONAME ; void RadioHistoryModel::setShowTagged(bool)
-	?setPresetIndex@RadioStation@@AAEXH@Z @ 238 NONAME ; void RadioStation::setPresetIndex(int)
-	?setName@RadioStation@@AAEXABVQString@@@Z @ 239 NONAME ; void RadioStation::setName(class QString const &)
-	?trUtf8@RadioHistoryModel@@SA?AVQString@@PBD0@Z @ 240 NONAME ; class QString RadioHistoryModel::trUtf8(char const *, char const *)
-	?frequencyStepSize@RadioUiEngine@@QBEIXZ @ 241 NONAME ; unsigned int RadioUiEngine::frequencyStepSize(void) const
-	??0RadioHistoryModel@@AAE@AAVRadioUiEngine@@@Z @ 242 NONAME ; RadioHistoryModel::RadioHistoryModel(class RadioUiEngine &)
-	?trUtf8@RadioStationModel@@SA?AVQString@@PBD0H@Z @ 243 NONAME ; class QString RadioStationModel::trUtf8(char const *, char const *, int)
-	?radioTextReceived@RadioStationModel@@IAEXABVRadioStation@@@Z @ 244 NONAME ; void RadioStationModel::radioTextReceived(class RadioStation const &)
-	?isFavorite@RadioStation@@QBE_NXZ @ 245 NONAME ; bool RadioStation::isFavorite(void) const
-	?metaObject@RadioHistoryModel@@UBEPBUQMetaObject@@XZ @ 246 NONAME ; struct QMetaObject const * RadioHistoryModel::metaObject(void) const
-	?seekingStarted@RadioUiEngine@@IAEXH@Z @ 247 NONAME ; void RadioUiEngine::seekingStarted(int)
-	?emitSeekingStarted@RadioUiEngine@@AAEXW4Direction@Seek@@@Z @ 248 NONAME ; void RadioUiEngine::emitSeekingStarted(enum Seek::Direction)
-	?isRecognizedByRds@RadioHistoryItem@@QBE_NXZ @ 249 NONAME ; bool RadioHistoryItem::isRecognizedByRds(void) const
-	?setFavorites@RadioStationModel@@QAEXABV?$QList@VQModelIndex@@@@@Z @ 250 NONAME ; void RadioStationModel::setFavorites(class QList<class QModelIndex> const &)
-	?setArtist@RadioHistoryItem@@QAEXABVQString@@@Z @ 251 NONAME ; void RadioHistoryItem::setArtist(class QString const &)
-	??_ERadioStationModel@@UAE@I@Z @ 252 NONAME ; RadioStationModel::~RadioStationModel(unsigned int)
-	?setTitle@RadioHistoryItem@@QAEXABVQString@@@Z @ 253 NONAME ; void RadioHistoryItem::setTitle(class QString const &)
-
--- a/radioapp/bwins/fmradiowidgetsu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,133 +0,0 @@
-EXPORTS
-	?trUtf8@RadioWindow@@SA?AVQString@@PBD0H@Z @ 1 NONAME ; class QString RadioWindow::trUtf8(char const *, char const *, int)
-	?nextIndex@RadioStationCarousel@@AAEHH@Z @ 2 NONAME ; int RadioStationCarousel::nextIndex(int)
-	?stationsInRange@RadioFrequencyStrip@@EBE?AV?$QList@UStationMarker@FrequencyStrip@@@@II@Z @ 3 NONAME ; class QList<struct FrequencyStrip::StationMarker> RadioFrequencyStrip::stationsInRange(unsigned int, unsigned int) const
-	?scrollToIndex@RadioStationCarousel@@AAEXHW4Direction@Scroll@@V?$QFlags@W4ScrollFlag@RadioStationCarousel@@@@@Z @ 4 NONAME ; void RadioStationCarousel::scrollToIndex(int, enum Scroll::Direction, class QFlags<enum RadioStationCarousel::ScrollFlag>)
-	?drawOffScreen@RadioStationCarousel@@QAEXAAVQPainter@@@Z @ 5 NONAME ; void RadioStationCarousel::drawOffScreen(class QPainter &)
-	?qt_metacast@RadioFadingLabel@@UAEPAXPBD@Z @ 6 NONAME ; void * RadioFadingLabel::qt_metacast(char const *)
-	?findStation@RadioStationCarousel@@EAE?AVRadioStation@@I@Z @ 7 NONAME ; class RadioStation RadioStationCarousel::findStation(unsigned int)
-	?animateNewStation@RadioStationCarousel@@QAEXABVRadioStation@@@Z @ 8 NONAME ; void RadioStationCarousel::animateNewStation(class RadioStation const &)
-	?nonFavoriteIcon@RadioStationCarousel@@UBE?AVHbIcon@@XZ @ 9 NONAME ; class HbIcon RadioStationCarousel::nonFavoriteIcon(void) const
-	?gestureEvent@RadioStationCarousel@@EAEXPAVQGestureEvent@@@Z @ 10 NONAME ; void RadioStationCarousel::gestureEvent(class QGestureEvent *)
-	?setFavoriteIcon@RadioStationCarousel@@QAEXABVHbIcon@@@Z @ 11 NONAME ; void RadioStationCarousel::setFavoriteIcon(class HbIcon const &)
-	?update@RadioStationCarousel@@AAEXABVRadioStation@@@Z @ 12 NONAME ; void RadioStationCarousel::update(class RadioStation const &)
-	?trUtf8@RadioFadingLabel@@SA?AVQString@@PBD0@Z @ 13 NONAME ; class QString RadioFadingLabel::trUtf8(char const *, char const *)
-	?handleUrlClicked@RadioStationCarousel@@EAEXABVRadioStation@@@Z @ 14 NONAME ; void RadioStationCarousel::handleUrlClicked(class RadioStation const &)
-	?skipRequested@RadioStationCarousel@@IAEXH@Z @ 15 NONAME ; void RadioStationCarousel::skipRequested(int)
-	?setTextWithoutFading@RadioFadingLabel@@QAEXABVQString@@@Z @ 16 NONAME ; void RadioFadingLabel::setTextWithoutFading(class QString const &)
-	?updateAntennaStatus@RadioWindow@@AAEX_N@Z @ 17 NONAME ; void RadioWindow::updateAntennaStatus(bool)
-	?handleIconClicked@RadioStationCarousel@@EAEXABVRadioStation@@@Z @ 18 NONAME ; void RadioStationCarousel::handleIconClicked(class RadioStation const &)
-	?init@RadioFrequencyStrip@@QAEXPAVRadioUiEngine@@AAVRadioUiLoader@@@Z @ 19 NONAME ; void RadioFrequencyStrip::init(class RadioUiEngine *, class RadioUiLoader &)
-	?qt_metacall@RadioStationCarousel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 20 NONAME ; int RadioStationCarousel::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?isInitialized@RadioStationCarousel@@ABE_NXZ @ 21 NONAME ; bool RadioStationCarousel::isInitialized(void) const
-	?init@RadioStationCarousel@@QAEXAAVRadioUiLoader@@PAVRadioUiEngine@@@Z @ 22 NONAME ; void RadioStationCarousel::init(class RadioUiLoader &, class RadioUiEngine *)
-	?scrollPosChanged@RadioStationCarousel@@AAEXABVQPointF@@@Z @ 23 NONAME ; void RadioStationCarousel::scrollPosChanged(class QPointF const &)
-	?frequencyChanged@RadioFrequencyStrip@@IAEXIHH@Z @ 24 NONAME ; void RadioFrequencyStrip::frequencyChanged(unsigned int, int, int)
-	?setAutoScrollTime@RadioStationCarousel@@QAEXH@Z @ 25 NONAME ; void RadioStationCarousel::setAutoScrollTime(int)
-	?prevIndex@RadioStationCarousel@@AAEHH@Z @ 26 NONAME ; int RadioStationCarousel::prevIndex(int)
-	?skipToPreviousFavorite@RadioFrequencyStrip@@EAEXXZ @ 27 NONAME ; void RadioFrequencyStrip::skipToPreviousFavorite(void)
-	?trUtf8@RadioStationCarousel@@SA?AVQString@@PBD0@Z @ 28 NONAME ; class QString RadioStationCarousel::trUtf8(char const *, char const *)
-	?tr@RadioStationCarousel@@SA?AVQString@@PBD0@Z @ 29 NONAME ; class QString RadioStationCarousel::tr(char const *, char const *)
-	?skip@RadioStationCarousel@@AAEXW4Mode@StationSkip@@@Z @ 30 NONAME ; void RadioStationCarousel::skip(enum StationSkip::Mode)
-	?emitFrequencyChanged@RadioFrequencyStrip@@EAEXIHH@Z @ 31 NONAME ; void RadioFrequencyStrip::emitFrequencyChanged(unsigned int, int, int)
-	?isScanning@RadioFrequencyStrip@@EBE_NXZ @ 32 NONAME ; bool RadioFrequencyStrip::isScanning(void) const
-	??1RadioWindow@@UAE@XZ @ 33 NONAME ; RadioWindow::~RadioWindow(void)
-	?skipRequested@RadioFrequencyStrip@@IAEXH@Z @ 34 NONAME ; void RadioFrequencyStrip::skipRequested(int)
-	?setText@RadioFadingLabel@@QAEXABVQString@@@Z @ 35 NONAME ; void RadioFadingLabel::setText(class QString const &)
-	?showEvent@RadioStationCarousel@@EAEXPAVQShowEvent@@@Z @ 36 NONAME ; void RadioStationCarousel::showEvent(class QShowEvent *)
-	?mousePressEvent@RadioStationCarousel@@EAEXPAVQGraphicsSceneMouseEvent@@@Z @ 37 NONAME ; void RadioStationCarousel::mousePressEvent(class QGraphicsSceneMouseEvent *)
-	?trUtf8@RadioFrequencyStrip@@SA?AVQString@@PBD0@Z @ 38 NONAME ; class QString RadioFrequencyStrip::trUtf8(char const *, char const *)
-	?activateView@RadioWindow@@AAEXPAVRadioViewBase@@ABVQString@@V?$QFlags@W4ViewSwitchFlag@Hb@@@@@Z @ 39 NONAME ; void RadioWindow::activateView(class RadioViewBase *, class QString const &, class QFlags<enum Hb::ViewSwitchFlag>)
-	?calculateDifference@RadioStationCarousel@@AAEHHAAW4Direction@Scroll@@@Z @ 40 NONAME ; int RadioStationCarousel::calculateDifference(int, enum Scroll::Direction &)
-	?orientationSection@RadioWindow@@QAE?AVQString@@XZ @ 41 NONAME ; class QString RadioWindow::orientationSection(void)
-	??1RadioFrequencyStrip@@UAE@XZ @ 42 NONAME ; RadioFrequencyStrip::~RadioFrequencyStrip(void)
-	?cancelAnimation@RadioStationCarousel@@QAEXXZ @ 43 NONAME ; void RadioStationCarousel::cancelAnimation(void)
-	?staticMetaObject@RadioStationCarousel@@2UQMetaObject@@B @ 44 NONAME ; struct QMetaObject const RadioStationCarousel::staticMetaObject
-	?skipToPrevious@RadioFrequencyStrip@@EAEXXZ @ 45 NONAME ; void RadioFrequencyStrip::skipToPrevious(void)
-	?qt_metacall@RadioFadingLabel@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 46 NONAME ; int RadioFadingLabel::qt_metacall(enum QMetaObject::Call, int, void * *)
-	??0RadioFrequencyStrip@@QAE@XZ @ 47 NONAME ; RadioFrequencyStrip::RadioFrequencyStrip(void)
-	?setCenterIndex@RadioStationCarousel@@AAEXHV?$QFlags@W4ScrollFlag@RadioStationCarousel@@@@@Z @ 48 NONAME ; void RadioStationCarousel::setCenterIndex(int, class QFlags<enum RadioStationCarousel::ScrollFlag>)
-	?resizeEvent@RadioStationCarousel@@EAEXPAVQGraphicsSceneResizeEvent@@@Z @ 49 NONAME ; void RadioStationCarousel::resizeEvent(class QGraphicsSceneResizeEvent *)
-	?updateStations@RadioStationCarousel@@AAEXXZ @ 50 NONAME ; void RadioStationCarousel::updateStations(void)
-	??_ERadioWindow@@UAE@I@Z @ 51 NONAME ; RadioWindow::~RadioWindow(unsigned int)
-	?tr@RadioFrequencyStrip@@SA?AVQString@@PBD0@Z @ 52 NONAME ; class QString RadioFrequencyStrip::tr(char const *, char const *)
-	?metaObject@RadioFrequencyStrip@@UBEPBUQMetaObject@@XZ @ 53 NONAME ; struct QMetaObject const * RadioFrequencyStrip::metaObject(void) const
-	?qt_metacall@RadioFrequencyStrip@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 54 NONAME ; int RadioFrequencyStrip::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?qt_metacall@RadioWindow@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 55 NONAME ; int RadioWindow::qt_metacall(enum QMetaObject::Call, int, void * *)
-	?startEffect@RadioFadingLabel@@AAEXABVQString@@PBD@Z @ 56 NONAME ; void RadioFadingLabel::startEffect(class QString const &, char const *)
-	?seekDown@RadioFrequencyStrip@@EAEXXZ @ 57 NONAME ; void RadioFrequencyStrip::seekDown(void)
-	?activateHistoryView@RadioWindow@@QAEXXZ @ 58 NONAME ; void RadioWindow::activateHistoryView(void)
-	??_ERadioStationCarousel@@UAE@I@Z @ 59 NONAME ; RadioStationCarousel::~RadioStationCarousel(unsigned int)
-	?tr@RadioFadingLabel@@SA?AVQString@@PBD0@Z @ 60 NONAME ; class QString RadioFadingLabel::tr(char const *, char const *)
-	?getStaticMetaObject@RadioFadingLabel@@SAABUQMetaObject@@XZ @ 61 NONAME ; struct QMetaObject const & RadioFadingLabel::getStaticMetaObject(void)
-	?setManualSeekMode@RadioStationCarousel@@QAEX_N@Z @ 62 NONAME ; void RadioStationCarousel::setManualSeekMode(bool)
-	?qt_metacast@RadioWindow@@UAEPAXPBD@Z @ 63 NONAME ; void * RadioWindow::qt_metacast(char const *)
-	?trimHtml@RadioFadingLabel@@AAE?AVQString@@ABV2@@Z @ 64 NONAME ; class QString RadioFadingLabel::trimHtml(class QString const &)
-	?tr@RadioWindow@@SA?AVQString@@PBD0@Z @ 65 NONAME ; class QString RadioWindow::tr(char const *, char const *)
-	?favoriteIcon@RadioStationCarousel@@UBE?AVHbIcon@@XZ @ 66 NONAME ; class HbIcon RadioStationCarousel::favoriteIcon(void) const
-	?getStaticMetaObject@RadioFrequencyStrip@@SAABUQMetaObject@@XZ @ 67 NONAME ; struct QMetaObject const & RadioFrequencyStrip::getStaticMetaObject(void)
-	?showErrorMessage@RadioWindow@@QAEXABVQString@@@Z @ 68 NONAME ; void RadioWindow::showErrorMessage(class QString const &)
-	??0RadioFadingLabel@@QAE@PAVQGraphicsItem@@@Z @ 69 NONAME ; RadioFadingLabel::RadioFadingLabel(class QGraphicsItem *)
-	?isInManualSeek@RadioStationCarousel@@EBE_NXZ @ 70 NONAME ; bool RadioStationCarousel::isInManualSeek(void) const
-	??1RadioStationCarousel@@UAE@XZ @ 71 NONAME ; RadioStationCarousel::~RadioStationCarousel(void)
-	?isInitialized@RadioFrequencyStrip@@EBE_NXZ @ 72 NONAME ; bool RadioFrequencyStrip::isInitialized(void) const
-	??_ERadioFrequencyStrip@@UAE@I@Z @ 73 NONAME ; RadioFrequencyStrip::~RadioFrequencyStrip(unsigned int)
-	?setFadingEnabled@RadioFadingLabel@@QAEX_N@Z @ 74 NONAME ; void RadioFadingLabel::setFadingEnabled(bool)
-	?localizeGenre@RadioStationCarousel@@EAE?AVQString@@H@Z @ 75 NONAME ; class QString RadioStationCarousel::localizeGenre(int)
-	?showVolumeLevel@RadioWindow@@AAEXH@Z @ 76 NONAME ; void RadioWindow::showVolumeLevel(int)
-	?getStaticMetaObject@RadioWindow@@SAABUQMetaObject@@XZ @ 77 NONAME ; struct QMetaObject const & RadioWindow::getStaticMetaObject(void)
-	?handleRadiotextClicked@RadioStationCarousel@@EAEXABVRadioStation@@@Z @ 78 NONAME ; void RadioStationCarousel::handleRadiotextClicked(class RadioStation const &)
-	?timerFired@RadioStationCarousel@@AAEXXZ @ 79 NONAME ; void RadioStationCarousel::timerFired(void)
-	?trUtf8@RadioWindow@@SA?AVQString@@PBD0@Z @ 80 NONAME ; class QString RadioWindow::trUtf8(char const *, char const *)
-	?seekUp@RadioFrequencyStrip@@EAEXXZ @ 81 NONAME ; void RadioFrequencyStrip::seekUp(void)
-	??0RadioWindow@@QAE@PAVQWidget@@@Z @ 82 NONAME ; RadioWindow::RadioWindow(class QWidget *)
-	?tr@RadioFadingLabel@@SA?AVQString@@PBD0H@Z @ 83 NONAME ; class QString RadioFadingLabel::tr(char const *, char const *, int)
-	?updateRadioText@RadioStationCarousel@@AAEXABVRadioStation@@@Z @ 84 NONAME ; void RadioStationCarousel::updateRadioText(class RadioStation const &)
-	?updateAntennaStatus@RadioStationCarousel@@QAEX_N@Z @ 85 NONAME ; void RadioStationCarousel::updateAntennaStatus(bool)
-	?setFrequency@RadioStationCarousel@@QAEXIHW4Direction@Scroll@@@Z @ 86 NONAME ; void RadioStationCarousel::setFrequency(unsigned int, int, enum Scroll::Direction)
-	?setInfoText@RadioStationCarousel@@QAEXW4Type@CarouselInfoText@@@Z @ 87 NONAME ; void RadioStationCarousel::setInfoText(enum CarouselInfoText::Type)
-	?staticMetaObject@RadioFadingLabel@@2UQMetaObject@@B @ 88 NONAME ; struct QMetaObject const RadioFadingLabel::staticMetaObject
-	?tr@RadioFrequencyStrip@@SA?AVQString@@PBD0H@Z @ 89 NONAME ; class QString RadioFrequencyStrip::tr(char const *, char const *, int)
-	?trUtf8@RadioFrequencyStrip@@SA?AVQString@@PBD0H@Z @ 90 NONAME ; class QString RadioFrequencyStrip::trUtf8(char const *, char const *, int)
-	?getStaticMetaObject@RadioStationCarousel@@SAABUQMetaObject@@XZ @ 91 NONAME ; struct QMetaObject const & RadioStationCarousel::getStaticMetaObject(void)
-	?metaObject@RadioFadingLabel@@UBEPBUQMetaObject@@XZ @ 92 NONAME ; struct QMetaObject const * RadioFadingLabel::metaObject(void) const
-	?metaObject@RadioWindow@@UBEPBUQMetaObject@@XZ @ 93 NONAME ; struct QMetaObject const * RadioWindow::metaObject(void) const
-	?staticMetaObject@RadioFrequencyStrip@@2UQMetaObject@@B @ 94 NONAME ; struct QMetaObject const RadioFrequencyStrip::staticMetaObject
-	?autoScrollTime@RadioStationCarousel@@QBEHXZ @ 95 NONAME ; int RadioStationCarousel::autoScrollTime(void) const
-	?qt_metacast@RadioStationCarousel@@UAEPAXPBD@Z @ 96 NONAME ; void * RadioStationCarousel::qt_metacast(char const *)
-	?skipToNextFavorite@RadioFrequencyStrip@@EAEXXZ @ 97 NONAME ; void RadioFrequencyStrip::skipToNextFavorite(void)
-	?tr@RadioWindow@@SA?AVQString@@PBD0H@Z @ 98 NONAME ; class QString RadioWindow::tr(char const *, char const *, int)
-	?seekRequested@RadioFrequencyStrip@@IAEXH@Z @ 99 NONAME ; void RadioFrequencyStrip::seekRequested(int)
-	??0RadioStationCarousel@@QAE@PAVQGraphicsItem@@@Z @ 100 NONAME ; RadioStationCarousel::RadioStationCarousel(class QGraphicsItem *)
-	?adjustAfterScroll@RadioStationCarousel@@AAEXXZ @ 101 NONAME ; void RadioStationCarousel::adjustAfterScroll(void)
-	?metaObject@RadioStationCarousel@@UBEPBUQMetaObject@@XZ @ 102 NONAME ; struct QMetaObject const * RadioStationCarousel::metaObject(void) const
-	?effectFinished@RadioFadingLabel@@AAEXUEffectStatus@HbEffect@@@Z @ 103 NONAME ; void RadioFadingLabel::effectFinished(struct HbEffect::EffectStatus)
-	?skipToNext@RadioFrequencyStrip@@EAEXXZ @ 104 NONAME ; void RadioFrequencyStrip::skipToNext(void)
-	?updateOrientation@RadioWindow@@AAEXW4Orientation@Qt@@@Z @ 105 NONAME ; void RadioWindow::updateOrientation(enum Qt::Orientation)
-	?activateMainView@RadioWindow@@QAEXXZ @ 106 NONAME ; void RadioWindow::activateMainView(void)
-	?trUtf8@RadioFadingLabel@@SA?AVQString@@PBD0H@Z @ 107 NONAME ; class QString RadioFadingLabel::trUtf8(char const *, char const *, int)
-	?uiEngine@RadioStationCarousel@@QAEPAVRadioUiEngine@@XZ @ 108 NONAME ; class RadioUiEngine * RadioStationCarousel::uiEngine(void)
-	?setLandscape@RadioStationCarousel@@QAEX_N@Z @ 109 NONAME ; void RadioStationCarousel::setLandscape(bool)
-	?setScanningMode@RadioStationCarousel@@QAEX_N@Z @ 110 NONAME ; void RadioStationCarousel::setScanningMode(bool)
-	??1RadioFadingLabel@@UAE@XZ @ 111 NONAME ; RadioFadingLabel::~RadioFadingLabel(void)
-	?setNonFavoriteIcon@RadioStationCarousel@@QAEXABVHbIcon@@@Z @ 112 NONAME ; void RadioStationCarousel::setNonFavoriteIcon(class HbIcon const &)
-	?isInScanningMode@RadioStationCarousel@@QBE_NXZ @ 113 NONAME ; bool RadioStationCarousel::isInScanningMode(void) const
-	?isAntennaAttached@RadioStationCarousel@@QBE_NXZ @ 114 NONAME ; bool RadioStationCarousel::isAntennaAttached(void) const
-	?activateStationsView@RadioWindow@@QAEXXZ @ 115 NONAME ; void RadioWindow::activateStationsView(void)
-	?tr@RadioStationCarousel@@SA?AVQString@@PBD0H@Z @ 116 NONAME ; class QString RadioStationCarousel::tr(char const *, char const *, int)
-	?setFrequency@RadioFrequencyStrip@@UAEXIHW4Direction@Scroll@@@Z @ 117 NONAME ; void RadioFrequencyStrip::setFrequency(unsigned int, int, enum Scroll::Direction)
-	?frequencyChanged@RadioStationCarousel@@IAEXIHH@Z @ 118 NONAME ; void RadioStationCarousel::frequencyChanged(unsigned int, int, int)
-	?trimIndex@RadioStationCarousel@@AAEHH@Z @ 119 NONAME ; int RadioStationCarousel::trimIndex(int)
-	?initView@RadioWindow@@AAEXXZ @ 120 NONAME ; void RadioWindow::initView(void)
-	?trUtf8@RadioStationCarousel@@SA?AVQString@@PBD0H@Z @ 121 NONAME ; class QString RadioStationCarousel::trUtf8(char const *, char const *, int)
-	??_ERadioFadingLabel@@UAE@I@Z @ 122 NONAME ; RadioFadingLabel::~RadioFadingLabel(unsigned int)
-	?init@RadioWindow@@QAEXXZ @ 123 NONAME ; void RadioWindow::init(void)
-	?isScrollingAllowed@RadioStationCarousel@@ABE_NXZ @ 124 NONAME ; bool RadioStationCarousel::isScrollingAllowed(void) const
-	?qt_metacast@RadioFrequencyStrip@@UAEPAXPBD@Z @ 125 NONAME ; void * RadioFrequencyStrip::qt_metacast(char const *)
-	?staticMetaObject@RadioWindow@@2UQMetaObject@@B @ 126 NONAME ; struct QMetaObject const RadioWindow::staticMetaObject
-	?cleanRdsData@RadioStationCarousel@@QAEXXZ @ 127 NONAME ; void RadioStationCarousel::cleanRdsData(void)
-	?clearInfoText@RadioStationCarousel@@QAEXXZ @ 128 NONAME ; void RadioStationCarousel::clearInfoText(void)
-	?adjustPos@RadioStationCarousel@@AAEXH@Z @ 129 NONAME ; void RadioStationCarousel::adjustPos(int)
-	?frequencyAtIndex@RadioFrequencyStrip@@EBEIH@Z @ 130 NONAME ; unsigned int RadioFrequencyStrip::frequencyAtIndex(int) const
-	?scanAnimationFinished@RadioStationCarousel@@IAEXXZ @ 131 NONAME ; void RadioStationCarousel::scanAnimationFinished(void)
-
--- a/radioapp/eabi/fmradioenginewrapperu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +0,0 @@
-EXPORTS
-	_ZN11RadioLogger18initCombinedLoggerEv @ 1 NONAME
-	_ZN11RadioLogger21releaseCombinedLoggerEv @ 2 NONAME
-	_ZN11RadioLogger6logMsgEPKcNS_4ModeE @ 3 NONAME
-	_ZN12MethodLoggerC1EPKcS1_ @ 4 NONAME
-	_ZN12MethodLoggerC2EPKcS1_ @ 5 NONAME
-	_ZN12MethodLoggerD1Ev @ 6 NONAME
-	_ZN12MethodLoggerD2Ev @ 7 NONAME
-	_ZN18RadioEngineWrapper11addObserverEP26RadioEngineWrapperObserver @ 8 NONAME
-	_ZN18RadioEngineWrapper12setFrequencyEji @ 9 NONAME
-	_ZN18RadioEngineWrapper12startSeekingEN4Seek9DirectionEi @ 10 NONAME
-	_ZN18RadioEngineWrapper13cancelSeekingEv @ 11 NONAME
-	_ZN18RadioEngineWrapper13setRdsEnabledEb @ 12 NONAME
-	_ZN18RadioEngineWrapper14decreaseVolumeEv @ 13 NONAME
-	_ZN18RadioEngineWrapper14increaseVolumeEv @ 14 NONAME
-	_ZN18RadioEngineWrapper14removeObserverEP26RadioEngineWrapperObserver @ 15 NONAME
-	_ZN18RadioEngineWrapper16toggleAudioRouteEv @ 16 NONAME
-	_ZN18RadioEngineWrapper17setManualSeekModeEb @ 17 NONAME
-	_ZN18RadioEngineWrapper4initEv @ 18 NONAME
-	_ZN18RadioEngineWrapper7setMuteEbb @ 19 NONAME
-	_ZN18RadioEngineWrapper8settingsEv @ 20 NONAME
-	_ZN18RadioEngineWrapper9setVolumeEi @ 21 NONAME
-	_ZN18RadioEngineWrapperC1ER21RadioStationHandlerIf @ 22 NONAME
-	_ZN18RadioEngineWrapperC2ER21RadioStationHandlerIf @ 23 NONAME
-	_ZN18RadioEngineWrapperD1Ev @ 24 NONAME
-	_ZN18RadioEngineWrapperD2Ev @ 25 NONAME
-	_ZN26RadioEngineWrapperObserver11muteChangedEb @ 26 NONAME
-	_ZN26RadioEngineWrapperObserver12skipPreviousEv @ 27 NONAME
-	_ZN26RadioEngineWrapperObserver13volumeChangedEi @ 28 NONAME
-	_ZN26RadioEngineWrapperObserver14decreaseVolumeEv @ 29 NONAME
-	_ZN26RadioEngineWrapperObserver14increaseVolumeEv @ 30 NONAME
-	_ZN26RadioEngineWrapperObserver16tunedToFrequencyEji @ 31 NONAME
-	_ZN26RadioEngineWrapperObserver17audioRouteChangedEb @ 32 NONAME
-	_ZN26RadioEngineWrapperObserver18radioStatusChangedEb @ 33 NONAME
-	_ZN26RadioEngineWrapperObserver20antennaStatusChangedEb @ 34 NONAME
-	_ZN26RadioEngineWrapperObserver22rdsAvailabilityChangedEb @ 35 NONAME
-	_ZN26RadioEngineWrapperObserver8skipNextEv @ 36 NONAME
-	_ZNK18RadioEngineWrapper12maxFrequencyEv @ 37 NONAME
-	_ZNK18RadioEngineWrapper12minFrequencyEv @ 38 NONAME
-	_ZNK18RadioEngineWrapper16currentFrequencyEv @ 39 NONAME
-	_ZNK18RadioEngineWrapper16isFrequencyValidEj @ 40 NONAME
-	_ZNK18RadioEngineWrapper17frequencyStepSizeEv @ 41 NONAME
-	_ZNK18RadioEngineWrapper17isAntennaAttachedEv @ 42 NONAME
-	_ZNK18RadioEngineWrapper18isInManualSeekModeEv @ 43 NONAME
-	_ZNK18RadioEngineWrapper18isUsingLoudspeakerEv @ 44 NONAME
-	_ZNK18RadioEngineWrapper6regionEv @ 45 NONAME
-	_ZNK18RadioEngineWrapper7isMutedEv @ 46 NONAME
-	_ZNK18RadioEngineWrapper9isRadioOnEv @ 47 NONAME
-	_ZTI26RadioEngineWrapperObserver @ 48 NONAME
-	_ZTV26RadioEngineWrapperObserver @ 49 NONAME
-
--- a/radioapp/eabi/fmradiopresetstorageu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,14 +0,0 @@
-EXPORTS
-	_ZN18RadioPresetStorage10readPresetEiR14RadioStationIf @ 1 NONAME
-	_ZN18RadioPresetStorage10savePresetERK14RadioStationIf @ 2 NONAME
-	_ZN18RadioPresetStorage12deletePresetEi @ 3 NONAME
-	_ZN18RadioPresetStorageC1Ev @ 4 NONAME
-	_ZN18RadioPresetStorageC2Ev @ 5 NONAME
-	_ZN18RadioPresetStorageD1Ev @ 6 NONAME
-	_ZN18RadioPresetStorageD2Ev @ 7 NONAME
-	_ZNK18RadioPresetStorage10nextPresetEi @ 8 NONAME
-	_ZNK18RadioPresetStorage11firstPresetEv @ 9 NONAME
-	_ZNK18RadioPresetStorage11presetCountEv @ 10 NONAME
-	_ZNK18RadioPresetStorage18maxNumberOfPresetsEv @ 11 NONAME
-	_ZN18RadioPresetStorage15readFrequenciesER5QListIjE @ 12 NONAME
-
--- a/radioapp/eabi/fmradiouiengineu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,249 +0,0 @@
-EXPORTS
-	_ZN12RadioStation11setFavoriteEb @ 1 NONAME
-	_ZN12RadioStation12callSignCharEj @ 2 NONAME
-	_ZN12RadioStation12setFrequencyEj @ 3 NONAME
-	_ZN12RadioStation12setRadioTextERK7QString @ 4 NONAME
-	_ZN12RadioStation14callSignStringEj @ 5 NONAME
-	_ZN12RadioStation14parseFrequencyEj @ 6 NONAME
-	_ZN12RadioStation14setChangeFlagsE6QFlagsINS_10ChangeFlagEE @ 7 NONAME
-	_ZN12RadioStation14setPresetIndexEi @ 8 NONAME
-	_ZN12RadioStation15iterateCallSignEii @ 9 NONAME
-	_ZN12RadioStation16piCodeToCallSignEj @ 10 NONAME
-	_ZN12RadioStation16resetChangeFlagsEv @ 11 NONAME
-	_ZN12RadioStation16setDynamicPsTextERK7QString @ 12 NONAME
-	_ZN12RadioStation16setRadioTextPlusEiRK7QString @ 13 NONAME
-	_ZN12RadioStation18setUserDefinedNameERK7QString @ 14 NONAME
-	_ZN12RadioStation5resetEv @ 15 NONAME
-	_ZN12RadioStation6setUrlERK7QString @ 16 NONAME
-	_ZN12RadioStation7setNameERK7QString @ 17 NONAME
-	_ZN12RadioStation7setTypeE6QFlagsINS_8TypeFlagEE @ 18 NONAME
-	_ZN12RadioStation8setGenreEi @ 19 NONAME
-	_ZN12RadioStation9setPiCodeEiN11RadioRegion6RegionE @ 20 NONAME
-	_ZN12RadioStation9setPsTypeE6QFlagsINS_10PsTypeFlagEE @ 21 NONAME
-	_ZN12RadioStation9unsetTypeE6QFlagsINS_8TypeFlagEE @ 22 NONAME
-	_ZN12RadioStationC1ERKS_ @ 23 NONAME
-	_ZN12RadioStationC1Eij @ 24 NONAME
-	_ZN12RadioStationC1Ev @ 25 NONAME
-	_ZN12RadioStationC2ERKS_ @ 26 NONAME
-	_ZN12RadioStationC2Eij @ 27 NONAME
-	_ZN12RadioStationC2Ev @ 28 NONAME
-	_ZN12RadioStationD0Ev @ 29 NONAME
-	_ZN12RadioStationD1Ev @ 30 NONAME
-	_ZN12RadioStationD2Ev @ 31 NONAME
-	_ZN12RadioStationaSERKS_ @ 32 NONAME
-	_ZN13RadioUiEngine10lastVolumeEv @ 33 NONAME
-	_ZN13RadioUiEngine10setPowerOnEv @ 34 NONAME
-	_ZN13RadioUiEngine10toggleMuteEv @ 35 NONAME
-	_ZN13RadioUiEngine11muteChangedEb @ 36 NONAME
-	_ZN13RadioUiEngine11qt_metacallEN11QMetaObject4CallEiPPv @ 37 NONAME
-	_ZN13RadioUiEngine11qt_metacastEPKc @ 38 NONAME
-	_ZN13RadioUiEngine11seekStationEi @ 39 NONAME
-	_ZN13RadioUiEngine11setPowerOffEi @ 40 NONAME
-	_ZN13RadioUiEngine11skipStationEN11StationSkip4ModeEji @ 41 NONAME
-	_ZN13RadioUiEngine12historyModelEv @ 42 NONAME
-	_ZN13RadioUiEngine12setFrequencyEji @ 43 NONAME
-	_ZN13RadioUiEngine12stationModelEv @ 44 NONAME
-	_ZN13RadioUiEngine13genreToStringEiN11GenreTarget6TargetE @ 45 NONAME
-	_ZN13RadioUiEngine13launchBrowserERK7QString @ 46 NONAME
-	_ZN13RadioUiEngine13scannerEngineEv @ 47 NONAME
-	_ZN13RadioUiEngine13volumeChangedEi @ 48 NONAME
-	_ZN13RadioUiEngine14openMusicStoreERK16RadioHistoryItemNS_10MusicStoreE @ 49 NONAME
-	_ZN13RadioUiEngine14seekingStartedEi @ 50 NONAME
-	_ZN13RadioUiEngine15emitMuteChangedEb @ 51 NONAME
-	_ZN13RadioUiEngine15stationsInRangeEjj @ 52 NONAME
-	_ZN13RadioUiEngine16isFirstTimeStartEv @ 53 NONAME
-	_ZN13RadioUiEngine16staticMetaObjectE @ 54 NONAME DATA 16
-	_ZN13RadioUiEngine16toggleAudioRouteEv @ 55 NONAME
-	_ZN13RadioUiEngine16tunedToFrequencyEji @ 56 NONAME
-	_ZN13RadioUiEngine17addRecognizedSongERK7QStringS2_RK12RadioStation @ 57 NONAME
-	_ZN13RadioUiEngine17audioRouteChangedEb @ 58 NONAME
-	_ZN13RadioUiEngine17emitVolumeChangedEi @ 59 NONAME
-	_ZN13RadioUiEngine17launchRadioServerEv @ 60 NONAME
-	_ZN13RadioUiEngine17powerOffRequestedEv @ 61 NONAME
-	_ZN13RadioUiEngine17setManualSeekModeEb @ 62 NONAME
-	_ZN13RadioUiEngine18emitSeekingStartedEN4Seek9DirectionE @ 63 NONAME
-	_ZN13RadioUiEngine18lastTunedFrequencyEj @ 64 NONAME
-	_ZN13RadioUiEngine18radioStatusChangedEb @ 65 NONAME
-	_ZN13RadioUiEngine19createScannerEngineEv @ 66 NONAME
-	_ZN13RadioUiEngine19getStaticMetaObjectEv @ 67 NONAME
-	_ZN13RadioUiEngine20antennaStatusChangedEb @ 68 NONAME
-	_ZN13RadioUiEngine20emitTunedToFrequencyEji @ 69 NONAME
-	_ZN13RadioUiEngine21emitAudioRouteChangedEb @ 70 NONAME
-	_ZN13RadioUiEngine21launchSongRecognitionEv @ 71 NONAME
-	_ZN13RadioUiEngine22emitRadioStatusChangedEb @ 72 NONAME
-	_ZN13RadioUiEngine22rdsAvailabilityChangedEb @ 73 NONAME
-	_ZN13RadioUiEngine24emitAntennaStatusChangedEb @ 74 NONAME
-	_ZN13RadioUiEngine26emitRdsAvailabilityChangedEb @ 75 NONAME
-	_ZN13RadioUiEngine26setFirstTimeStartPerformedEb @ 76 NONAME
-	_ZN13RadioUiEngine29isSongRecognitionAppAvailableEv @ 77 NONAME
-	_ZN13RadioUiEngine4initEv @ 78 NONAME
-	_ZN13RadioUiEngine7setMuteEb @ 79 NONAME
-	_ZN13RadioUiEngine8settingsEv @ 80 NONAME
-	_ZN13RadioUiEngine9setVolumeEi @ 81 NONAME
-	_ZN13RadioUiEngineC1EP7QObject @ 82 NONAME
-	_ZN13RadioUiEngineC2EP7QObject @ 83 NONAME
-	_ZN13RadioUiEngineD0Ev @ 84 NONAME
-	_ZN13RadioUiEngineD1Ev @ 85 NONAME
-	_ZN13RadioUiEngineD2Ev @ 86 NONAME
-	_ZN16RadioHistoryItem10setStationERK7QString @ 87 NONAME
-	_ZN16RadioHistoryItem12setFrequencyEj @ 88 NONAME
-	_ZN16RadioHistoryItem14setCurrentTimeEv @ 89 NONAME
-	_ZN16RadioHistoryItem5resetEv @ 90 NONAME
-	_ZN16RadioHistoryItem8setTitleERK7QString @ 91 NONAME
-	_ZN16RadioHistoryItem9setArtistERK7QString @ 92 NONAME
-	_ZN16RadioHistoryItemC1ERK7QStringS2_ @ 93 NONAME
-	_ZN16RadioHistoryItemC1ERKS_ @ 94 NONAME
-	_ZN16RadioHistoryItemC1Ev @ 95 NONAME
-	_ZN16RadioHistoryItemC2ERK7QStringS2_ @ 96 NONAME
-	_ZN16RadioHistoryItemC2ERKS_ @ 97 NONAME
-	_ZN16RadioHistoryItemC2Ev @ 98 NONAME
-	_ZN16RadioHistoryItemD1Ev @ 99 NONAME
-	_ZN16RadioHistoryItemD2Ev @ 100 NONAME
-	_ZN16RadioHistoryItemaSERKS_ @ 101 NONAME
-	_ZN17RadioHistoryModel11qt_metacallEN11QMetaObject4CallEiPPv @ 102 NONAME
-	_ZN17RadioHistoryModel11qt_metacastEPKc @ 103 NONAME
-	_ZN17RadioHistoryModel13emitItemAddedEv @ 104 NONAME
-	_ZN17RadioHistoryModel13setShowTaggedEb @ 105 NONAME
-	_ZN17RadioHistoryModel13toggleTaggingERK16RadioHistoryItemi @ 106 NONAME
-	_ZN17RadioHistoryModel14setShowDetailsEb @ 107 NONAME
-	_ZN17RadioHistoryModel16addRadioTextPlusEiRK7QStringRK12RadioStation @ 108 NONAME
-	_ZN17RadioHistoryModel16currentSongResetEv @ 109 NONAME
-	_ZN17RadioHistoryModel16resetCurrentSongEv @ 110 NONAME
-	_ZN17RadioHistoryModel16staticMetaObjectE @ 111 NONAME DATA 16
-	_ZN17RadioHistoryModel17reportChangedDataEii @ 112 NONAME
-	_ZN17RadioHistoryModel18clearRadioTextPlusEv @ 113 NONAME
-	_ZN17RadioHistoryModel19getStaticMetaObjectEv @ 114 NONAME
-	_ZN17RadioHistoryModel7addItemERK7QStringS2_RK12RadioStation @ 115 NONAME
-	_ZN17RadioHistoryModel8setIconsERK5QIconS2_ @ 116 NONAME
-	_ZN17RadioHistoryModel9itemAddedEv @ 117 NONAME
-	_ZN17RadioHistoryModel9removeAllEb @ 118 NONAME
-	_ZN17RadioHistoryModelC1ER13RadioUiEngine @ 119 NONAME
-	_ZN17RadioHistoryModelC2ER13RadioUiEngine @ 120 NONAME
-	_ZN17RadioHistoryModelD0Ev @ 121 NONAME
-	_ZN17RadioHistoryModelD1Ev @ 122 NONAME
-	_ZN17RadioHistoryModelD2Ev @ 123 NONAME
-	_ZN17RadioStationModel10addStationERK12RadioStation @ 124 NONAME
-	_ZN17RadioStationModel10initializeEP18RadioPresetStorageP18RadioEngineWrapper @ 125 NONAME
-	_ZN17RadioStationModel11findClosestEjN11StationSkip4ModeE @ 126 NONAME
-	_ZN17RadioStationModel11qt_metacallEN11QMetaObject4CallEiPPv @ 127 NONAME
-	_ZN17RadioStationModel11qt_metacastEPKc @ 128 NONAME
-	_ZN17RadioStationModel11saveStationER12RadioStation @ 129 NONAME
-	_ZN17RadioStationModel12setFavoritesERK5QListI11QModelIndexE @ 130 NONAME
-	_ZN17RadioStationModel13favoriteCountEv @ 131 NONAME
-	_ZN17RadioStationModel13removeStationERK12RadioStation @ 132 NONAME
-	_ZN17RadioStationModel13renameStationEiRK7QString @ 133 NONAME
-	_ZN17RadioStationModel14currentStationEv @ 134 NONAME
-	_ZN17RadioStationModel15emitDataChangedERK12RadioStation @ 135 NONAME
-	_ZN17RadioStationModel15favoriteChangedERK12RadioStation @ 136 NONAME
-	_ZN17RadioStationModel15findPresetIndexEi @ 137 NONAME
-	_ZN17RadioStationModel15findPresetIndexEiR12RadioStation @ 138 NONAME
-	_ZN17RadioStationModel15stationsInRangeEjj @ 139 NONAME
-	_ZN17RadioStationModel16dynamicPsChangedERK12RadioStation @ 140 NONAME
-	_ZN17RadioStationModel16staticMetaObjectE @ 141 NONAME DATA 16
-	_ZN17RadioStationModel16stationHandlerIfEv @ 142 NONAME
-	_ZN17RadioStationModel17emitChangeSignalsERK12RadioStation6QFlagsINS0_10ChangeFlagEE @ 143 NONAME
-	_ZN17RadioStationModel17radioTextReceivedERK12RadioStation @ 144 NONAME
-	_ZN17RadioStationModel17removeByFrequencyEj @ 145 NONAME
-	_ZN17RadioStationModel18indexFromFrequencyEj @ 146 NONAME
-	_ZN17RadioStationModel18stationDataChangedERK12RadioStation @ 147 NONAME
-	_ZN17RadioStationModel19dynamicPsCheckEndedEv @ 148 NONAME
-	_ZN17RadioStationModel19getStaticMetaObjectEv @ 149 NONAME
-	_ZN17RadioStationModel19removeByPresetIndexEi @ 150 NONAME
-	_ZN17RadioStationModel19setFavoriteByPresetEib @ 151 NONAME
-	_ZN17RadioStationModel21findUnusedPresetIndexEv @ 152 NONAME
-	_ZN17RadioStationModel22setFavoriteByFrequencyEjb @ 153 NONAME
-	_ZN17RadioStationModel7setDataERK11QModelIndexRK8QVarianti @ 154 NONAME
-	_ZN17RadioStationModel8setIconsERK5QIconS2_ @ 155 NONAME
-	_ZN17RadioStationModel9removeAllENS_10RemoveModeE @ 156 NONAME
-	_ZN17RadioStationModel9setDetailE6QFlagsINS_10DetailFlagEE @ 157 NONAME
-	_ZN17RadioStationModelC1ER20RadioUiEnginePrivate @ 158 NONAME
-	_ZN17RadioStationModelC2ER20RadioUiEnginePrivate @ 159 NONAME
-	_ZN17RadioStationModelD0Ev @ 160 NONAME
-	_ZN17RadioStationModelD1Ev @ 161 NONAME
-	_ZN17RadioStationModelD2Ev @ 162 NONAME
-	_ZN18RadioScannerEngine11qt_metacallEN11QMetaObject4CallEiPPv @ 163 NONAME
-	_ZN18RadioScannerEngine11qt_metacastEPKc @ 164 NONAME
-	_ZN18RadioScannerEngine12stationFoundERK12RadioStation @ 165 NONAME
-	_ZN18RadioScannerEngine13startScanningEv @ 166 NONAME
-	_ZN18RadioScannerEngine16continueScanningEv @ 167 NONAME
-	_ZN18RadioScannerEngine16emitStationFoundERK12RadioStation @ 168 NONAME
-	_ZN18RadioScannerEngine16staticMetaObjectE @ 169 NONAME DATA 16
-	_ZN18RadioScannerEngine19addScannedFrequencyEj @ 170 NONAME
-	_ZN18RadioScannerEngine19getStaticMetaObjectEv @ 171 NONAME
-	_ZN18RadioScannerEngine6cancelEv @ 172 NONAME
-	_ZN18RadioScannerEngineC1ER20RadioUiEnginePrivate @ 173 NONAME
-	_ZN18RadioScannerEngineC2ER20RadioUiEnginePrivate @ 174 NONAME
-	_ZN18RadioScannerEngineD0Ev @ 175 NONAME
-	_ZN18RadioScannerEngineD1Ev @ 176 NONAME
-	_ZN18RadioScannerEngineD2Ev @ 177 NONAME
-	_ZNK12RadioStation10hasChangedEv @ 178 NONAME
-	_ZNK12RadioStation10hasSentRdsEv @ 179 NONAME
-	_ZNK12RadioStation10isDetachedEv @ 180 NONAME
-	_ZNK12RadioStation10isFavoriteEv @ 181 NONAME
-	_ZNK12RadioStation11changeFlagsEv @ 182 NONAME
-	_ZNK12RadioStation11presetIndexEv @ 183 NONAME
-	_ZNK12RadioStation13dynamicPsTextEv @ 184 NONAME
-	_ZNK12RadioStation14hasDataChangedE6QFlagsINS_10ChangeFlagEE @ 185 NONAME
-	_ZNK12RadioStation15frequencyStringEv @ 186 NONAME
-	_ZNK12RadioStation3urlEv @ 187 NONAME
-	_ZNK12RadioStation4nameEv @ 188 NONAME
-	_ZNK12RadioStation5genreEv @ 189 NONAME
-	_ZNK12RadioStation6isTypeE6QFlagsINS_8TypeFlagEE @ 190 NONAME
-	_ZNK12RadioStation6piCodeEv @ 191 NONAME
-	_ZNK12RadioStation6psTypeEv @ 192 NONAME
-	_ZNK12RadioStation7isValidEv @ 193 NONAME
-	_ZNK12RadioStation9frequencyEv @ 194 NONAME
-	_ZNK12RadioStation9isRenamedEv @ 195 NONAME
-	_ZNK12RadioStation9radioTextEv @ 196 NONAME
-	_ZNK13RadioUiEngine10isScanningEv @ 197 NONAME
-	_ZNK13RadioUiEngine10metaObjectEv @ 198 NONAME
-	_ZNK13RadioUiEngine12maxFrequencyEv @ 199 NONAME
-	_ZNK13RadioUiEngine12minFrequencyEv @ 200 NONAME
-	_ZNK13RadioUiEngine13isInitializedEv @ 201 NONAME
-	_ZNK13RadioUiEngine13isPoweringOffEv @ 202 NONAME
-	_ZNK13RadioUiEngine16currentFrequencyEv @ 203 NONAME
-	_ZNK13RadioUiEngine17frequencyStepSizeEv @ 204 NONAME
-	_ZNK13RadioUiEngine17isAntennaAttachedEv @ 205 NONAME
-	_ZNK13RadioUiEngine18isInManualSeekModeEv @ 206 NONAME
-	_ZNK13RadioUiEngine18isUsingLoudspeakerEv @ 207 NONAME
-	_ZNK13RadioUiEngine6regionEv @ 208 NONAME
-	_ZNK13RadioUiEngine7isMutedEv @ 209 NONAME
-	_ZNK13RadioUiEngine9isRadioOnEv @ 210 NONAME
-	_ZNK16RadioHistoryItem10isDetachedEv @ 211 NONAME
-	_ZNK16RadioHistoryItem17isRecognizedByRdsEv @ 212 NONAME
-	_ZNK16RadioHistoryItem2idEv @ 213 NONAME
-	_ZNK16RadioHistoryItem4timeEv @ 214 NONAME
-	_ZNK16RadioHistoryItem5titleEv @ 215 NONAME
-	_ZNK16RadioHistoryItem6artistEv @ 216 NONAME
-	_ZNK16RadioHistoryItem7isValidEv @ 217 NONAME
-	_ZNK16RadioHistoryItem7stationEv @ 218 NONAME
-	_ZNK16RadioHistoryItem8isTaggedEv @ 219 NONAME
-	_ZNK16RadioHistoryItem9frequencyEv @ 220 NONAME
-	_ZNK17RadioHistoryModel10metaObjectEv @ 221 NONAME
-	_ZNK17RadioHistoryModel11itemAtIndexERK11QModelIndex @ 222 NONAME
-	_ZNK17RadioHistoryModel23isCurrentSongRecognizedEv @ 223 NONAME
-	_ZNK17RadioHistoryModel4dataERK11QModelIndexi @ 224 NONAME
-	_ZNK17RadioHistoryModel8rowCountERK11QModelIndex @ 225 NONAME
-	_ZNK17RadioStationModel10metaObjectEv @ 226 NONAME
-	_ZNK17RadioStationModel11findStationEjN12FindCriteria8CriteriaE @ 227 NONAME
-	_ZNK17RadioStationModel13findFrequencyEjR12RadioStationN12FindCriteria8CriteriaE @ 228 NONAME
-	_ZNK17RadioStationModel14currentStationEv @ 229 NONAME
-	_ZNK17RadioStationModel4dataERK11QModelIndexi @ 230 NONAME
-	_ZNK17RadioStationModel4listEv @ 231 NONAME
-	_ZNK17RadioStationModel5flagsERK11QModelIndex @ 232 NONAME
-	_ZNK17RadioStationModel8containsEj @ 233 NONAME
-	_ZNK17RadioStationModel8rowCountERK11QModelIndex @ 234 NONAME
-	_ZNK17RadioStationModel9stationAtEi @ 235 NONAME
-	_ZNK18RadioScannerEngine10isScanningEv @ 236 NONAME
-	_ZNK18RadioScannerEngine10metaObjectEv @ 237 NONAME
-	_ZTI12RadioStation @ 238 NONAME
-	_ZTI13RadioUiEngine @ 239 NONAME
-	_ZTI17RadioHistoryModel @ 240 NONAME
-	_ZTI17RadioStationModel @ 241 NONAME
-	_ZTI18RadioScannerEngine @ 242 NONAME
-	_ZTV12RadioStation @ 243 NONAME
-	_ZTV13RadioUiEngine @ 244 NONAME
-	_ZTV17RadioHistoryModel @ 245 NONAME
-	_ZTV17RadioStationModel @ 246 NONAME
-	_ZTV18RadioScannerEngine @ 247 NONAME
-
--- a/radioapp/eabi/fmradiowidgetsu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,135 +0,0 @@
-EXPORTS
-	_ZN11RadioWindow11qt_metacallEN11QMetaObject4CallEiPPv @ 1 NONAME
-	_ZN11RadioWindow11qt_metacastEPKc @ 2 NONAME
-	_ZN11RadioWindow12activateViewEP13RadioViewBaseRK7QString6QFlagsIN2Hb14ViewSwitchFlagEE @ 3 NONAME
-	_ZN11RadioWindow15showVolumeLevelEi @ 4 NONAME
-	_ZN11RadioWindow16activateMainViewEv @ 5 NONAME
-	_ZN11RadioWindow16showErrorMessageERK7QString @ 6 NONAME
-	_ZN11RadioWindow16staticMetaObjectE @ 7 NONAME DATA 16
-	_ZN11RadioWindow17updateOrientationEN2Qt11OrientationE @ 8 NONAME
-	_ZN11RadioWindow18orientationSectionEv @ 9 NONAME
-	_ZN11RadioWindow19activateHistoryViewEv @ 10 NONAME
-	_ZN11RadioWindow19getStaticMetaObjectEv @ 11 NONAME
-	_ZN11RadioWindow19updateAntennaStatusEb @ 12 NONAME
-	_ZN11RadioWindow20activateStationsViewEv @ 13 NONAME
-	_ZN11RadioWindow4initEv @ 14 NONAME
-	_ZN11RadioWindow8initViewEv @ 15 NONAME
-	_ZN11RadioWindowC1EP7QWidget @ 16 NONAME
-	_ZN11RadioWindowC2EP7QWidget @ 17 NONAME
-	_ZN11RadioWindowD0Ev @ 18 NONAME
-	_ZN11RadioWindowD1Ev @ 19 NONAME
-	_ZN11RadioWindowD2Ev @ 20 NONAME
-	_ZN16RadioFadingLabel11qt_metacallEN11QMetaObject4CallEiPPv @ 21 NONAME
-	_ZN16RadioFadingLabel11qt_metacastEPKc @ 22 NONAME
-	_ZN16RadioFadingLabel11startEffectERK7QStringPKc @ 23 NONAME
-	_ZN16RadioFadingLabel14effectFinishedEN8HbEffect12EffectStatusE @ 24 NONAME
-	_ZN16RadioFadingLabel16setFadingEnabledEb @ 25 NONAME
-	_ZN16RadioFadingLabel16staticMetaObjectE @ 26 NONAME DATA 16
-	_ZN16RadioFadingLabel19getStaticMetaObjectEv @ 27 NONAME
-	_ZN16RadioFadingLabel20setTextWithoutFadingERK7QString @ 28 NONAME
-	_ZN16RadioFadingLabel7setTextERK7QString @ 29 NONAME
-	_ZN16RadioFadingLabel8trimHtmlERK7QString @ 30 NONAME
-	_ZN16RadioFadingLabelC1EP13QGraphicsItem @ 31 NONAME
-	_ZN16RadioFadingLabelC2EP13QGraphicsItem @ 32 NONAME
-	_ZN19RadioFrequencyStrip10skipToNextEv @ 33 NONAME
-	_ZN19RadioFrequencyStrip11qt_metacallEN11QMetaObject4CallEiPPv @ 34 NONAME
-	_ZN19RadioFrequencyStrip11qt_metacastEPKc @ 35 NONAME
-	_ZN19RadioFrequencyStrip12setFrequencyEjiN6Scroll9DirectionE @ 36 NONAME
-	_ZN19RadioFrequencyStrip13seekRequestedEi @ 37 NONAME
-	_ZN19RadioFrequencyStrip13skipRequestedEi @ 38 NONAME
-	_ZN19RadioFrequencyStrip14skipToPreviousEv @ 39 NONAME
-	_ZN19RadioFrequencyStrip16frequencyChangedEjii @ 40 NONAME
-	_ZN19RadioFrequencyStrip16staticMetaObjectE @ 41 NONAME DATA 16
-	_ZN19RadioFrequencyStrip18skipToNextFavoriteEv @ 42 NONAME
-	_ZN19RadioFrequencyStrip19getStaticMetaObjectEv @ 43 NONAME
-	_ZN19RadioFrequencyStrip20emitFrequencyChangedEjii @ 44 NONAME
-	_ZN19RadioFrequencyStrip22skipToPreviousFavoriteEv @ 45 NONAME
-	_ZN19RadioFrequencyStrip4initEP13RadioUiEngineR13RadioUiLoader @ 46 NONAME
-	_ZN19RadioFrequencyStrip6seekUpEv @ 47 NONAME
-	_ZN19RadioFrequencyStrip8seekDownEv @ 48 NONAME
-	_ZN19RadioFrequencyStripC1Ev @ 49 NONAME
-	_ZN19RadioFrequencyStripC2Ev @ 50 NONAME
-	_ZN20RadioStationCarousel10timerFiredEv @ 51 NONAME
-	_ZN20RadioStationCarousel11findStationEj @ 52 NONAME
-	_ZN20RadioStationCarousel11qt_metacallEN11QMetaObject4CallEiPPv @ 53 NONAME
-	_ZN20RadioStationCarousel11qt_metacastEPKc @ 54 NONAME
-	_ZN20RadioStationCarousel11resizeEventEP25QGraphicsSceneResizeEvent @ 55 NONAME
-	_ZN20RadioStationCarousel11setInfoTextEN16CarouselInfoText4TypeE @ 56 NONAME
-	_ZN20RadioStationCarousel12cleanRdsDataEv @ 57 NONAME
-	_ZN20RadioStationCarousel12gestureEventEP13QGestureEvent @ 58 NONAME
-	_ZN20RadioStationCarousel12setFrequencyEjiN6Scroll9DirectionE @ 59 NONAME
-	_ZN20RadioStationCarousel12setLandscapeEb @ 60 NONAME
-	_ZN20RadioStationCarousel13clearInfoTextEv @ 61 NONAME
-	_ZN20RadioStationCarousel13drawOffScreenER8QPainter @ 62 NONAME
-	_ZN20RadioStationCarousel13localizeGenreEi @ 63 NONAME
-	_ZN20RadioStationCarousel13scrollToIndexEiN6Scroll9DirectionE6QFlagsINS_10ScrollFlagEE @ 64 NONAME
-	_ZN20RadioStationCarousel13skipRequestedEi @ 65 NONAME
-	_ZN20RadioStationCarousel14setCenterIndexEi6QFlagsINS_10ScrollFlagEE @ 66 NONAME
-	_ZN20RadioStationCarousel14updateStationsEv @ 67 NONAME
-	_ZN20RadioStationCarousel15cancelAnimationEv @ 68 NONAME
-	_ZN20RadioStationCarousel15mousePressEventEP24QGraphicsSceneMouseEvent @ 69 NONAME
-	_ZN20RadioStationCarousel15setFavoriteIconERK6HbIcon @ 70 NONAME
-	_ZN20RadioStationCarousel15setScanningModeEb @ 71 NONAME
-	_ZN20RadioStationCarousel15updateRadioTextERK12RadioStation @ 72 NONAME
-	_ZN20RadioStationCarousel16frequencyChangedEjii @ 73 NONAME
-	_ZN20RadioStationCarousel16handleUrlClickedERK12RadioStation @ 74 NONAME
-	_ZN20RadioStationCarousel16scrollPosChangedERK7QPointF @ 75 NONAME
-	_ZN20RadioStationCarousel16staticMetaObjectE @ 76 NONAME DATA 16
-	_ZN20RadioStationCarousel17adjustAfterScrollEv @ 77 NONAME
-	_ZN20RadioStationCarousel17animateNewStationERK12RadioStation @ 78 NONAME
-	_ZN20RadioStationCarousel17handleIconClickedERK12RadioStation @ 79 NONAME
-	_ZN20RadioStationCarousel17setAutoScrollTimeEi @ 80 NONAME
-	_ZN20RadioStationCarousel17setManualSeekModeEb @ 81 NONAME
-	_ZN20RadioStationCarousel18setNonFavoriteIconERK6HbIcon @ 82 NONAME
-	_ZN20RadioStationCarousel19calculateDifferenceEiRN6Scroll9DirectionE @ 83 NONAME
-	_ZN20RadioStationCarousel19getStaticMetaObjectEv @ 84 NONAME
-	_ZN20RadioStationCarousel19updateAntennaStatusEb @ 85 NONAME
-	_ZN20RadioStationCarousel21scanAnimationFinishedEv @ 86 NONAME
-	_ZN20RadioStationCarousel22handleRadiotextClickedERK12RadioStation @ 87 NONAME
-	_ZN20RadioStationCarousel4initER13RadioUiLoaderP13RadioUiEngine @ 88 NONAME
-	_ZN20RadioStationCarousel4skipEN11StationSkip4ModeE @ 89 NONAME
-	_ZN20RadioStationCarousel6updateERK12RadioStation @ 90 NONAME
-	_ZN20RadioStationCarousel8uiEngineEv @ 91 NONAME
-	_ZN20RadioStationCarousel9adjustPosEi @ 92 NONAME
-	_ZN20RadioStationCarousel9nextIndexEi @ 93 NONAME
-	_ZN20RadioStationCarousel9prevIndexEi @ 94 NONAME
-	_ZN20RadioStationCarousel9showEventEP10QShowEvent @ 95 NONAME
-	_ZN20RadioStationCarousel9trimIndexEi @ 96 NONAME
-	_ZN20RadioStationCarouselC1EP13QGraphicsItem @ 97 NONAME
-	_ZN20RadioStationCarouselC2EP13QGraphicsItem @ 98 NONAME
-	_ZNK11RadioWindow10metaObjectEv @ 99 NONAME
-	_ZNK16RadioFadingLabel10metaObjectEv @ 100 NONAME
-	_ZNK19RadioFrequencyStrip10isScanningEv @ 101 NONAME
-	_ZNK19RadioFrequencyStrip10metaObjectEv @ 102 NONAME
-	_ZNK19RadioFrequencyStrip13isInitializedEv @ 103 NONAME
-	_ZNK19RadioFrequencyStrip15stationsInRangeEjj @ 104 NONAME
-	_ZNK19RadioFrequencyStrip16frequencyAtIndexEi @ 105 NONAME
-	_ZNK20RadioStationCarousel10metaObjectEv @ 106 NONAME
-	_ZNK20RadioStationCarousel12favoriteIconEv @ 107 NONAME
-	_ZNK20RadioStationCarousel13isInitializedEv @ 108 NONAME
-	_ZNK20RadioStationCarousel14autoScrollTimeEv @ 109 NONAME
-	_ZNK20RadioStationCarousel14isInManualSeekEv @ 110 NONAME
-	_ZNK20RadioStationCarousel15nonFavoriteIconEv @ 111 NONAME
-	_ZNK20RadioStationCarousel16isInScanningModeEv @ 112 NONAME
-	_ZNK20RadioStationCarousel17isAntennaAttachedEv @ 113 NONAME
-	_ZNK20RadioStationCarousel18isScrollingAllowedEv @ 114 NONAME
-	_ZTI11RadioWindow @ 115 NONAME
-	_ZTI16RadioFadingLabel @ 116 NONAME
-	_ZTI19RadioFrequencyStrip @ 117 NONAME
-	_ZTI20RadioStationCarousel @ 118 NONAME
-	_ZTV11RadioWindow @ 119 NONAME
-	_ZTV16RadioFadingLabel @ 120 NONAME
-	_ZTV19RadioFrequencyStrip @ 121 NONAME
-	_ZTV20RadioStationCarousel @ 122 NONAME
-	_ZThn28_N20RadioStationCarousel11findStationEj @ 123 NONAME
-	_ZThn28_N20RadioStationCarousel13localizeGenreEi @ 124 NONAME
-	_ZThn28_N20RadioStationCarousel16handleUrlClickedERK12RadioStation @ 125 NONAME
-	_ZThn28_N20RadioStationCarousel17handleIconClickedERK12RadioStation @ 126 NONAME
-	_ZThn28_N20RadioStationCarousel22handleRadiotextClickedERK12RadioStation @ 127 NONAME
-	_ZThn28_NK20RadioStationCarousel12favoriteIconEv @ 128 NONAME
-	_ZThn28_NK20RadioStationCarousel14isInManualSeekEv @ 129 NONAME
-	_ZThn28_NK20RadioStationCarousel15nonFavoriteIconEv @ 130 NONAME
-	_ZThn8_N11RadioWindowD0Ev @ 131 NONAME
-	_ZThn8_N11RadioWindowD1Ev @ 132 NONAME
-	_ZThn8_N20RadioStationCarousel15mousePressEventEP24QGraphicsSceneMouseEvent @ 133 NONAME
-
--- a/radioapp/radioapp.pro	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +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:
-#
-
-TEMPLATE = subdirs
-
-# Process directories in order that they are given
-CONFIG += ordered
-
-SUBDIRS += radioenginewrapper
-SUBDIRS += radiopresetstorage
-SUBDIRS += radiouiengine
-SUBDIRS += radiowidgets
-SUBDIRS += radiowidgetsplugin
-SUBDIRS += radioapplication
-
-symbian {
-    BLD_INF_RULES.prj_mmpfiles += $$LITERAL_HASH"include \"../rom/bld.inf\""
-}
--- a/radioapp/radioapplication/inc/radioapplication.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef _RADIOAPPLICATION_H_
-#define _RADIOAPPLICATION_H_
-
-// System includes
-#include <HbApplication>
-
-//#define QT_SHAREDPOINTER_TRACK_POINTERS // Debugging support for QSharedPointer
-#include <QSharedPointer>
-
-// Forward declarations
-class RadioWindow;
-class RadioStationModel;
-class XQSettingsManager;
-
-#ifdef BUILD_WIN32
-    class Win32Window;
-#endif // BUILD_WIN32
-
-// Class declaration
-class RadioApplication : public HbApplication
-{
-    Q_OBJECT
-    Q_DISABLE_COPY( RadioApplication )
-
-public:
-
-    explicit RadioApplication( int &argc, char *argv[] );
-
-    ~RadioApplication();
-
-private slots:
-
-    void checkOfflineMode();
-    void handleOfflineQueryAnswer();
-
-private:
-
-    void init();
-    bool isInOfflineMode() const;
-    void askOfflineModePermission( const QString& question );
-
-private: // data
-
-#ifdef BUILD_WIN32
-    QScopedPointer<Win32Window>         mWin32Window;
-#endif // BUILD_WIN32
-
-    /**
-     * Application main window
-     * Own
-     */
-    QScopedPointer<RadioWindow>         mMainWindow;
-
-    /**
-     * Pointer to settings manager
-     * Own.
-     */
-    XQSettingsManager*                  mSettingsManager;
-
-};
-
-#endif // _RADIOAPPLICATION_H_
--- a/radioapp/radioapplication/inc/testwindow_win32.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +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 WIN32_WINDOW_H
-#define WIN32_WINDOW_H
-
-// System includes
-#include <QWidget>
-
-// Forward declarations
-class HbMainWindow;
-class QPushButton;
-class QComboBox;
-class QGridLayout;
-
-class Win32Window : public QWidget
-{
-    Q_OBJECT
-public:
-
-    Win32Window();
-    ~Win32Window();
-
-    void addHbWindow( HbMainWindow* radioWindow );
-
-    void init();
-
-private slots:
-
-    void changeOrientation();
-    void volumeUp();
-    void volumeDown();
-    void toggleHeadsetStatus();
-    void updateWindowSize();
-    void addSong();
-    void clearSong();
-    void toggleOffline();
-    void changeTheme( const QString& theme );
-
-private:
-
-    void initThemes();
-    QStringList themeRootPaths();
-
-private: // data
-
-    QPushButton*    mOrientationButton;
-
-    QPushButton*    mVolUpButton;
-    QPushButton*    mVolDownButton;
-
-    QPushButton*    mAddSongButton;
-    QPushButton*    mClearSongButton;
-
-    QPushButton*    mHeadsetButton;
-    bool            mHeadsetConnected;
-
-    QPushButton*    mOfflineButton;
-
-    QComboBox*      mThemeBox;
-
-    QGridLayout*    mToolbarLayout;
-
-    int             mVolume;
-
-    HbMainWindow*   mRadioWindow;
-
-    Qt::Orientation mOrientation;
-
-    int             mSongIndex;
-
-};
-
-#endif // WIN32_WINDOW_H
--- a/radioapp/radioapplication/radioapplication.pro	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +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:
-#
-
-TMP_DIR_NAME = app
-include(../buildflags.pri)
-
-TEMPLATE        = app
-TARGET          = fmradio
-TRANSLATIONS    += fmradio.ts 
-
-symbian: {
-    TARGET.CAPABILITY       = CAP_APPLICATION MultimediaDD
-    TARGET.UID3             = 0x2002FF4E
-    TARGET.EPOCSTACKSIZE    = 0x14000
-    TARGET.EPOCHEAPSIZE     = 0x020000 0x2400000
-    SKINICON                = qtg_large_radio
-    ICON                    = resources/qtg_large_radio.svg # Fallback icon in case theme doesn't have one
-
-    LIBS                    += -lxqserviceutil
-    LIBS                    += -lxqsettingsmanager
-
-    BLD_INF_RULES.prj_exports += "resources/fmradio.docml       /epoc32/release/winscw/udeb/z/resource/hb/splashml/fmradio.docml" \
-                                 "resources/fmradio.splashml    /epoc32/release/winscw/udeb/z/resource/hb/splashml/fmradio.splashml" \
-                                 "resources/fmradio.docml       /epoc32/data/z/resource/hb/splashml/fmradio.docml" \
-                                 "resources/fmradio.splashml    /epoc32/data/z/resource/hb/splashml/fmradio.splashml"
-}
-
-CONFIG      += hb service
-
-# Service provider specific configuration.
-SERVICE.FILE = resources/service_conf.xml
-
-INCLUDEPATH += . inc
-INCLUDEPATH += ../../common
-INCLUDEPATH += ../radiouiengine/inc
-INCLUDEPATH += ../radiowidgets/inc
-
-LIBS        += -lfmradiouiengine
-LIBS        += -lfmradiowidgets
-
-# UI does not normally depend on the wrapper, but it does on two special cases
-# 1. Logging is enabled. The logger is in the wrapper module
-# 2. Radio is built for win32 target. The test window needs to access the wrapper
-LOGGING_ENABLED:LIBS += -lfmradioenginewrapper
-
-# Sources
-HEADERS     += radioapplication.h
-
-SOURCES     += main.cpp
-SOURCES     += radioapplication.cpp
-
-# Win32 specific stuff
-win32: {
-    LIBS += -lfmradioenginewrapper
-
-    HEADERS += testwindow_win32.h
-
-    SOURCES += testwindow_win32.cpp
-
-    DEFINES += HB_RESOURCES_DIR=\"\\\"$${HB_RESOURCES_DIR}\\\"\"
-}
-
-DEPENDPATH  += $$INCLUDEPATH src
--- a/radioapp/radioapplication/resources/compile_ts.bat	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +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:
-::
-
-@echo off
-
-set QM_FILE_US=fmradio_en_US.qm
-set QM_FILE=fmradio_en.qm
-set QM_LOCATION=..\..\bin\%QM_FILE_US%
-
-ECHO Creating QM file
-call lrelease -idbased fmradio.ts -qm %QM_LOCATION%
-
-IF EXIST \epoc32\tools\epoc.bat (
-    echo Copying files to epoc32
-    xcopy /y fmradio.ts \epoc32\include\platform\qt\translations\fmradio_en.ts
-    xcopy /y fmradio.ts \epoc32\include\platform\qt\translations\fmradio_en_US.ts
-    
-    xcopy /y %QM_LOCATION% \epoc32\data\z\resource\qt\translations\%QM_FILE%
-    xcopy /y %QM_LOCATION% \epoc32\release\winscw\udeb\z\resource\qt\translations\%QM_FILE%
-    xcopy /y %QM_LOCATION% \epoc32\release\winscw\urel\z\resource\qt\translations\%QM_FILE%
-    xcopy /y %QM_LOCATION% \epoc32\data\z\resource\qt\translations\%QM_FILE_US%
-    xcopy /y %QM_LOCATION% \epoc32\release\winscw\udeb\z\resource\qt\translations\%QM_FILE_US%
-    xcopy /y %QM_LOCATION% \epoc32\release\winscw\urel\z\resource\qt\translations\%QM_FILE_US%
-)
--- a/radioapp/radioapplication/resources/fmradio.docml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="0.9">
-    <widget name="splashView" type="HbView">
-        <string name="title" locid="txt_rad_title_fm_radio" />
-    </widget>
-</hbdocument>
--- a/radioapp/radioapplication/resources/fmradio.splashml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbsplash version="1">
-    <docml>fmradio.docml</docml>
-    <widget>splashView</widget>
-    <appuid>0x2002FF4E</appuid>
-    <tsappname>fmradio</tsappname>
-</hbsplash>
--- a/radioapp/radioapplication/resources/fmradio.ts	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1556 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="3.0" language="en_GB" sourcelanguage="en_GB">
-<context>
-<message numerus="no" id="txt_rad_dialog_new_name">
-    <comment>Dialog title for renaming the station. </comment>        
-    <source>New name:</source>
-    <translation variants="no">New name:</translation>
-    <extra-loc-layout_id>qtl_dialog_pri_heading</extra-loc-layout_id>    
-    <extra-loc-viewid>rad</extra-loc-viewid>
-    <extra-loc-positionid>dialog</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_rock_music">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 11.</comment>        
-    <source>Rock Music</source>
-    <translation variants="no">Rock Music</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_personality">
-    <comment>Main view Information area item. Displayed if PTY is available. Used only in US region.</comment>        
-    <source>Personality</source>
-    <translation variants="no">Personality</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_clear_recently_played_songs_list">
-    <comment>Dialog text displayed when user is about to clear all recently played songs in Recently played songs view.</comment>        
-    <source>Clear Recently played songs list?</source>
-    <translation variants="no">Clear Recently played songs list?</translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>rad</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_opt_play_history">
-    <comment>Options list item in main view. Opens Play history view.</comment>        
-    <source>Play history</source>
-    <translation variants="no">Play history</translation>
-    <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>opt</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_news">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 1. Custom layout ID parent.</comment>        
-    <source>News</source>
-    <translation variants="no">News</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_opt_search_all_stations">
-    <comment>Options list item. Initiates a functionality that scans through the whole frequency range and saves the found stations. Note! Displayed in main view and in Stations view.</comment>        
-    <source>Search all stations</source>
-    <translation variants="no">Search all stations</translation>
-    <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_01, rad_02</extra-loc-viewid>
-    <extra-loc-positionid>opt</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_culture">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 7.</comment>        
-    <source>Culture</source>
-    <translation variants="no">Culture</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_soft_rhythm_and_blues">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Soft rhythm and blues</source>
-    <translation variants="no">Soft rhythm and blues</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_country_music">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 25.</comment>        
-    <source>Country Music</source>
-    <translation variants="no">Country Music</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradio_info_local_frequency_band_automaticall">
-    <comment>Discreet popup notification text. Displayed after region has been automatically selected.</comment>        
-    <source>Local frequency band automatically set for radio.</source>
-    <translation variants="no">Local frequency band automatically set for radio.</translation>
-    <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>    
-    <extra-loc-viewid>fmradio</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_val_l1_mhz">
-    <comment>Two row list, second row. %L1 frequency of a station. Note! Only used if the station does not have a name. Only in landscape.</comment>        
-    <source>%L1 MHz</source>
-    <translation variants="no">%L1 MHz</translation>
-    <extra-loc-layout_id>qtl_list_sec2_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_003</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_rock_music">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Rock Music</source>
-    <translation variants="no">Rock Music</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_button_tagged_songs">
-    <comment>Button text. Expresses that the list contains songs which have been marked as favorite songs.</comment>        
-    <source>Tagged songs</source>
-    <translation variants="no">Tagged songs</translation>
-    <extra-loc-layout_id>qtl_toolbar_tiny_2</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_003</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_soft_rock">
-    <comment>Main view Information area item. Displayed if PTY is available. Used only in US region.</comment>        
-    <source>Soft rock</source>
-    <translation variants="no">Soft rock</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_culture">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Culture</source>
-    <translation variants="no">Culture</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_button_add_to_favourites">
-    <comment>A button text in main view. Adds currently active station to Favourite station&apos;s list.</comment>        
-    <source>Add to favourites</source>
-    <translation variants="no">Add to favourites</translation>
-    <extra-loc-layout_id>txt_rad_button_stations</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_nostalgia">
-    <comment>Main view Information area item. Displayed if PTY is available. Used only in US region.</comment>        
-    <source>Nostalgia</source>
-    <translation variants="no">Nostalgia</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_social_affairs">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 19.</comment>        
-    <source>Social Affairs</source>
-    <translation variants="no">Social Affairs</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_opt_clear_list">
-    <comment>Options list item. Empties the Recently played songs or Tagged songs list. </comment>        
-    <source>Clear list</source>
-    <translation variants="no">Clear list</translation>
-    <extra-loc-layout_id>qtl_menu_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_003</extra-loc-viewid>
-    <extra-loc-positionid>opt</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_other_music">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Other Music</source>
-    <translation variants="no">Other Music</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_rhythm_and_blues">
-    <comment>Main view Information area item. Displayed if PTY is available. Used only in US region.</comment>        
-    <source>Rhythm and blues</source>
-    <translation variants="no">Rhythm and blues</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_religious_talk">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Religious talk</source>
-    <translation variants="no">Religious talk</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_button_activate_loudspeaker">
-    <comment>A button text in main view. Displayed if volume is coming from the headset. Activating the function routes audio to the loudspeaker.</comment>        
-    <source>Activate loudspeaker</source>
-    <translation variants="no">Activate loudspeaker</translation>
-    <extra-loc-layout_id>txt_rad_button_stations</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_nostalgia">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Nostalgia</source>
-    <translation variants="no">Nostalgia</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_language">
-    <comment>Main view Information area item. Displayed if PTY is available. Used only in US region.</comment>        
-    <source>Language</source>
-    <translation variants="no">Language</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_talk">
-    <comment>Main view Information area item. Displayed if PTY is available. Used only in US region.</comment>        
-    <source>Talk</source>
-    <translation variants="no">Talk</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_soft_rhythm_and_blues">
-    <comment>Main view Information area item. Displayed if PTY is available. Used only in US region.</comment>        
-    <source>Soft rhythm and blues</source>
-    <translation variants="no">Soft rhythm and blues</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_national_music">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>National Music</source>
-    <translation variants="no">National Music</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_science">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 8.</comment>        
-    <source>Science</source>
-    <translation variants="no">Science</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_weather">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Weather</source>
-    <translation variants="no">Weather</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_drama">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Drama</source>
-    <translation variants="no">Drama</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_national_music">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 26.</comment>        
-    <source>National Music</source>
-    <translation variants="no">National Music</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_religious_music">
-    <comment>Main view Information area item. Displayed if PTY is available. Used only in US region.</comment>        
-    <source>Religious music</source>
-    <translation variants="no">Religious music</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_oldies_music">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Oldies Music</source>
-    <translation variants="no">Oldies Music</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_education">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 5.</comment>        
-    <source>Education</source>
-    <translation variants="no">Education</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_station_list_is_full_please_remove_s">
-    <comment>Dialog text which is displayed if all found stations do not fit to the Stations list after doing a Search all stations function. Displayed also if user tries to mark station as favorite in main view or in stations view and there is not enough room for stations in the Stations list.</comment>        
-    <source>Station list is full. Please remove some stations and try again.</source>
-    <translation variants="no">Station list is full. Please remove some stations and try again.</translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>rad</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_no_favourites_add_favourites_to_see">
-    <comment>Info text in main pane if &quot;Favourites&quot; list has no items. &quot;Favourite stations&quot; text must be same localization as txt_rad_subhead_favorite_stations. Favourite icon refers to a star -icon in the main view.</comment>        
-    <source>Tap the star icon or Add to favourite button in main view to mark currently playing station as a favorite.</source>
-    <translation variants="no">Tap the star icon or Add to favourite button in main view to mark currently playing station as a favorite.</translation>
-    <extra-loc-layout_id>qtl_view_empty_description_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_clear_favourite_stations_list">
-    <comment>Dialog text displayed when user is about to clear the all stations in Favourite stations view.</comment>        
-    <source>Clear Favourite stations list?</source>
-    <translation variants="no">Clear Favourite stations list?</translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>rad</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_adult_hits">
-    <comment>Main view Information area item. Displayed if PTY is available. Used only in US region.</comment>        
-    <source>Adult hits</source>
-    <translation variants="no">Adult hits</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_no_favourite_stations">
-    <comment>Title of the info text in main pane if &quot;Favourite stations&quot; list has no items. </comment>        
-    <source>(No favourite stations)</source>
-    <translation variants="no">(No favourite stations)</translation>
-    <extra-loc-layout_id>qtl_view_empty_title_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_button_stations">
-    <comment>A button text in main view. Opens a Stations list view, which lists All stations and Favourite stations views. Custom layout ID parent.</comment>        
-    <source>Stations</source>
-    <translation variants="no">Stations</translation>
-    <extra-loc-layout_id>txt_rad_button_stations</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_pop_music">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 10.</comment>        
-    <source>Pop Music</source>
-    <translation variants="no">Pop Music</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradio_button_remove_from_favourites">
-    <comment>A button text in main view. Removes currently active station from Favourite station&apos;s list.</comment>        
-    <source>Remove from favourites</source>
-    <translation variants="no">Remove from favourites</translation>
-    <extra-loc-layout_id>txt_rad_button_stations</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_varied">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 9.</comment>        
-    <source>Varied</source>
-    <translation variants="no">Varied</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_alarm">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 31.</comment>        
-    <source>Alarm</source>
-    <translation variants="no">Alarm</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_other_music">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 15.</comment>        
-    <source>Other Music</source>
-    <translation variants="no">Other Music</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_long_caption_fm_radio">
-    <comment>Application menu item name in list. Long caption.</comment>        
-    <source>FM Radio</source>
-    <translation variants="no">FM Radio</translation>
-    <extra-loc-layout_id>qtl_list_pri_large_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>fmradio</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
-    <extra-loc-feature>fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_childrens_programmes">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 18.</comment>        
-    <source>Children’s programmes</source>
-    <translation variants="no">Children’s programmes</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_varied">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Varied</source>
-    <translation variants="no">Varied</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_leisure">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 23.</comment>        
-    <source>Leisure</source>
-    <translation variants="no">Leisure</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_alarm">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Alarm</source>
-    <translation variants="no">Alarm</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_information">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Information</source>
-    <translation variants="no">Information</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_menu_remove_favourite">
-    <comment>Item specific menu item. Allows the user to remove station from the favourite station list.</comment>        
-    <source>Remove from favourites</source>
-    <translation variants="no">Remove from favourites</translation>
-    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_title_fm_radio">
-    <comment>View title, shown in all FM Radio views.</comment>        
-    <source>FM Radio</source>
-    <translation variants="no">FM Radio</translation>
-    <extra-loc-layout_id>qtl_titlebar</extra-loc-layout_id>    
-    <extra-loc-viewid>rad</extra-loc-viewid>
-    <extra-loc-positionid>title</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_button_cancel">
-    <comment>Button which is displayed during the search all stations function on the main view.</comment>        
-    <source>Cancel</source>
-    <translation variants="no">Cancel</translation>
-    <extra-loc-layout_id>txt_rad_button_cancel</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_delete_station">
-    <comment>Confirmation query for deleting a selected station.</comment>        
-    <source>Delete station?</source>
-    <translation variants="no">Delete station?</translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>rad</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_religion">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Religion</source>
-    <translation variants="no">Religion</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_menu_add_to_favourites">
-    <comment>Item specific menu item. Allows the user to add a local station to favourite stations list. Available only if the station item is not already in the favourites.</comment>        
-    <source>Add to favourites</source>
-    <translation variants="no">Add to favourites</translation>
-    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_current_affairs">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 2.</comment>        
-    <source>Current affairs</source>
-    <translation variants="no">Current affairs</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_you_can_add_song_to_the_tagged_songs">
-    <comment>Info text in main pane area if Tagged songs list has no item (e.g. after the user has deleted all content from the list). Note that &quot;tagged songs&quot; must use the same localisation as txt_rad_button_tagged_songs. Recently played songs must be same as &quot;Recently played songs&quot; text must be the same as txt_rad_button_recently_played_songs..</comment>        
-    <source>You can add song to the tagged songs list from Recently played songs or from main view if song information is available. </source>
-    <translation variants="no">You can add song to the tagged songs list from Recently played songs or from main view if song information is available. </translation>
-    <extra-loc-layout_id>qtl_view_empty_description_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_003</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_social_affairs">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Social Affairs</source>
-    <translation variants="no">Social Affairs</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_education">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Education</source>
-    <translation variants="no">Education</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_jazz_music">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Jazz Music</source>
-    <translation variants="no">Jazz Music</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_religious_music">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Religious music</source>
-    <translation variants="no">Religious music</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_continue_using_the_radio_in_offline">
-    <comment>Confirmation query text which is displayed when the FM radio is on and device is switched to offline mode.</comment>        
-    <source>Continue using the Radio in off-line mode?</source>
-    <translation variants="no">Continue using the Radio in off-line mode?</translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>rad</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_list_unknown">
-    <comment>First row of the two row list item. Displayed only on landscape! Displayed when the artist name is not available for the identified song. %1 is the song name. In landscape the whole string is &quot;(Unknown) - Song name&quot; e.g. &quot;(Unknown) - Like a Virgin</comment>        
-    <source>(Unknown) - %1</source>
-    <translation variants="no">(Unknown) - %1</translation>
-    <extra-loc-layout_id>qtl_list_pri_large_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_003</extra-loc-viewid>
-    <extra-loc-positionid>dblist</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_travel">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Travel</source>
-    <translation variants="no">Travel</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_song_information_is_collected_automat">
-    <comment>Info text in main pane area if Recently played songs has no item (e.g. after the user has emptied the list). Note that &quot;Identify song&quot; must be the same string as txt_rad_list_identify_song. &quot;Recently played songs&quot; text must be the same as &quot;Recently played songs&quot; text must be the same as txt_rad_button_recently_played_songs. Displayed if Shazam (song identification) application is NOT installed to the device.</comment>        
-    <source>Song information is collected automatically from radio stations which send the song information using the RDS+ technology.</source>
-    <translation variants="no">Song information is collected automatically from radio stations which send the song information using the RDS+ technology.</translation>
-    <extra-loc-layout_id>qtl_view_empty_description_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_003</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_clear_all_stations_list">
-    <comment>Dialog text displayed when user is about to clear the all stations in All stations view.</comment>        
-    <source>Clear All stations list?</source>
-    <translation variants="no">Clear All stations list?</translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>rad</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_classical">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Classical</source>
-    <translation variants="no">Classical</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dpophead_song_was_added_to_favorite_songs">
-    <comment>Discreet popup heading text. Displayed in main view when a song has been tagged. </comment>        
-    <source>Song was added to Tagged songs.</source>
-    <translation variants="no">Song was added to Tagged songs.</translation>
-    <extra-loc-layout_id>qtl_notifdialog_pri2_medium_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>rad</extra-loc-viewid>
-    <extra-loc-positionid>dpophead</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_talk">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Talk</source>
-    <translation variants="no">Talk</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_finance">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Finance</source>
-    <translation variants="no">Finance</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_activate_radio_in_offline_mode">
-    <comment>Confirmation query which is displayed when the FM Radio is launched while the device is in offline mode.</comment>        
-    <source>Activate Fm Radio in off-line mode?</source>
-    <translation variants="no">Activate Fm Radio in off-line mode?</translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>rad</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_searching_local_stations_please_wait">
-    <comment>Progress dialog text. Displayed when the system is scanning the whole frequency range for strong signal stations. </comment>        
-    <source>Searching local stations. Please wait.</source>
-    <translation variants="no">Searching local stations. Please wait.</translation>
-    <extra-loc-layout_id>qtl_dialog_pri3</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_004</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz2">
-    <comment>Second row of two row list item. %L1 is the frequency value of the station. Displayed if station HAS a name which is displayed on the first row.</comment>        
-    <source>%L1 MHz</source>
-    <translation variants="no">%L1 MHz</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_drama">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 6.</comment>        
-    <source>Drama</source>
-    <translation variants="no">Drama</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_clear_tagged_songs_list">
-    <comment>Dialog text displayed when user is about to clear all tagged songs in Tagged songs view.</comment>        
-    <source>Clear Tagged songs list?</source>
-    <translation variants="no">Clear Tagged songs list?</translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>rad</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_top_40">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Top 40</source>
-    <translation variants="no">Top 40</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_list_searching_all_available_stations_ple">
-    <comment>Main pane Information area item. Displayed below the tuning animation during the first time startup.</comment>        
-    <source>Searching all available stations. Please wait.</source>
-    <translation variants="no">Searching all available stations. Please wait.</translation>
-    <extra-loc-layout_id>txt_rad_list_searching_all_available_stations_ple</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_college">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>College</source>
-    <translation variants="no">College</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_all_stations_in_stations_list_will_be">
-    <comment>Confirmation query displayed when user is about to start scanning of all the available stations. </comment>        
-    <source>Stations in station list will be replaced. Favourite stations won&apos;t be touched. Continue?</source>
-    <translation variants="no">Stations in station list will be replaced. Favourite stations won&apos;t be touched. Continue?</translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>rad</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_menu_tag_song">
-    <comment>Item specific menu item. Allows the user to add a song in play history list to tagged songs list. Available only if the item is not already in the tagged songs.</comment>        
-    <source>Tag song</source>
-    <translation variants="no">Tag song</translation>
-    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_01, rad_03</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_no_stations_search_stations_automat">
-    <comment>Info text in main pane if &quot;All stations&quot; list has no items. Activates the search all station function if user taps the text.</comment>        
-    <source>Search stations automatically by tapping here.</source>
-    <translation variants="no">Search stations automatically by tapping here.</translation>
-    <extra-loc-layout_id>qtl_view_empty_description_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_college">
-    <comment>Main view Information area item. Displayed if PTY is available. Used only in US region.</comment>        
-    <source>College</source>
-    <translation variants="no">College</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_pop_music">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Pop Music</source>
-    <translation variants="no">Pop Music</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_public">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Public</source>
-    <translation variants="no">Public</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradio_info_fm_radio_could_not_be_started">
-    <comment>Dialog text which is displayed if FM Radio cannot be started for e.g. very low system memory or other rare cases.</comment>        
-    <source>FM Radio could not be started. </source>
-    <translation variants="no">FM Radio could not be started. </translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>fmradio</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_no_stations">
-    <comment>Title of the info text in main pane if &quot;All stations&quot; list has no items. </comment>        
-    <source>(No stations)</source>
-    <translation variants="no">(No stations)</translation>
-    <extra-loc-layout_id>qtl_view_empty_title_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_short_caption_fm_radio">
-    <comment>Application menu item name in grid. Short caption.</comment>        
-    <source>FM Radio</source>
-    <translation variants="no">FM Radio</translation>
-    <extra-loc-layout_id>qtl_grid_applications_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>fmradio</extra-loc-viewid>
-    <extra-loc-positionid>grid</extra-loc-positionid>
-    <extra-loc-feature>fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_serious_classical">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 14.</comment>        
-    <source>Serious classical</source>
-    <translation variants="no">Serious classical</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_religion">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 20.</comment>        
-    <source>Religion</source>
-    <translation variants="no">Religion</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_easy_listening">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 12.</comment>        
-    <source>Easy Listening</source>
-    <translation variants="no">Easy Listening</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_classical">
-    <comment>Main view Information area item. Displayed if PTY is available. Used only in US region.</comment>        
-    <source>Classical</source>
-    <translation variants="no">Classical</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dpophead_no_stations_found_try_searching">
-    <comment>Discreet popup heading text. Displayed when no stations were found after search all stations function has been finished.</comment>        
-    <source>No stations found. Try searching stations by scrolling the frequency strip.</source>
-    <translation variants="no">No stations found. Try searching stations by scrolling the frequency strip.</translation>
-    <extra-loc-layout_id>qtl_notifdialog_pri2</extra-loc-layout_id>    
-    <extra-loc-viewid>rad</extra-loc-viewid>
-    <extra-loc-positionid>dpophead</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_sport">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Sport</source>
-    <translation variants="no">Sport</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_tsw_caption_fm_radio">
-    <comment>Application name in Task switcher.</comment>        
-    <source>FM Radio</source>
-    <translation variants="no">FM Radio</translation>
-    <extra-loc-layout_id>qtl_grid_taskswitcher_tiny</extra-loc-layout_id>    
-    <extra-loc-viewid>tsw_01</extra-loc-viewid>
-    <extra-loc-positionid>caption</extra-loc-positionid>
-    <extra-loc-feature>ts</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_subhead_play_history">
-    <comment>Heading text for the Play history view.</comment>        
-    <source>Play history</source>
-    <translation variants="no">Play history</translation>
-    <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_003</extra-loc-viewid>
-    <extra-loc-positionid>subhead</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_menu_remove_tag">
-    <comment>Item specific menu item. Allows the user to remove a song from the tagged songs list.</comment>        
-    <source>Remove tag</source>
-    <translation variants="no">Remove tag</translation>
-    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_003</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_personality">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Personality</source>
-    <translation variants="no">Personality</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_language">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Language</source>
-    <translation variants="no">Language</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_current_affairs">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Current affairs</source>
-    <translation variants="no">Current affairs</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_soft">
-    <comment>Main view Information area item. Displayed if PTY is available. Used only in US region.</comment>        
-    <source>Soft</source>
-    <translation variants="no">Soft</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_button_local_stations">
-    <comment>Toolbar button. Displays list of all radio stations.</comment>        
-    <source>All stations</source>
-    <translation variants="no">All stations</translation>
-    <extra-loc-layout_id>qtl_toolbar_tiny_2</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_serious_classical">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Serious classical</source>
-    <translation variants="no">Serious classical</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_sport">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 4.</comment>        
-    <source>Sport</source>
-    <translation variants="no">Sport</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_weather">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 16.</comment>        
-    <source>Weather</source>
-    <translation variants="no">Weather</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_science">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Science</source>
-    <translation variants="no">Science</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_classic_rock">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Classic rock</source>
-    <translation variants="no">Classic rock</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_soft_rock">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Soft rock</source>
-    <translation variants="no">Soft rock</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_light_classical">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 13.</comment>        
-    <source>Light classical</source>
-    <translation variants="no">Light classical</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_folk_music">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Folk Music</source>
-    <translation variants="no">Folk Music</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_phone_in">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 21.</comment>        
-    <source>Phone In</source>
-    <translation variants="no">Phone In</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_button_favourites">
-    <comment>Toolbar button. Displays list of all favourite radio stations.</comment>        
-    <source>Favourite stations</source>
-    <translation variants="no">Favourite stations</translation>
-    <extra-loc-layout_id>qtl_toolbar_tiny_2</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_1_2">
-    <comment>Two row list item first row. Displays artist and song name. Only in landscape. %1 is the artist&apos;s name and %2 is the song name.</comment>        
-    <source>%1 - %2</source>
-    <translation variants="no">%1 - %2</translation>
-    <extra-loc-layout_id>qtl_list_pri2_graphic_add</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_003</extra-loc-viewid>
-    <extra-loc-positionid>dblist</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_leisure">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Leisure</source>
-    <translation variants="no">Leisure</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_alarm_test">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 30.</comment>        
-    <source>Alarm Test</source>
-    <translation variants="no">Alarm Test</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_button_recently_played_songs">
-    <comment>Button text. Opens the Recently played songs list view.</comment>        
-    <source>Recently played songs</source>
-    <translation variants="no">Recently played songs</translation>
-    <extra-loc-layout_id>qtl_toolbar_tiny_2</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_003</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_jazz_music">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 24.</comment>        
-    <source>Jazz Music</source>
-    <translation variants="no">Jazz Music</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_soft">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Soft</source>
-    <translation variants="no">Soft</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_information">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 3.</comment>        
-    <source>Information</source>
-    <translation variants="no">Information</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_alarm_test">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Alarm Test</source>
-    <translation variants="no">Alarm Test</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_rhythm_and_blues">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Rhythm and blues</source>
-    <translation variants="no">Rhythm and blues</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_subhead_favorite_stations">
-    <comment>Heading text for the Stations view&apos;s &quot;Favorite stations&quot; view</comment>        
-    <source>Favorite stations</source>
-    <translation variants="no">Favorite stations</translation>
-    <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>subhead</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_unknown">
-    <comment>First row of the two row list item. Displayed only in portrait and only when the artist name is not available for the identified song.</comment>        
-    <source>(Unknown)</source>
-    <translation variants="no">(Unknown)</translation>
-    <extra-loc-layout_id>qtl_list_pri_large_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_003</extra-loc-viewid>
-    <extra-loc-positionid>dblist</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_adult_hits">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Adult hits</source>
-    <translation variants="no">Adult hits</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_play_history_is_empty">
-    <comment>Title of the info text in main pane if &quot;Recently played songs&quot; or &quot;Tagged songs&quot; list has no items. </comment>        
-    <source>(No songs)</source>
-    <translation variants="no">(No songs)</translation>
-    <extra-loc-layout_id>qtl_view_empty_title_pri</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_003</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_menu_search_from_music_store">
-    <comment>Item specific menu item. Allows the user to search the song/artist from Nokia Music Store</comment>        
-    <source>Search from Ovi Music</source>
-    <translation variants="no">Search from Ovi Music</translation>
-    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_01, rad_03</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_documentary">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Documentary</source>
-    <translation variants="no">Documentary</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_list_seeking">
-    <comment>Main pane Information area item. Displayed on the center of the area when searching for a strong signal station.</comment>        
-    <source>Seeking</source>
-    <translation variants="no">Seeking</translation>
-    <extra-loc-layout_id>txt_rad_list_seeking</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_top_40">
-    <comment>Main view Information area item. Displayed if PTY is available. Used only in US region.</comment>        
-    <source>Top 40</source>
-    <translation variants="no">Top 40</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_news">
-    <comment>Second row on the Stations list item (PTY=Program type information).  </comment>        
-    <source>News</source>
-    <translation variants="no">News</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_connect_wired_headset1">
-    <comment>Main pane Information area item. Displayed if an antenna is not connected and no internal antenna is available. </comment>        
-    <source>Connect wired headset.</source>
-    <translation variants="no">Connect wired headset.</translation>
-    <extra-loc-layout_id>txt_rad_info_connect_wired_headset1</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_easy_listening">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Easy Listening</source>
-    <translation variants="no">Easy Listening</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_finance">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 17.</comment>        
-    <source>Finance</source>
-    <translation variants="no">Finance</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_childrens_programmes">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Children’s programmes</source>
-    <translation variants="no">Children’s programmes</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_documentary">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 29.</comment>        
-    <source>Documentary</source>
-    <translation variants="no">Documentary</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_fm_radio">
-    <comment>Text displayed in main view station information area (in place of station name) during the FM radio startup when the station information is waited to be loaded on the screen.</comment>        
-    <source>FM Radio</source>
-    <translation variants="no">FM Radio</translation>
-    <extra-loc-layout_id>txt_rad_info_connect_wired_headset1</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_light_classical">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Light classical</source>
-    <translation variants="no">Light classical</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_button_deactivate_loudspeaker">
-    <comment>A button text in main view. Displayed if volume is coming from the integrated loudspeaker. Activating the function routes audio to the headset.</comment>        
-    <source>Deactivate loudspeaker</source>
-    <translation variants="no">Deactivate loudspeaker</translation>
-    <extra-loc-layout_id>txt_rad_button_stations</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>button</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_religious_talk">
-    <comment>Main view Information area item. Displayed if PTY is available. Used only in US region.</comment>        
-    <source>Religious talk</source>
-    <translation variants="no">Religious talk</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_travel">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 22.</comment>        
-    <source>Travel</source>
-    <translation variants="no">Travel</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dpophead_connect_wired_headset">
-    <comment>Discreet popup notification text. Displayed in all other views but main view when headset antenna is removed.</comment>        
-    <source>Connect wired headset.</source>
-    <translation variants="no">Connect wired headset.</translation>
-    <extra-loc-layout_id>qtl_notifdialog_pri2_medium_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>rad</extra-loc-viewid>
-    <extra-loc-positionid>dpophead</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_phone_in">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Phone In</source>
-    <translation variants="no">Phone In</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_oldies_music">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 27.</comment>        
-    <source>Oldies Music</source>
-    <translation variants="no">Oldies Music</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_menu_search_from_other_store">
-    <comment>Item specific menu item. Allows the user to search the song/artist from some other music store than Ovi music store (usually some operator store). %1 can be any name, e.g. &quot;Vodafone music&quot;, &quot;Amazon&quot; etc.</comment>        
-    <source>Search from %1</source>
-    <translation variants="no">Search from %1</translation>
-    <extra-loc-layout_id>qtl_menu_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_01, rad_03</extra-loc-viewid>
-    <extra-loc-positionid>menu</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_public">
-    <comment>Main view Information area item. Displayed if PTY is available. Used only in US region.</comment>        
-    <source>Public</source>
-    <translation variants="no">Public</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz">
-    <comment>First row of the the two row list item. %L1 is the frequency value of the station. Displayed only if the station does not have a name.</comment>        
-    <source>%L1 MHz</source>
-    <translation variants="no">%L1 MHz</translation>
-    <extra-loc-layout_id>qtl_list_pri_graphic_add</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_list_l1_mhz_small">
-    <comment>Main pane information area item for the frequency. %L1 is the radio station&apos;s frequency. Displayed in small font if station name IS available.</comment>        
-    <source>%L1 MHz</source>
-    <translation variants="no">%L1 MHz</translation>
-    <extra-loc-layout_id>txt_rad_list_l1_mhz_small</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_dblist_l1_mhz_val_country_music">
-    <comment>Second row on the Stations list item (PTY=Program type information). </comment>        
-    <source>Country Music</source>
-    <translation variants="no">Country Music</translation>
-    <extra-loc-layout_id>qtl_list_sec_graphic</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>dblist_val</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_remove_song_from_tagged_songs">
-    <comment>Dialog text displayed when user is about to remove a song from Favorite list in Favorite songs view.</comment>        
-    <source>Remove song from tagged songs?</source>
-    <translation variants="no">Remove song from tagged songs?</translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>rad</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>ra</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_classic_rock">
-    <comment>Main view Information area item. Displayed if PTY is available. Used only in US region.</comment>        
-    <source>Classic rock</source>
-    <translation variants="no">Classic rock</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_subhead_all_stations">
-    <comment>Heading text for the Stations view&apos;s &quot;All stations&quot; view</comment>        
-    <source>All stations</source>
-    <translation variants="no">All stations</translation>
-    <extra-loc-layout_id>qtl_groupbox_simple_sec</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_002</extra-loc-viewid>
-    <extra-loc-positionid>subhead</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_rad_info_folk_music">
-    <comment>Main view Information area item. Displayed if PTY is available. RDS Programme Type identifier for PTY code 28.</comment>        
-    <source>Folk Music</source>
-    <translation variants="no">Folk Music</translation>
-    <extra-loc-layout_id>txt_rad_info_news</extra-loc-layout_id>    
-    <extra-loc-viewid>FmRadio_001</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>Fm</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-</context>
-</TS>
--- a/radioapp/radioapplication/resources/qtg_large_radio.svg	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,308 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1 Tiny//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11-tiny.dtd">
-<svg baseProfile="tiny" height="60" viewBox="0 0 60 60" width="60" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
-<g>
-<rect fill="none" height="60" width="60"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_1_" x1="30" x2="30" y1="11.647" y2="52.3348">
-<stop offset="0" style="stop-color:#FF7236"/>
-<stop offset="0.7939" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#E8522A"/>
-</linearGradient>
-<path d="M58,50.776c0,0.858-0.697,1.556-1.557,1.556H3.555C2.694,52.332,2,51.635,2,50.776V13.443  c0-0.859,0.694-1.556,1.555-1.556h52.889c0.859,0,1.557,0.696,1.557,1.556V50.776z" fill="url(#SVGID_1_)"/>
-<path d="M56.443,11.888H3.555C2.694,11.888,2,12.584,2,13.443v12.056l56-6.158v-5.897  C58,12.584,57.303,11.888,56.443,11.888z" fill="#FFFFFF" fill-opacity="0.1" stroke-opacity="0.1"/>
-<path d="M56.443,12.666c0.428,0,0.777,0.349,0.777,0.777v37.333c0,0.428-0.35,0.778-0.777,0.778H3.555  c-0.43,0-0.778-0.351-0.778-0.778V13.443c0-0.429,0.349-0.777,0.778-0.777H56.443 M56.443,11.888H3.555  C2.694,11.888,2,12.584,2,13.443v37.333c0,0.858,0.694,1.556,1.555,1.556h52.889c0.859,0,1.557-0.697,1.557-1.556V13.443  C58,12.584,57.303,11.888,56.443,11.888L56.443,11.888z" fill="#D83506"/>
-<path d="M56.443,51.555H3.555C2.694,51.555,2,50.857,2,49.999v0.777c0,0.858,0.694,1.556,1.555,1.556h52.889  c0.859,0,1.557-0.697,1.557-1.556v-0.777C58,50.857,57.303,51.555,56.443,51.555z" fill="#600909"/>
-<path d="M56.443,11.888H3.555C2.694,11.888,2,12.584,2,13.443v0.778c0-0.86,0.694-1.556,1.555-1.556  h52.889c0.859,0,1.557,0.695,1.557,1.556v-0.778C58,12.584,57.303,11.888,56.443,11.888z" fill="#FFFFFF" fill-opacity="0.6" stroke-opacity="0.6"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_2_" x1="45.9424" x2="45.9424" y1="32.6411" y2="20.912">
-<stop offset="0" style="stop-color:#444243"/>
-<stop offset="1" style="stop-color:#231F20"/>
-</linearGradient>
-<circle cx="45.942" cy="26.611" fill="url(#SVGID_2_)" r="6.946"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_3_" x1="45.9424" x2="45.9424" y1="33.9702" y2="28.6358">
-<stop offset="0" style="stop-color:#D9D9D9"/>
-<stop offset="1" style="stop-color:#413F3F"/>
-</linearGradient>
-<path d="M45.943,33.558c-3.754,0-6.803-2.979-6.935-6.698c-0.003,0.084-0.013,0.163-0.013,0.248  c0,3.836,3.109,6.946,6.947,6.946c3.836,0,6.945-3.11,6.945-6.946c0-0.085-0.01-0.164-0.01-0.248  C52.744,30.578,49.695,33.558,45.943,33.558z" fill="url(#SVGID_3_)"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_4_" x1="45.9443" x2="45.9443" y1="35.3247" y2="17.436">
-<stop offset="0" style="stop-color:#FF4D00"/>
-<stop offset="1" style="stop-color:#9D1010"/>
-</linearGradient>
-<path d="M45.943,35.609c-4.933,0-8.944-4.013-8.944-8.943c0-4.933,4.012-8.945,8.944-8.945  s8.945,4.013,8.945,8.945C54.889,31.597,50.876,35.609,45.943,35.609L45.943,35.609z M45.943,18.888  c-4.29,0-7.778,3.488-7.778,7.778c0,4.287,3.488,7.776,7.778,7.776c4.287,0,7.779-3.489,7.779-7.776  C53.723,22.376,50.23,18.888,45.943,18.888L45.943,18.888z" fill="url(#SVGID_4_)"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_5_" x1="45.9434" x2="45.9434" y1="20.5371" y2="32.7461">
-<stop offset="0" style="stop-color:#CBCBCB"/>
-<stop offset="1" style="stop-color:#4F4F4F"/>
-</linearGradient>
-<circle cx="45.943" cy="26.642" fill="url(#SVGID_5_)" r="6.104"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_6_" x1="45.9434" x2="45.9434" y1="20.9736" y2="32.3105">
-<stop offset="0" style="stop-color:#FFFFFF"/>
-<stop offset="0.2848" style="stop-color:#FFFFFF"/>
-<stop offset="0.7212" style="stop-color:#7B7B7B"/>
-<stop offset="1" style="stop-color:#A7A7A7"/>
-</linearGradient>
-<circle cx="45.943" cy="26.642" fill="url(#SVGID_6_)" r="5.67"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_7_" x1="45.9434" x2="45.9434" y1="21.4746" y2="31.9404">
-<stop offset="0" style="stop-color:#D9D9D9"/>
-<stop offset="0.8242" style="stop-color:#636363"/>
-<stop offset="1" style="stop-color:#636363"/>
-</linearGradient>
-<path d="M50.705,24.468c0.303,0.662,0.471,1.396,0.471,2.174c0,2.889-2.342,5.233-5.232,5.233  c-2.888,0-5.232-2.345-5.232-5.233s2.345-5.232,5.232-5.232C48.058,21.409,49.879,22.663,50.705,24.468z" fill="url(#SVGID_7_)"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_8_" x1="45.9434" x2="45.9434" y1="25.4961" y2="22.9348">
-<stop offset="0" style="stop-color:#636363"/>
-<stop offset="1" style="stop-color:#323232"/>
-</linearGradient>
-<polygon fill="url(#SVGID_8_)" points="44.636,25.397 45.943,22.782 47.251,25.397 "/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_9_" x1="20.2773" x2="20.2773" y1="30.6846" y2="20.667">
-<stop offset="0" style="stop-color:#636363"/>
-<stop offset="0.6667" style="stop-color:#515151"/>
-<stop offset="1" style="stop-color:#323232"/>
-</linearGradient>
-<rect fill="url(#SVGID_9_)" height="10.889" width="28" x="6.277" y="20.055"/>
-<rect fill="#D9D9D9" height="0.777" width="28" x="6.277" y="30.943"/>
-<polygon fill="#A6A8AB" points="31.945,25.499 31.945,27.832 29.609,27.832 29.609,26.276 28.832,26.276 28.832,27.832   26.498,27.832 26.498,26.276 25.723,26.276 25.723,27.832 23.387,27.832 23.387,26.276 22.61,26.276 22.61,27.832 20.277,27.832   20.277,25.499 19.499,25.499 19.499,27.832 17.166,27.832 17.166,26.276 16.388,26.276 16.388,27.832 14.056,27.832 14.056,26.276   13.276,26.276 13.276,27.832 10.944,27.832 10.944,26.276 10.165,26.276 10.165,27.832 8.609,27.832 8.609,25.499 7.833,25.499   7.833,28.609 8.609,28.609 10.165,28.609 10.944,28.609 13.276,28.609 14.056,28.609 16.388,28.609 17.166,28.609 19.499,28.609   20.277,28.609 22.61,28.609 23.387,28.609 25.723,28.609 26.498,28.609 28.832,28.609 29.609,28.609 31.945,28.609 32.721,28.609   32.721,27.832 32.721,25.499 "/>
-<rect fill="#E00000" height="10.889" width="1.556" x="20.301" y="20.055"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_10_" x1="9.127" x2="9.127" y1="40.2437" y2="43.355">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<circle cx="9.127" cy="41.832" fill="url(#SVGID_10_)" r="1.556"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_11_" x1="9.126" x2="9.126" y1="40.7729" y2="42.8472">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<circle cx="9.126" cy="41.832" fill="url(#SVGID_11_)" r="1.039"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_12_" x1="13.7295" x2="13.7295" y1="40.2437" y2="43.355">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<path d="M15.285,41.832c0,0.858-0.693,1.556-1.556,1.556c-0.857,0-1.555-0.697-1.555-1.556  c0-0.861,0.697-1.556,1.555-1.556C14.592,40.276,15.285,40.971,15.285,41.832z" fill="url(#SVGID_12_)"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_13_" x1="13.7295" x2="13.7295" y1="40.7729" y2="42.8472">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<circle cx="13.73" cy="41.832" fill="url(#SVGID_13_)" r="1.038"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_14_" x1="18.3955" x2="18.3955" y1="40.2437" y2="43.355">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<circle cx="18.396" cy="41.832" fill="url(#SVGID_14_)" r="1.555"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_15_" x1="18.3955" x2="18.3955" y1="40.7729" y2="42.8472">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<circle cx="18.396" cy="41.832" fill="url(#SVGID_15_)" r="1.038"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_16_" x1="23.0615" x2="23.0615" y1="40.2437" y2="43.355">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<circle cx="23.062" cy="41.832" fill="url(#SVGID_16_)" r="1.556"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_17_" x1="23.0635" x2="23.0635" y1="40.7729" y2="42.8472">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<circle cx="23.063" cy="41.832" fill="url(#SVGID_17_)" r="1.038"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_18_" x1="27.7295" x2="27.7295" y1="40.2437" y2="43.355">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<circle cx="27.729" cy="41.832" fill="url(#SVGID_18_)" r="1.556"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_19_" x1="27.7295" x2="27.7295" y1="40.7729" y2="42.8472">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<circle cx="27.729" cy="41.832" fill="url(#SVGID_19_)" r="1.037"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_20_" x1="32.3965" x2="32.3965" y1="40.2437" y2="43.355">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<circle cx="32.396" cy="41.832" fill="url(#SVGID_20_)" r="1.556"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_21_" x1="32.3965" x2="32.3965" y1="40.7729" y2="42.8472">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<circle cx="32.396" cy="41.832" fill="url(#SVGID_21_)" r="1.037"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_22_" x1="9.127" x2="9.127" y1="44.9106" y2="48.022">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<circle cx="9.127" cy="46.499" fill="url(#SVGID_22_)" r="1.556"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_23_" x1="9.126" x2="9.126" y1="45.4399" y2="47.5142">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<circle cx="9.126" cy="46.499" fill="url(#SVGID_23_)" r="1.039"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_24_" x1="13.7295" x2="13.7295" y1="44.9106" y2="48.022">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<path d="M15.285,46.499c0,0.858-0.693,1.556-1.556,1.556c-0.857,0-1.555-0.697-1.555-1.556  c0-0.861,0.697-1.556,1.555-1.556C14.592,44.943,15.285,45.638,15.285,46.499z" fill="url(#SVGID_24_)"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_25_" x1="13.7295" x2="13.7295" y1="45.4399" y2="47.5142">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<circle cx="13.73" cy="46.499" fill="url(#SVGID_25_)" r="1.038"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_26_" x1="18.3955" x2="18.3955" y1="44.9106" y2="48.022">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<circle cx="18.396" cy="46.499" fill="url(#SVGID_26_)" r="1.555"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_27_" x1="18.3955" x2="18.3955" y1="45.4399" y2="47.5142">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<circle cx="18.396" cy="46.499" fill="url(#SVGID_27_)" r="1.038"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_28_" x1="23.0615" x2="23.0615" y1="44.9106" y2="48.022">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<circle cx="23.062" cy="46.499" fill="url(#SVGID_28_)" r="1.556"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_29_" x1="23.0635" x2="23.0635" y1="45.4399" y2="47.5142">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<circle cx="23.063" cy="46.499" fill="url(#SVGID_29_)" r="1.038"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_30_" x1="27.7295" x2="27.7295" y1="44.9106" y2="48.022">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<circle cx="27.729" cy="46.499" fill="url(#SVGID_30_)" r="1.556"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_31_" x1="27.7295" x2="27.7295" y1="45.4399" y2="47.5142">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<circle cx="27.729" cy="46.499" fill="url(#SVGID_31_)" r="1.037"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_32_" x1="32.3965" x2="32.3965" y1="44.9106" y2="48.022">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<circle cx="32.396" cy="46.499" fill="url(#SVGID_32_)" r="1.556"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_33_" x1="32.3965" x2="32.3965" y1="45.4399" y2="47.5142">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<circle cx="32.396" cy="46.499" fill="url(#SVGID_33_)" r="1.037"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_34_" x1="36.999" x2="36.999" y1="40.2437" y2="43.355">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<circle cx="36.999" cy="41.832" fill="url(#SVGID_34_)" r="1.556"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_35_" x1="36.999" x2="36.999" y1="40.7729" y2="42.8472">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<circle cx="36.999" cy="41.832" fill="url(#SVGID_35_)" r="1.037"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_36_" x1="41.666" x2="41.666" y1="40.2437" y2="43.355">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<circle cx="41.666" cy="41.832" fill="url(#SVGID_36_)" r="1.556"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_37_" x1="41.666" x2="41.666" y1="40.7729" y2="42.8472">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<circle cx="41.666" cy="41.832" fill="url(#SVGID_37_)" r="1.037"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_38_" x1="46.333" x2="46.333" y1="40.2437" y2="43.355">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<circle cx="46.333" cy="41.832" fill="url(#SVGID_38_)" r="1.556"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_39_" x1="46.333" x2="46.333" y1="40.7729" y2="42.8472">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<circle cx="46.333" cy="41.832" fill="url(#SVGID_39_)" r="1.037"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_40_" x1="50.999" x2="50.999" y1="40.2437" y2="43.355">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<path d="M52.553,41.832c0,0.858-0.691,1.556-1.553,1.556c-0.858,0-1.556-0.697-1.556-1.556  c0-0.861,0.697-1.556,1.556-1.556C51.861,40.276,52.553,40.971,52.553,41.832z" fill="url(#SVGID_40_)"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_41_" x1="50.999" x2="50.999" y1="40.7729" y2="42.8472">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<path d="M52.037,41.832c0,0.573-0.467,1.037-1.037,1.037c-0.573,0-1.039-0.464-1.039-1.037  s0.466-1.037,1.039-1.037C51.57,40.795,52.037,41.259,52.037,41.832z" fill="url(#SVGID_41_)"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_42_" x1="36.999" x2="36.999" y1="44.9106" y2="48.022">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<circle cx="36.999" cy="46.499" fill="url(#SVGID_42_)" r="1.556"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_43_" x1="36.999" x2="36.999" y1="45.4399" y2="47.5142">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<circle cx="36.999" cy="46.499" fill="url(#SVGID_43_)" r="1.037"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_44_" x1="41.666" x2="41.666" y1="44.9106" y2="48.022">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<circle cx="41.666" cy="46.499" fill="url(#SVGID_44_)" r="1.556"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_45_" x1="41.666" x2="41.666" y1="45.4399" y2="47.5142">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<circle cx="41.666" cy="46.499" fill="url(#SVGID_45_)" r="1.037"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_46_" x1="46.333" x2="46.333" y1="44.9106" y2="48.022">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<circle cx="46.333" cy="46.499" fill="url(#SVGID_46_)" r="1.556"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_47_" x1="46.333" x2="46.333" y1="45.4399" y2="47.5142">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<circle cx="46.333" cy="46.499" fill="url(#SVGID_47_)" r="1.037"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_48_" x1="50.999" x2="50.999" y1="44.9106" y2="48.022">
-<stop offset="0" style="stop-color:#BA1212"/>
-<stop offset="1" style="stop-color:#FF7236"/>
-</linearGradient>
-<path d="M52.553,46.499c0,0.858-0.691,1.556-1.553,1.556c-0.858,0-1.556-0.697-1.556-1.556  c0-0.861,0.697-1.556,1.556-1.556C51.861,44.943,52.553,45.638,52.553,46.499z" fill="url(#SVGID_48_)"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_49_" x1="50.999" x2="50.999" y1="45.4399" y2="47.5142">
-<stop offset="0" style="stop-color:#000000"/>
-<stop offset="1" style="stop-color:#383838"/>
-</linearGradient>
-<path d="M52.037,46.499c0,0.573-0.467,1.037-1.037,1.037c-0.573,0-1.039-0.464-1.039-1.037  s0.466-1.037,1.039-1.037C51.57,45.462,52.037,45.926,52.037,46.499z" fill="url(#SVGID_49_)"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_50_" x1="49.833" x2="49.833" y1="11.5854" y2="6.285">
-<stop offset="0" style="stop-color:#CBCBCB"/>
-<stop offset="0.1576" style="stop-color:#808080"/>
-<stop offset="0.6545" style="stop-color:#E5E5E5"/>
-<stop offset="1" style="stop-color:#4F4F4F"/>
-</linearGradient>
-<rect fill="url(#SVGID_50_)" height="5.443" width="6.999" x="46.333" y="6.444"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_51_" x1="37.3877" x2="37.3877" y1="10.1592" y2="7.1295">
-<stop offset="0" style="stop-color:#CBCBCB"/>
-<stop offset="0.1576" style="stop-color:#808080"/>
-<stop offset="0.6545" style="stop-color:#E5E5E5"/>
-<stop offset="1" style="stop-color:#4F4F4F"/>
-</linearGradient>
-<rect fill="url(#SVGID_51_)" height="3.111" width="17.89" x="28.443" y="7.221"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_52_" x1="19.1104" x2="19.1104" y1="9.4683" y2="7.9534">
-<stop offset="0" style="stop-color:#CBCBCB"/>
-<stop offset="0.1576" style="stop-color:#808080"/>
-<stop offset="0.6545" style="stop-color:#E5E5E5"/>
-<stop offset="1" style="stop-color:#4F4F4F"/>
-</linearGradient>
-<rect fill="url(#SVGID_52_)" height="1.556" width="18.666" x="9.777" y="7.999"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_53_" x1="8.6104" x2="8.6104" y1="10.1592" y2="7.1295">
-<stop offset="0" style="stop-color:#CBCBCB"/>
-<stop offset="0.1576" style="stop-color:#808080"/>
-<stop offset="0.6545" style="stop-color:#E5E5E5"/>
-<stop offset="1" style="stop-color:#4F4F4F"/>
-</linearGradient>
-<rect fill="url(#SVGID_53_)" height="3.111" width="2.334" x="7.443" y="7.221"/>
-<path d="M49.832,11.498c-1.285,0-2.333-1.047-2.333-2.332c0-1.288,1.048-2.334,2.333-2.334s2.334,1.046,2.334,2.334  C52.166,10.451,51.117,11.498,49.832,11.498L49.832,11.498z" fill-opacity="0.2" stroke-opacity="0.2"/>
-<circle cx="49.833" cy="9.166" fill-opacity="0.2" r="1.944" stroke-opacity="0.2"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_54_" x1="49.8311" x2="49.8311" y1="8.0317" y2="10.2999">
-<stop offset="0" style="stop-color:#E5E5E5"/>
-<stop offset="0.7576" style="stop-color:#A7A7A7"/>
-<stop offset="1" style="stop-color:#CBCBCB"/>
-</linearGradient>
-<circle cx="49.831" cy="9.166" fill="url(#SVGID_54_)" r="1.556"/>
-<linearGradient gradientUnits="userSpaceOnUse" id="SVGID_55_" x1="49.8311" x2="49.8311" y1="7.6592" y2="10.6737">
-<stop offset="0" style="stop-color:#FFFFFF"/>
-<stop offset="0.2848" style="stop-color:#FFFFFF"/>
-<stop offset="0.7212" style="stop-color:#7B7B7B"/>
-<stop offset="1" style="stop-color:#A7A7A7"/>
-</linearGradient>
-<path d="M49.832,7.999C50.475,7.999,51,8.521,51,9.166c0,0.643-0.525,1.166-1.168,1.166  s-1.166-0.523-1.166-1.166C48.666,8.521,49.189,7.999,49.832,7.999 M49.832,7.61c-0.859,0-1.557,0.694-1.557,1.556  c0,0.858,0.697,1.556,1.557,1.556c0.857,0,1.555-0.697,1.555-1.556C51.387,8.305,50.689,7.61,49.832,7.61L49.832,7.61z" fill="url(#SVGID_55_)"/>
-<rect fill="none" height="60" width="60"/>
-</g>
-</svg>
--- a/radioapp/radioapplication/resources/service_conf.xml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8" ?>
-<service>
-  <name>fmradio</name>
-  <filepath>No path</filepath>
-  <description>Radio services</description>
-  <interface>
-     <name>com.nokia.symbian.IRadioControl</name>
-     <version>1.0</version>
-     <description>Interface to control radio playback</description>
-   </interface>
-  <interface>
-     <name>com.nokia.symbian.IRadioMonitor</name>
-     <version>1.0</version>
-     <description>Interface to monitor radio status changes</description>
-   </interface>
-</service>
--- a/radioapp/radioapplication/src/main.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +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:
-*
-*/
-
-// System includes
-#include <HbTranslator>
-
-// User includes
-#include "radioapplication.h"
-#include "radiologger.h"
-
-
-/*!
- * Runs the application
- */
-int main( int argc, char* argv[] )
-{
-    INSTALL_MESSAGE_HANDLER // Installs the file tracer if enabled
-
-    LOG_TIMESTAMP( "Tesla started" );
-
-    RadioApplication app( argc, argv );
-
-    HbTranslator translator;
-
-    const int returnValue = app.exec();
-
-    UNINSTALL_MESSAGE_HANDLER // Uninstalls the file tracer
-
-    return returnValue;
-}
--- a/radioapp/radioapplication/src/radioapplication.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,183 +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:
-*
-*/
-
-// System includes
-#include <QTimer>
-#include <HbDeviceMessageBox>
-#include <xqsettingsmanager.h>
-#include <xqsettingskey.h>
-#include <xqserviceutil.h>
-#include <HbSplashScreen>
-
-// User includes
-#include "radioapplication.h"
-#include "radiowindow.h"
-#include "radiouiengine.h"
-#include "radio_global.h"
-#include "radiologger.h"
-
-#ifdef BUILD_WIN32
-#   include "testwindow_win32.h"
-#   define CREATE_WIN32_TEST_WINDOW \
-        mWin32Window.reset( new Win32Window() ); \
-        mMainWindow->setParent( mWin32Window.data() ); \
-        mWin32Window->addHbWindow( mMainWindow.data() ); \
-        mWin32Window->show();
-#   define INIT_WIN32_TEST_WINDOW \
-        mWin32Window->init();
-#else
-#   define CREATE_WIN32_TEST_WINDOW
-#   define INIT_WIN32_TEST_WINDOW
-#endif // BUILD_WIN32
-
-
-static XQSettingsKey gConnectionKey( XQSettingsKey::TargetCentralRepository, CENREP_CORE_APPLICATION_UIS, ID_NETWORK_CONNECTION_ALLOWED );
-
-/*!
- * Constructor
- */
-RadioApplication::RadioApplication( int &argc, char *argv[] ) :
-    HbApplication( argc, argv, Hb::NoSplash ),
-    mSettingsManager( new XQSettingsManager( this ) )
-{
-    // Initializes the radio engine utils if UI logs are entered into the engine log
-    INIT_COMBINED_LOGGER
-
-    LOG_TIMESTAMP( "Start radio" );
-    setApplicationName( hbTrId( "txt_rad_title_fm_radio" ) );
-
-    if ( XQServiceUtil::isService() ) {
-
-        // Radio was started as a highway service from homescreen widget.
-        // Widget has already done the offline mode check so we can start without checking
-        init();
-
-    } else {
-
-        if ( isInOfflineMode() ) {
-            askOfflineModePermission( hbTrId( "txt_rad_info_activate_radio_in_offline_mode" ) );
-        } else {
-            init();
-        }
-
-    }
-}
-
-/*!
- *
- */
-RadioApplication::~RadioApplication()
-{
-    // Destructor needs to be defined. See explanation from RadioEngineWrapperPrivate destructor.
-    // Releases the radio engine utils if it was initialized in the beginning
-    RELEASE_COMBINED_LOGGER
-}
-
-/*!
- * Private slot
- *
- */
-void RadioApplication::checkOfflineMode()
-{
-    if ( isInOfflineMode() ) {
-        askOfflineModePermission( hbTrId( "txt_rad_info_continue_using_the_radio_in_offline" ) );
-    }
-}
-
-/*!
- * Private slot
- *
- */
-void RadioApplication::handleOfflineQueryAnswer()
-{
-    HbDeviceMessageBox* box = static_cast<HbDeviceMessageBox*>( sender() );
-    box->deleteLater();
-    if ( box->isAcceptAction( box->triggeredAction() ) ) {
-
-        // If main window has not been created yet it means the offline question was asked during startup
-        // so we must continue with the startup sequence. If the main window was already created it means
-        // the question was asked when the radio was already running and the offline mode was activated.
-        // In that case there is no need to do anything since the user wants to continue listening to radio.
-        if ( !mMainWindow ) {
-            init();
-        }
-
-    } else {
-        quit();
-    }
-}
-
-/*!
- *
- */
-void RadioApplication::init()
-{
-    // Try to optimize startup time by launching the radio server process as soon as possible.
-    // This way the server and UI are being initialized at the same time and the startup is faster.
-//        RadioUiEngine::launchRadioServer();
-
-    // Splash screen needs to be shown when not started by homescreen widget
-    if ( !XQServiceUtil::isService() ) {
-        HbSplashScreen::setAppId( "0x2002FF4E" );
-        HbSplashScreen::start();
-    }
-
-    Radio::connect( mSettingsManager,   SIGNAL(valueChanged(XQSettingsKey,QVariant)),
-                    this,               SLOT(checkOfflineMode()) );
-
-    bool monitoringStarted = mSettingsManager->startMonitoring( gConnectionKey );
-    LOG_ASSERT( monitoringStarted, LOG( "Failed to start monitoring Offline mode!" ) );
-    Q_UNUSED( monitoringStarted );
-
-    mMainWindow.reset( new RadioWindow() );
-
-    CREATE_WIN32_TEST_WINDOW
-
-    INIT_WIN32_TEST_WINDOW
-
-    // Construct the real views
-    mMainWindow->init();
-
-    mMainWindow->show();
-}
-
-/*!
- *
- */
-bool RadioApplication::isInOfflineMode() const
-{
-    const QVariant connectionAllowed = mSettingsManager->readItemValue( gConnectionKey );
-    if ( connectionAllowed.canConvert( QVariant::Int ) && connectionAllowed.toInt() == NetworkNotAllowed ) {
-        return true;
-    }
-
-    return false;
-}
-
-/*!
- *
- */
-void RadioApplication::askOfflineModePermission( const QString& question )
-{
-    HbDeviceMessageBox* box = new HbDeviceMessageBox( question, HbMessageBox::MessageTypeQuestion, this );
-    box->setStandardButtons( HbMessageBox::Yes | HbMessageBox::No );
-    box->setTimeout( HbPopup::NoTimeout );
-    box->setDismissPolicy( HbPopup::NoDismiss );
-    Radio::connect( box,    SIGNAL(aboutToClose()),
-                    this,   SLOT(handleOfflineQueryAnswer()) );
-    box->show();
-}
--- a/radioapp/radioapplication/src/testwindow_win32.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,353 +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:
-*
-*/
-
-// System includes
-#include <QPushButton>
-#include <QGridLayout>
-#include <QVBoxLayout>
-#include <HbMainWindow>
-#include <QTimer>
-#include <QMessageBox>
-#include <QComboBox>
-#include <QLocalSocket>
-#include <QDir>
-#include <QStringListModel>
-#include <QSettings>
-#include <HbInstance>
-#include <QLabel>
-
-// User includes
-#include "testwindow_win32.h"
-#include "radioapplication.h"
-#include "radiologger.h"
-#include "radio_global.h"
-#include "radioenginewrapper_win32_p.h"
-
-const int WINDOW_WIDTH = 360;
-const int WINDOW_HEIGHT = 640;
-const int TOOLBAR_HEIGHT = 120;
-const int WINDOW_EXTRA_WIDTH = 5;
-
-const QString KBtnDisconnectHeadset = "Disconnect Headset";
-const QString KBtnConnectHeadset = "Connect Headset";
-
-const QString KBtnGoOffline = "Go Offline";
-const QString KBtnGoOnline = "Go Online";
-
-struct Song
-{
-    const char* mArtist;
-    const char* mTitle;
-};
-
-const Song KRecognizedSongs[] = {
-    { "Red Hot Chili Peppers", "Under The Bridge" },
-    { "Queens Of The Stone Age", "No One Knows" },
-    { "The Presidents of the United States of America", "Dune Buggy" },
-    { "System of a Down", "Aerials" },
-    { "The White Stripes", "Seven Nation Army" },
-    { "Alice In Chains", "When The Sun Rose Again" },
-    { "Bullet For My Valentine", "Tears Don't Fall" }
-};
-const int KSongsCount = sizeof( KRecognizedSongs ) / sizeof( KRecognizedSongs[0] );
-
-/*!
- *
- */
-Win32Window::Win32Window() :
-    QWidget( 0 ),
-    mOrientationButton( new QPushButton( "Change Orientation", this ) ),
-    mVolUpButton( new QPushButton( "Volume Up", this ) ),
-    mVolDownButton( new QPushButton( "Volume Down", this ) ),
-    mAddSongButton( new QPushButton( "Add Song", this ) ),
-    mClearSongButton( new QPushButton( "Clear Song", this ) ),
-    mHeadsetButton( new QPushButton( KBtnDisconnectHeadset, this ) ),
-    mHeadsetConnected( true ),
-    mOfflineButton( new QPushButton( KBtnGoOffline, this ) ),
-    mThemeBox( new QComboBox( this ) ),
-    mToolbarLayout( 0 ),
-    mVolume( 5 ),
-    mRadioWindow( 0 ),
-    mOrientation( Qt::Vertical ),
-    mSongIndex( 0 )
-{
-    mThemeBox->setEditable( false );
-    initThemes();    
-
-    Radio::connect( mOrientationButton, SIGNAL(clicked()), this, SLOT(changeOrientation()) );
-    Radio::connect( mVolUpButton, SIGNAL(clicked()), this, SLOT(volumeUp()) );
-    Radio::connect( mVolDownButton, SIGNAL(clicked()), this, SLOT(volumeDown()) );
-    Radio::connect( mHeadsetButton, SIGNAL(clicked()), this, SLOT(toggleHeadsetStatus()) );
-    Radio::connect( mAddSongButton, SIGNAL(clicked()), this, SLOT(addSong()) );
-    Radio::connect( mClearSongButton, SIGNAL(clicked()), this, SLOT(clearSong()) );
-    Radio::connect( mOfflineButton, SIGNAL(clicked()), this, SLOT(toggleOffline()) );
-    Radio::connect( mThemeBox, SIGNAL(activated(QString)), this, SLOT(changeTheme(QString)) );
-
-    QTimer::singleShot( 0, this, SLOT(updateWindowSize()) );
-}
-
-/*!
- *
- */
-Win32Window::~Win32Window()
-{
-}
-
-/*!
- *
- */
-void Win32Window::addHbWindow( HbMainWindow* radioWindow )
-{
-    mRadioWindow = radioWindow;
-    mOrientation = mRadioWindow->orientation();
-    updateWindowSize();
-
-    QVBoxLayout* layout = new QVBoxLayout( this );
-    layout->setMargin( 5 );
-    layout->setSpacing( 5 );
-
-    mToolbarLayout = new QGridLayout( this );
-    mToolbarLayout->setHorizontalSpacing( 5 );
-    mToolbarLayout->setVerticalSpacing( 5 );
-
-    mToolbarLayout->addWidget( mOrientationButton, 0, 0 );
-    mToolbarLayout->addWidget( mVolUpButton, 0, 1 );
-    mToolbarLayout->addWidget( mVolDownButton, 1, 1 );
-    mToolbarLayout->addWidget( mHeadsetButton, 1, 0 );
-    mToolbarLayout->addWidget( mAddSongButton, 2, 0 );
-    mToolbarLayout->addWidget( mClearSongButton, 2, 1 );
-    mToolbarLayout->addWidget( mOfflineButton, 3, 0 );
-
-    QGridLayout* themeLayout = new QGridLayout( this );
-    themeLayout->addWidget( new QLabel( "Theme:", this ), 0, 0 );
-    themeLayout->addWidget( mThemeBox, 0, 1 );
-    themeLayout->setColumnStretch( 1, 2 );
-
-    mToolbarLayout->addLayout( themeLayout, 3, 1 );
-    mToolbarLayout->setColumnStretch( 0, 1 );
-    mToolbarLayout->setColumnStretch( 1, 1 );
-
-    layout->addItem( mToolbarLayout );
-    layout->addWidget( radioWindow );
-
-    setLayout( layout );
-}
-
-/*!
- *
- */
-void Win32Window::init()
-{
-    RadioEngineWrapperPrivate* wrapper = RadioEngineWrapperPrivate::instance();
-    if ( wrapper ) {
-        QString error = wrapper->dataParsingError();
-        if ( !error.isEmpty() ) {
-            QMessageBox msg( QMessageBox::Warning, "Unable to parse radio settings", error, QMessageBox::Ok );
-            msg.exec();
-        }
-
-        if ( wrapper->isOffline() ) {
-            mOfflineButton->setText( KBtnGoOnline );
-        }
-    }
-    updateWindowSize();
-}
-
-/*!
- * Private slot
- */
-void Win32Window::changeOrientation()
-{
-    if ( mOrientation == Qt::Horizontal ) {
-        mOrientation = Qt::Vertical;
-    } else {
-        mOrientation = Qt::Horizontal;
-    }
-
-    mRadioWindow->setOrientation( mOrientation );
-    updateWindowSize();
-}
-
-/*!
- * Private slot
- */
-void Win32Window::volumeUp()
-{
-    if ( ++mVolume > MAXIMUM_VOLUME_LEVEL ) {
-        mVolume = MAXIMUM_VOLUME_LEVEL;
-    }
-    RadioEngineWrapperPrivate::instance()->setVolume( mVolume );
-}
-
-/*!
- * Private slot
- */
-void Win32Window::volumeDown()
-{
-    if ( --mVolume < 0 ) {
-        mVolume = 0;
-    }
-    RadioEngineWrapperPrivate::instance()->setVolume( mVolume );
-}
-
-/*!
- * Private slot
- */
-void Win32Window::toggleHeadsetStatus()
-{
-    mHeadsetConnected = !mHeadsetConnected;
-    if ( mHeadsetConnected ) {
-        mHeadsetButton->setText( KBtnDisconnectHeadset );
-    } else {
-        mHeadsetButton->setText( KBtnConnectHeadset );
-    }
-    RadioEngineWrapperPrivate::instance()->setHeadsetStatus( mHeadsetConnected );
-}
-
-/*!
- * Private slot
- */
-void Win32Window::updateWindowSize()
-{
-    if ( mOrientation == Qt::Horizontal ) {
-        resize( WINDOW_HEIGHT + WINDOW_EXTRA_WIDTH, WINDOW_WIDTH + TOOLBAR_HEIGHT );
-    } else {
-        resize( WINDOW_WIDTH + WINDOW_EXTRA_WIDTH, WINDOW_HEIGHT + TOOLBAR_HEIGHT );
-    }
-}
-
-/*!
- * Private slot
- */
-void Win32Window::addSong()
-{
-    Song song = KRecognizedSongs[mSongIndex++];
-    mSongIndex %= KSongsCount;
-
-    RadioEngineWrapperPrivate::instance()->addSong( song.mArtist, song.mTitle );
-}
-
-/*!
- * Private slot
- */
-void Win32Window::clearSong()
-{
-    RadioEngineWrapperPrivate::instance()->clearSong();
-}
-
-/*!
- * Private slot
- */
-void Win32Window::toggleOffline()
-{
-    bool offline = !RadioEngineWrapperPrivate::instance()->isOffline();
-    RadioEngineWrapperPrivate::instance()->setOffline( offline );
-    if ( offline ) {
-        mOfflineButton->setText( KBtnGoOnline );
-    } else {
-        mOfflineButton->setText( KBtnGoOffline );
-    }
-}
-
-/*!
- * Private slot
- */
-void Win32Window::changeTheme( const QString& theme )
-{
-    LOG_FORMAT( "Changing to theme %s", GETSTRING( theme ) );
-    QLocalSocket socket;
-    socket.connectToServer( "hbthemeserver" );
-    if ( socket.waitForConnected( 3000 ) ) {
-        QByteArray outputByteArray;
-        QDataStream outputDataStream( &outputByteArray, QIODevice::WriteOnly );
-        outputDataStream << 4; // EThemeSelection from HbThemeServerRequest in hbthemecommon_p.h
-        outputDataStream << theme;
-        socket.write( outputByteArray );
-        socket.flush();
-    }
-}
-
-/*!
- *
- */
-void Win32Window::initThemes()
-{
-    QStringList themeList;
-    foreach ( const QString& themeRootPath, themeRootPaths() ) {
-        QDir dir( themeRootPath ) ;
-        QStringList list = dir.entryList( QDir::AllDirs | QDir::NoDotAndDotDot, QDir::Name );
-
-        if ( list.contains( "themes", Qt::CaseSensitive ) ) {
-            QDir root = themeRootPath;
-            dir.setPath( root.path() + "/themes/icons/" );
-            QStringList iconthemeslist = dir.entryList( QDir::AllDirs | QDir::NoDotAndDotDot, QDir::Name );
-            foreach ( QString themefolder, iconthemeslist ) {
-                QDir iconThemePath( root.path() + "/themes/icons/" + themefolder );
-                if ( iconThemePath.exists( "index.theme" ) ) {
-                    QSettings iniSetting( iconThemePath.path() + "/index.theme", QSettings::IniFormat );
-                    iniSetting.beginGroup( "Icon Theme" );
-                    QString hidden = iniSetting.value( "Hidden" ).toString();
-                    QString name = iniSetting.value( "Name" ).toString();
-                    iniSetting.endGroup();
-                    if ( (hidden == "true") || ( hidden == "" ) || ( name != themefolder ) ) {
-                        iconthemeslist.removeOne( themefolder );
-                    }
-                }
-                else {
-                     iconthemeslist.removeOne( themefolder );
-                }
-
-            }
-
-            themeList.append( iconthemeslist );
-        }
-    }
-
-    if ( themeList.count() == 0 ) {
-        themeList.insert( 0, "hbdefault" ); //adding one default entry
-        mThemeBox->setEnabled( false );
-    }
-
-    mThemeBox->setModel( new QStringListModel( themeList, mThemeBox ) );
-
-    for ( int i = 0; i < themeList.count(); ++i ) {
-        QString theme = themeList.at( i );
-        if ( theme == HbInstance::instance()->theme()->name() ) {
-            mThemeBox->setCurrentIndex( i );
-        }
-    }
-}
-
-/*!
- *
- */
-QStringList Win32Window::themeRootPaths()
-{
-    QStringList rootDirs;
-    QString envDir = qgetenv( "HB_THEMES_DIR" );
-    if ( !envDir.isEmpty() ) {
-        rootDirs << envDir;
-    }
-
-    QString resourcesDir = HB_RESOURCES_DIR;
-    if ( resourcesDir.isEmpty() ) {
-        resourcesDir = "/hb_dev/src/hbcore/resources";
-    }
-    rootDirs << resourcesDir;
-
-    return rootDirs;
-}
--- a/radioapp/radioapplication/win32_stubs/qsysteminfo.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +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:
-*
-*/
-
-// THIS IS A STUB CLASS FOR WIN32 ENVIRONMENT!
-// It is only meant to compile, not to actually do anything
-
-#ifndef Q_SYSTEMINFO_H
-#define Q_SYSTEMINFO_H
-
-#include <QObject>
-
-namespace QtMobility {
-    
-class QSystemDeviceInfo : public QObject
-{
-    Q_OBJECT
-public:
-
-    QSystemDeviceInfo( QObject* parent = 0 );
-    virtual ~QSystemDeviceInfo();
-
-    enum Profile { GeneralProfile, OfflineProfile };
-    Profile currentProfile() { return GeneralProfile; }
-
-signals:
-
-    void currentProfileChanged(QSystemDeviceInfo::Profile);
-    
-};
-
-
-}
-
-#endif // Q_SYSTEMINFO_H 
--- a/radioapp/radioapplication/win32_stubs/win32_stubs.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,151 +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 "qsysteminfo.h"
-#include "xqserviceprovider.h"
-#include "xqsettingskey.h"
-#include "xqsettingsmanager.h"
-#include "radio_global.h"
-
-/*!
- *
- */
-QtMobility::QSystemDeviceInfo::QSystemDeviceInfo( QObject* parent ) :
-    QObject( parent )
-{
-}
-
-/*!
- *
- */
-QtMobility::QSystemDeviceInfo::~QSystemDeviceInfo()
-{
-}
-
-/*!
- *
- */
-XQServiceProvider::XQServiceProvider( const QString&, QObject* parent ) :
-    QObject( parent )
-{
-}
-
-/*!
- *
- */
-XQServiceProvider::~XQServiceProvider()
-{
-}
-
-
-/*!
- *
- */
-XQSettingsKey::XQSettingsKey( XQSettingsKey::Target, long int uid, unsigned long int key ) :
-    mUid( uid ),
-    mKey( key )
-{
-}
-
-/*!
- *
- */
-XQSettingsKey::~XQSettingsKey()
-{
-}
-
-/*!
- *
- */
-XQSettingsKey::Target XQSettingsKey::target() const
-{
-    return TargetCentralRepository;
-}
-
-/*!
- *
- */
-long int XQSettingsKey::uid() const
-{
-    return mUid;
-}
-
-/*!
- *
- */
-unsigned long int XQSettingsKey::key() const
-{
-    return mKey;
-}
-
-/*!
- *
- */
-XQSettingsManager::XQSettingsManager( QObject* parent ) :
-    QObject( parent )
-{
-}
-
-/*!
- *
- */
-XQSettingsManager::~XQSettingsManager()
-{
-}
-
-/*!
- *
- */
-QVariant XQSettingsManager::readItemValue( const XQSettingsKey& key, XQSettingsManager::Type )
-{
-    if ( key.uid() == CENREP_CORE_APPLICATION_UIS && key.key() == ID_NETWORK_CONNECTION_ALLOWED ) {
-        return NetworkAllowed;
-    }
-    return QVariant();
-}
-
-/*!
- *
- */
-bool XQSettingsManager::writeItemValue( const XQSettingsKey&, const QVariant& )
-{
-    return true;
-}
-
-/*!
- *
- */
-bool XQSettingsManager::startMonitoring( const XQSettingsKey&, XQSettingsManager::Type )
-{
-    return true;
-}
-
-/*!
- *
- */
-bool XQSettingsManager::stopMonitoring( const XQSettingsKey& )
-{
-    return true;
-}
-
-/*!
- *
- */
-XQSettingsManager::Error XQSettingsManager::error() const
-{
-    return NoError;
-}
--- a/radioapp/radioapplication/win32_stubs/xqserviceprovider.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +0,0 @@
-/*
-* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-*
-* This program is free software: you can redistribute it and/or modify
-* it under the terms of the GNU Lesser General Public License as published by
-* the Free Software Foundation, version 2.1 of the License.
-* 
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-* GNU Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public License
-* along with this program.  If not, 
-* see "http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html/".
-*
-* Description:                                                         
-*
-*/
-
-#ifndef XQSERVICEABSTRACTSERVICE_H
-#define XQSERVICEABSTRACTSERVICE_H
-
-// THIS IS A STUB CLASS FOR WIN32 ENVIRONMENT!
-// It is only meant to compile, not to actually do anything
-
-#include <QObject>
-#include <QString>
-#include <QVariant>
-#include <QSet>
-#include <QStringList>
-
-class XQRequestInfo
-{
-public:
-
-    bool isValid() const { return true; }
-
-    void setEmbedded(bool) {}
-    bool isEmbedded() const { return false; }
-    void setBackground(bool) {}
-    bool isBackground() const { return false; }
-    bool isSynchronous() const { return false; }
-    void setForeground(bool) {}
-    bool isForeground() const { return true; }
-
-    quint32 clientSecureId() const { return VID_DEFAULT; }
-    quint32 clientVendorId() const { return VID_DEFAULT; }
-    QSet<int> clientCapabilities() const { return QSet<int>(); }
-    int id() const { return -1; }
-
-    void setInfo(const QString&, const QVariant&) {}
-    QVariant info(const QString&) const { return QVariant(); }
-    QStringList infoKeys() const { return QStringList(); }
-
-};
-
-class XQServiceProvider : public QObject
-{
-    Q_OBJECT
-public:
-    explicit XQServiceProvider( const QString& service, QObject* parent = 0 );
-    ~XQServiceProvider();
-
-    void SetPlugin(QObject*) {}
-
-Q_SIGNALS:
-    void returnValueDelivered();
-    void clientDisconnected();
-    
-protected:    
-    void publishAll() {}
-    int setCurrentRequestAsync() { return -1; }
-    bool completeRequest(int, const QVariant&) { return true; }
-    XQRequestInfo requestInfo() const { return XQRequestInfo(); }
-
-    template <typename T> 
-    inline bool completeRequest(int index, const T& retValue)
-    {
-        QVariant retValueVariant;        
-        retValueVariant.setValue(retValue);
-        return completeRequest(index, retValueVariant);
-    }
-    
-};
-
-#endif
--- a/radioapp/radioapplication/win32_stubs/xqserviceutil.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +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 XQSERVICEUTIL_H
-#define XQSERVICEUTIL_H
-
-#include <QString>
-
-// THIS IS A STUB CLASS FOR WIN32 ENVIRONMENT!
-// It is only meant to compile, not to actually do anything
-
-namespace XQServiceUtil
-{
-    void toBackground(bool) {}
-    bool isEmbedded() { return false; }
-    bool isService() { return false; }
-    QString interfaceName() { return ""; }
-    QString operationName() { return ""; }
-}
-
-#endif
--- a/radioapp/radioapplication/win32_stubs/xqsettingskey.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +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 XQSETTINGSITEM_STUB_H
-#define XQSETTINGSITEM_STUB_H
-
-class XQSettingsKey
-{
-public:
-    enum Target
-    {
-        TargetCentralRepository = 0,
-        TargetPublishAndSubscribe
-    };
-
-    XQSettingsKey(XQSettingsKey::Target target, long int uid, unsigned long int key);
-    ~XQSettingsKey();
-
-    XQSettingsKey::Target target() const;
-    long int uid() const;
-    unsigned long int key() const;
-
-private: // data
-
-    long int            mUid;
-    unsigned long int   mKey;
-
-};
-
-#endif //XQSETTINGSITEM_STUB_H
--- a/radioapp/radioapplication/win32_stubs/xqsettingsmanager.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,73 +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 XQSETTINGSMANAGER_STUB_H
-#define XQSETTINGSMANAGER_STUB_H
-
-#include <QObject>
-#include <QVariant>
-
-//#include "xqsettingskey.h"
-class XQSettingsKey;
-
-class XQSettingsManager : public QObject
-{
-    Q_OBJECT
-//    Q_ENUMS(Error)
-//    Q_ENUMS(Type)
-
-public:
-
-    enum Type
-    {
-        TypeVariant = 0,
-        TypeInt,
-        TypeDouble,
-        TypeString,
-        TypeByteArray
-    };
-
-    enum Error 
-    {
-        NoError = 0,
-        OutOfMemoryError,
-        NotFoundError,
-        AlreadyExistsError,
-        PermissionDeniedError,
-        BadTypeError,
-        NotSupportedError,
-        UnknownError = -1
-    };
-
-    XQSettingsManager(QObject* parent = 0);
-    virtual ~XQSettingsManager();
-
-    QVariant readItemValue(const XQSettingsKey& key, XQSettingsManager::Type type = XQSettingsManager::TypeVariant);
-    bool writeItemValue(const XQSettingsKey& key, const QVariant& value);
-    bool startMonitoring(const XQSettingsKey& key, XQSettingsManager::Type type = XQSettingsManager::TypeVariant);
-    bool stopMonitoring(const XQSettingsKey& key);
-    
-    XQSettingsManager::Error error() const;
-
-Q_SIGNALS:
-    void valueChanged(const XQSettingsKey& key, const QVariant& value);
-    void itemDeleted(const XQSettingsKey& key);
-
-private:
-};
-
-#endif // XQSETTINGSMANAGER_STUB_H
--- a/radioapp/radioenginewrapper/inc/mradioenginehandlerobserver.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +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 _MRADIOENGINEHANDLEROBSERVER_H_
-#define _MRADIOENGINEHANDLEROBSERVER_H_
-
-// User includes
-#include "mradioengineobserver.h"
-#include "mradioaudioroutingobserver.h"
-#include "mradiosystemeventobserver.h"
-
-// Class declaration
-NONSHARABLE_CLASS( MRadioEngineHandlerObserver ) : public MRadioEngineObserver
-                                                 , public MRadioAudioRoutingObserver
-                                                 , public MRadioSystemEventObserver
-{
-public:
-
-};
-
-#endif // _MRADIOENGINEHANDLEROBSERVER_H_
--- a/radioapp/radioenginewrapper/inc/radiocontroleventlistener.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef RADIOCONTROLEVENTLISTENER_H_
-#define RADIOCONTROLEVENTLISTENER_H_
-
-// System includes
-#include <QtGlobal>
-#include <QScopedPointer>
-
-// User includes
-#include "mradiocontroleventobserver.h"
-
-// Forward declarations
-class RadioEngineWrapperPrivate;
-class CRadioRemConTarget;
-
-class RadioControlEventListener : public MRadioControlEventObserver
-{
-    Q_DISABLE_COPY( RadioControlEventListener )
-
-public:
-
-    explicit RadioControlEventListener( RadioEngineWrapperPrivate& engine );
-
-    ~RadioControlEventListener();
-
-    void init();
-
-private:
-
-// from base class MRadioControlEventObserver
-
-    void StepToChannelL( RadioEngine::TRadioTuneDirection aDirection );
-    void SetChannelL( TInt aChannelId );
-    void SeekL( RadioEngine::TRadioTuneDirection aDirection );
-    void StepToFrequencyL( RadioEngine::TRadioTuneDirection aDirection );
-    void SetFrequencyL( TUint32 aFreq );
-    void AdjustVolumeL( RadioEngine::TRadioVolumeSetDirection aDirection );
-    void MuteL( TBool aMute );
-    void PlayL( TBool aDownPressed );
-    void PauseL( TBool aDownPressed );
-    void PausePlayL( TBool aDownPressed );
-    void StopL( TBool aDownPressed );
-    void ForwardL( TBool aDownPressed );
-    void FastForwardL( TBool aDownPressed );
-    void BackwardL( TBool aDownPressed );
-    void RewindL( TBool aDownPressed );
-    void ChannelUpL( TBool aDownPressed );
-    void ChannelDownL( TBool aDownPressed );
-    void VolumeUpL( TBool aDownPressed );
-    void VolumeDownL( TBool aDownPressed );
-    void ChangeViewL( TUid aViewId, TBool aForceChange );
-    void SetAudioRouteL( RadioEngine::TRadioAudioRoute aRoute );
-    void AnswerEndCallL();
-
-private: // data
-
-    RadioEngineWrapperPrivate&          mEngine;
-
-    QScopedPointer<CRadioRemConTarget>  mRemCon;
-
-};
-
-#endif // RADIOCONTROLEVENTLISTENER_H_
--- a/radioapp/radioenginewrapper/inc/radioenginehandler.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,220 +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 _RADIOENGINEHANDLER_H_
-#define _RADIOENGINEHANDLER_H_
-
-// System includes
-#include <QScopedPointer>
-
-// User includes
-#include "radio_global.h"
-#include "mradioengineinitializer.h"
-
-// Forward declarations
-class CRadioEngine;
-class MRadioRdsDataObserver;
-class MRadioEngineHandlerObserver;
-class MRadioApplicationSettings;
-
-// Class declaration
-class RadioEngineHandler : public MRadioEngineInitializer
-{
-public:
-
-    RadioEngineHandler( MRadioEngineHandlerObserver& observer );
-
-    ~RadioEngineHandler();
-
-    /*!
-     * Attempts to construct the radio engine
-     */
-    bool constructEngine();
-
-    /*!
-     * Sets the rds data observer
-     */
-    void setRdsObserver( MRadioRdsDataObserver* observer );
-
-    /*!
-     * Starts or stops receiving RDS data
-     */
-    void setRdsEnabled( bool rdsEnabled );
-
-    /*!
-     * Returns the radio status
-     * @return ETrue = radio is on, EFalse = radio is off
-     */
-    bool isRadioOn();
-
-    /*!
-     * Sets the manual seek status
-     */
-    void setManualSeekMode( bool manualSeek );
-
-    /*!
-     * Returns the manual seek status
-     */
-    bool isInManualSeekMode() const;
-
-    /*!
-     * Tune to the specified frequency
-     * @param aFrequency - frequency to lock onto.
-     */
-    void setFrequency( uint frequency );
-
-    /*!
-     * Sets the audio mute state
-     * @param aMuted - flag to determine whether mute should be turned on or off
-     */
-    void setMute( const bool muted, const bool updateSettings = true );
-
-    /*!
-     * Gets the audio mute state
-     * @return ETrue or EFalse to indicate whether mute is currently on.
-     */
-    bool isMuted() const;
-
-    /*!
-     * Sets the volume level of the FM radio
-     * @param aVolume - the volume to be used.
-     */
-    void setVolume( int newVolume );
-
-    /*!
-     * Gets the volumelevel.
-     * @return the current volume
-     */
-    int volume() const;
-
-    /*!
-     * Gets the max volumelevel.
-     * @return the max volume
-     */
-    int maxVolume() const;
-
-    /*!
-     * Increases the volume by one increment
-     */
-    void increaseVolume();
-
-    /*!
-     * Decreases the volume by one increment
-     */
-    void decreaseVolume();
-
-    /*!
-     * Checks if the antenna is attached
-     * @return ETrue or EFalse to indicate whether antenna is currently attached.
-     */
-    bool isAntennaAttached() const;
-
-    /*!
-     * Retrieves the current frequency.
-     * @return the frequency in hertz
-     */
-    uint currentFrequency() const;
-
-    /*!
-     * Returns the minimum allowed frequency in the current region
-     */
-    uint minFrequency() const;
-
-    /*!
-     * Returns the maximum allowed frequency in the current region
-     */
-    uint maxFrequency() const;
-
-    /*!
-     * Checks if the given frequency is valid in the current region
-     */
-    bool isFrequencyValid( uint frequency ) const;
-
-    /*!
-     * Scan up to the next available frequency.
-     */
-    void seek( Seek::Direction direction );
-
-    /*!
-     * Cancel previously requested scan.
-     */
-    void cancelSeek();
-
-    /*!
-     * Returns the engine seeking state
-     */
-    Seek::State seekingState() const;
-
-    /*!
-     * Rreturn step size for tuning.
-     * @return step size
-     */
-    uint frequencyStepSize() const;
-
-    /*!
-     * Determine current region
-     * @return fmradio region. In case of error, returns EFMRadioRegionNone.
-     */
-    RadioRegion::Region region() const;
-
-    /*!
-     * Sets whether or not audio should be routed to loudspeaker
-     * @param aLoudspeaker ETrue if loudspeaker should be used, EFalse if not
-     */
-    void setAudioRouteToLoudspeaker( bool loudspeaker );
-
-    /*!
-     * Checks if audio is routed to loudspeaker
-     * @return ETrue if loudspeaker is used, EFalse if headset is used
-     */
-    bool isAudioRoutedToLoudspeaker() const;
-
-    /*!
-     * Returns a reference to the application settings
-     */
-    MRadioApplicationSettings& applicationSettings() const;
-
-private:
-
-// from base class MRadioEngineInitializer
-
-    CRadioAudioRouter* InitAudioRouterL();
-    CRadioSystemEventCollector* InitSystemEventCollectorL();
-    CRadioSettings* InitSettingsL();
-
-private: // data
-
-    /*!
-     * Radio engine holder
-     * Own.
-     */
-    QScopedPointer<CRadioEngine>    mEngine;
-
-    /*!
-     * Radio handler observer
-     * Not own.
-     */
-    MRadioEngineHandlerObserver&    mObserver;
-
-    /*!
-     * Selected radio region
-     */
-    RadioRegion::Region             mRegion;
-
-};
-
-#endif //_RADIOENGINEHANDLER_H_
--- a/radioapp/radioenginewrapper/inc/radioenginewrapper.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +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 RADIOENGINEWRAPPER_H
-#define RADIOENGINEWRAPPER_H
-
-// System includes
-#include <QScopedPointer>
-
-// User includes
-#include "radiowrapperexport.h"
-#include "radio_global.h"
-
-// Forward declarations
-class RadioEngineWrapperPrivate;
-class RadioSettingsIf;
-class RadioStationHandlerIf;
-class RadioEngineWrapperObserver;
-
-// Class declaration
-class WRAPPER_DLL_EXPORT RadioEngineWrapper
-{
-    Q_DECLARE_PRIVATE_D( d_ptr.data(), RadioEngineWrapper )
-    Q_DISABLE_COPY( RadioEngineWrapper )
-
-public:
-
-    /**
-     * Constructor and destructor
-     */
-    RadioEngineWrapper( RadioStationHandlerIf& stationHandler );
-    ~RadioEngineWrapper();
-
-    bool init();
-
-    void addObserver( RadioEngineWrapperObserver* observer );
-    void removeObserver( RadioEngineWrapperObserver* observer );
-
-    /**
-     * Getters for things owned by the engine
-     */
-    RadioSettingsIf& settings();
-
-    /**
-     * Getters for region and other region dependent settings
-     */
-    RadioRegion::Region region() const;
-    uint minFrequency() const;
-    uint maxFrequency() const;
-    uint frequencyStepSize() const;
-    bool isFrequencyValid( uint frequency ) const;
-
-    /**
-     * Getters for current radio status
-     */
-    bool isRadioOn() const;
-    uint currentFrequency() const;
-    bool isMuted() const;
-    bool isAntennaAttached() const;
-    bool isUsingLoudspeaker() const;
-
-    void setManualSeekMode( bool manualSeek );
-    bool isInManualSeekMode() const;
-
-    void setRdsEnabled( bool rdsEnabled );
-
-    /**
-     * Tunes to the given frequency
-     */
-    void setFrequency( uint frequency, const int reason = TuneReason::Unspecified );
-
-    /*!
-     * Audio update command functions for the engine
-     */
-    void increaseVolume();
-    void decreaseVolume();
-    void setVolume( int volume );
-    void setMute( bool muted, bool updateSettings = true );
-    void toggleAudioRoute();
-
-    void startSeeking( Seek::Direction direction, const int reason = TuneReason::Unspecified );
-    void cancelSeeking();
-
-private: // data
-
-    /**
-     * Unmodifiable pointer to the private implementation
-     */
-     const QScopedPointer<RadioEngineWrapperPrivate> d_ptr;
-
-};
-
-#endif // RADIOENGINEWRAPPER_H
--- a/radioapp/radioenginewrapper/inc/radioenginewrapper_p.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,166 +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 RADIOENGINEWRAPPER_P_H
-#define RADIOENGINEWRAPPER_P_H
-
-// System includes
-#include <e32std.h>
-#include <QScopedPointer>
-#include <QList>
-
-// User includes
-#include "radioenginewrapper.h"
-#include "mradioenginehandlerobserver.h"
-
-// Forward declarations
-class RadioEngineHandler;
-class RadioControlEventListener;
-class RadioRdsListener;
-class RadioSettingsIf;
-class RadioSettings;
-class RadioStationHandlerIf;
-class RadioEngineWrapperObserver;
-
-typedef QList<RadioEngineWrapperObserver*> ObserverList;
-
-// Constants
-
-#define RUN_NOTIFY_LOOP( list, func ) \
-        foreach( RadioEngineWrapperObserver* observer, list ) { \
-            observer->func; \
-        }
-
-// Class declaration
-class RadioEngineWrapperPrivate : public MRadioEngineHandlerObserver
-{
-    Q_DECLARE_PUBLIC( RadioEngineWrapper )
-    Q_DISABLE_COPY( RadioEngineWrapperPrivate )
-
-    friend class RadioFrequencyScanningHandler;
-
-public:
-
-    RadioEngineWrapperPrivate( RadioEngineWrapper* wrapper,
-                               RadioStationHandlerIf& stationHandler );
-
-    virtual ~RadioEngineWrapperPrivate();
-
-    /**
-     * Initialization and startup
-     */
-    bool init();
-
-    /**
-     * Returns the radio settings
-     */
-    RadioSettingsIf& settings();
-
-    /**
-    * Getter for CRadioEngineHandler instance.
-    * Returns reference to the CRadioEngineHandler
-    */
-    RadioEngineHandler& radioEnginehandler();
-
-    /**
-     * Tunes to given frequency
-     */
-    void setFrequency( uint frequency, const int reason );
-
-    ObserverList& observers();
-
-    void startSeeking( Seek::Direction direction, const int reason = TuneReason::Unspecified );
-
-private:
-
-// from base class MRadioEngineObserver
-
-    void PowerEventL( TBool aPowerState, TInt aError );
-    void FrequencyEventL( TUint32 aFrequency, RadioEngine::TRadioFrequencyEventReason aReason, TInt aError );
-    void VolumeEventL( TInt aVolume, TInt aError );
-    void MuteEventL( TBool aMuteState, TInt aError );
-    void AudioModeEventL( TInt aAudioMode, TInt aError );
-    void AntennaEventL( TBool aAntennaAttached, TInt aError );
-    void AudioRoutingEventL( TInt aAudioDestination, TInt aError );
-    void SeekingEventL( TInt aSeekingState, TInt aError );
-    void RegionEventL( TInt aRegion, TInt aError );
-    void FmTransmitterEventL( TBool /*aActive*/ ) {}
-
-// from base class MRadioAudioRoutingObserver
-
-    void AudioRouteChangedL( RadioEngine::TRadioAudioRoute aRoute );
-
-// from base class MRadioSystemEventObserver
-
-    void HandleSystemEventL( TRadioSystemEventType aEventType );
-
-private: // data
-
-    /**
-     * Pointer to the public class
-     * Not own.
-     */
-    RadioEngineWrapper*                             q_ptr;
-
-    /**
-     * Map of radio stations read from the radio engine
-     * Own.
-     */
-    RadioStationHandlerIf&                          mStationHandler;
-
-    /**
-     * Reference to the wrapper observer
-     */
-    ObserverList                                    mObservers;
-
-    /**
-     * Radio settings handler
-     * Own.
-     */
-    QScopedPointer<RadioSettings>                   mSettings;
-
-    /**
-     * Radio engine handler.
-     * Own.
-     */
-    QScopedPointer<RadioEngineHandler>              mEngineHandler;
-
-    /**
-     * RemCon listener.
-     * Own.
-     */
-    QScopedPointer<RadioControlEventListener>       mControlEventListener;
-
-    /**
-     * Rds listener
-     * Own.
-     */
-    QScopedPointer<RadioRdsListener>                mRdsListener;
-
-    /**
-     * Reason for the tune event. Can be FrequencyStrip, Carousel or station scanner
-     */
-    int                                             mTuneReason;
-
-    /**
-     * Flag to indicate whether or not audio should be routed to loudspeaker
-     */
-    bool                                            mUseLoudspeaker;
-
-};
-
-#endif // RADIOENGINEWRAPPER_P_H
--- a/radioapp/radioenginewrapper/inc/radioenginewrapper_win32_p.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef RADIOENGINEWRAPPER_P_H
-#define RADIOENGINEWRAPPER_P_H
-
-// System includes
-#include <QObject>
-#include <QScopedPointer>
-
-// User includes
-#include "radioenginewrapper.h"
-
-// Forward declarations
-class RadioControlEventListener;
-class RadioRdsListener;
-class RadioSettings;
-class RadioSettingsIf;
-class RadioFrequencyScanningHandler;
-class RadioStationHandlerIf;
-class RadioEngineWrapperObserver;
-class T_RadioDataParser;
-class QSettings;
-class QTimer;
-
-typedef QList<RadioEngineWrapperObserver*> ObserverList;
-
-#define RUN_NOTIFY_LOOP( list, func ) \
-        foreach( RadioEngineWrapperObserver* observer, list ) { \
-            observer->func; \
-        }
-
-// Class declaration
-class WRAPPER_DLL_EXPORT RadioEngineWrapperPrivate : public QObject
-{
-    Q_OBJECT
-    Q_DECLARE_PUBLIC( RadioEngineWrapper )
-    Q_DISABLE_COPY( RadioEngineWrapperPrivate )
-
-    friend class RadioFrequencyScanningHandler;
-
-public:
-
-    RadioEngineWrapperPrivate( RadioEngineWrapper* wrapper,
-                               RadioStationHandlerIf& stationHandler );
-
-    ~RadioEngineWrapperPrivate();
-
-    static RadioEngineWrapperPrivate* instance();
-
-    /**
-     * Initialization and startup
-     */
-    bool init();
-
-    /**
-     * Returns the radio settings
-     */
-    RadioSettingsIf& settings();
-
-    /**
-     * Tunes to the given frequency
-     */
-    void setFrequency( uint frequency, const int reason );
-
-    ObserverList& observers();
-
-    void startSeeking( Seek::Direction direction, const int reason );
-    void cancelSeeking();
-
-    void toggleAudioRoute();
-
-// Functions used by the win32 test window
-
-    QString dataParsingError() const;
-
-    void setHeadsetStatus( bool connected );
-
-    void setVolume( int volume );
-
-    void addSong( const QString& artist, const QString& title );
-
-    void clearSong();
-
-    bool isOffline() const;
-    void setOffline( bool offline );
-
-private slots:
-
-    void frequencyEvent();
-    void addSongTags();
-
-private:
-
-// New functions
-
-    void parseData();
-
-private: // data
-
-    /**
-     * Pointer to the public class
-     * Not own.
-     */
-    RadioEngineWrapper*                             q_ptr;
-
-    /**
-     * Map of radio stations read from the radio engine
-     * Own.
-     */
-    RadioStationHandlerIf&                          mStationHandler;
-
-    /**
-     * Reference to the wrapper observer
-     */
-    ObserverList                                    mObservers;
-
-    /**
-     * Radio settings handler
-     * Own.
-     */
-    QScopedPointer<RadioSettings>                   mSettings;
-
-    QTimer*                                         mTuneTimer;
-
-//    QScopedPointer<T_RadioDataParser>               mDataParser;
-
-    QString                                         mParsingError;
-
-    /**
-     * Reason for the tune event. RadioFrequencyStrip or someone else
-     */
-    int                                             mTuneReason;
-
-    /**
-     * Flag to indicate whether or not audio should be routed to loudspeaker
-     */
-    bool                                            mUseLoudspeaker;
-
-    QScopedPointer<QSettings>                       mEngineSettings;
-
-    bool                                            mAntennaAttached;
-
-    uint                                            mFrequency;
-    uint                                            mNextFrequency;
-
-    int                                             mVolume;
-
-    int                                             mMaxVolume;
-    int                                             mFrequencyStepSize;
-    RadioRegion::Region                             mRegionId;
-    uint                                            mMinFrequency;
-    uint                                            mMaxFrequency;
-
-    QString                                         mArtist;
-    QString                                         mTitle;
-
-    bool                                            mManualSeekMode;
-
-};
-
-#endif // RADIOENGINEWRAPPER_P_H
--- a/radioapp/radioenginewrapper/inc/radioenginewrapperobserver.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,47 +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 RADIOENGINEWRAPPEROBSERVER_H_
-#define RADIOENGINEWRAPPEROBSERVER_H_
-
-#include "radio_global.h"
-#include "radiowrapperexport.h"
-
-class WRAPPER_DLL_EXPORT RadioEngineWrapperObserver
-{
-public:
-
-    virtual void tunedToFrequency( uint frequency, int reason );
-
-    virtual void radioStatusChanged( bool radioIsOn );
-
-    virtual void rdsAvailabilityChanged( bool available );
-
-    virtual void increaseVolume();
-    virtual void decreaseVolume();
-    virtual void volumeChanged( int volume );
-    virtual void muteChanged( bool muted );
-
-    virtual void audioRouteChanged( bool loudspeaker );
-    virtual void antennaStatusChanged( bool connected );
-
-    virtual void skipPrevious();
-    virtual void skipNext();
-
-};
-
-#endif // RADIOENGINEWRAPPEROBSERVER_H_
--- a/radioapp/radioenginewrapper/inc/radioenummapper.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +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 RADIOENUMMAPPER_H_
-#define RADIOENUMMAPPER_H_
-
-/*!
- * Convenience macros to help define enum maps.
- * Note! It is important to define the values so that the UI value is on the left
- * and the engine value is on the right. The lookup functions expect them in this order.
- *
- * Example:
- * BEGIN_ENUM_MAP( KSomeMap )
- *   ENUM_MAP_ITEM( UiNamespace::UiValue1, EngineNamespace::EEngineValue1 ),
- *   ENUM_MAP_ITEM( UiNamespace::UiValue2, EngineNamespace::EEngineValue2 )
- * END_ENUM_MAP( KSomeMap )
- */
-#define BEGIN_ENUM_MAP(name) const RadioEnumMapper::EnumMap name[] = {
-#define ENUM_MAP_ITEM(ui_enum, engine_enum ) { ui_enum, engine_enum }
-#define END_ENUM_MAP(name) }; const int name ## Count = sizeof ( name ) / sizeof ( name[0] );
-
-/*!
- * Convenience macros to do the mappings
- */
-#define MAP_FROM_UI_ENUM(type,uienum, map) RadioEnumMapper::FromUiEnum<type>( uienum, map, map ## Count )
-#define MAP_TO_UI_ENUM(type,uienum, map) RadioEnumMapper::ToUiEnum<type>( uienum, map, map ## Count )
-
-class RadioEnumMapper
-{
-public:
-
-    /*!
-     * Item in the enum map. Ties a value in the UI enum to its correspondent in the engine enum
-     */
-    struct EnumMap
-    {
-        int iUiEnum;
-        int iEngineEnum;
-    };
-
-    /*!
-     * Maps engine enum value to its ui correspondent.
-     *
-     * @param aValue Enum value in the engine
-     * @param aMap Enum value map
-     * @param aCount Amount of items in the map
-     * @return Enum value in the ui
-     */
-    template<typename UI_ENUM, typename ENGINE_ENUM>
-    inline static UI_ENUM ToUiEnum( ENGINE_ENUM aValue, const EnumMap* aMap, int aCount )
-    {
-        return static_cast<UI_ENUM>( MapToUiEnum( aValue, aMap, aCount ) );
-    }
-
-    /*!
-     * Maps ui enum value to its engine correspondent.
-     *
-     * @param aValue Enum value in the Ui
-     * @param aMap Enum value map
-     * @param aCount Amount of items in the map
-     * @return Enum value in the engine
-     */
-    template<typename ENGINE_ENUM, typename UI_ENUM>
-    inline static ENGINE_ENUM FromUiEnum( UI_ENUM aValue, const EnumMap* aMap, int aCount )
-    {
-        return static_cast<ENGINE_ENUM>( MapFromUiEnum( aValue, aMap, aCount ) );
-    }
-
-private:
-
-    /*!
-     * Maps engine enum value to its ui correspondent.
-     * Type-unsafe version. Not to be used directly!
-     *
-     * @param aValue Enum value in the engine
-     * @param aMap Enum value map
-     * @param aCount Amount of items in the map
-     * @return Enum value in the ui
-     */
-    static int MapToUiEnum( int aValue, const EnumMap* aMap, int aCount )
-    {
-        for ( int i = 0; i < aCount; ++i ) {
-            if ( aMap[i].iUiEnum == aValue ) {
-                return aMap[i].iEngineEnum;
-            }
-        }
-        return -1;
-    }
-
-    /*!
-     * Maps ui enum value to its engine correspondent.
-     * Type-unsafe version. Not to be used directly!
-     *
-     * @param aValue Enum value in the Ui
-     * @param aMap Enum value map
-     * @param aCount Amount of items in the map
-     * @return Enum value in the engine
-     */
-    static int MapFromUiEnum( int aValue, const EnumMap* aMap, int aCount )
-    {
-        for ( int i = 0; i < aCount; ++i ) {
-            if ( aMap[i].iEngineEnum == aValue ) {
-                return aMap[i].iUiEnum;
-            }
-        }
-        return -1;
-    }
-
-    /*
-     * Hidden constructor and destructor to prevent instantiation
-     */
-    RadioEnumMapper() {}
-    ~RadioEnumMapper() {}
-
-};
-
-#endif // RADIOENUMMAPPER_H_
--- a/radioapp/radioenginewrapper/inc/radiordslistener.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef RADIORDSLISTENER_H_
-#define RADIORDSLISTENER_H_
-
-// user includes
-#include "mradiordsdataobserver.h"
-
-class RadioStationHandlerIf;
-class RadioEngineWrapperPrivate;
-
-class RadioRdsListener : public MRadioRdsDataObserver
-{
-public:
-
-    RadioRdsListener( RadioStationHandlerIf& stationHandler, RadioEngineWrapperPrivate& wrapper );
-
-private:
-
-// from base class MFMRadioRdsObserver
-
-    void RdsAvailable( TUint32 aFrequency, TBool aAvailable );
-    void RdsAfSearchBegin();
-    void RdsAfSearchEnd( TUint32 aFrequency, TInt aError );
-    void RdsAfSearchStateChange( TBool aEnabled );
-    void RdsDataProgrammeService( TUint32 aFrequency, const TDesC& aProgramService );
-    void RdsDataRadioText( TUint32 aFrequency, const TDesC& aRadioText );
-    void RdsDataRadioTextPlus( TUint32 aFrequency, const TInt aRadioTextPlusClass, const TDesC& aRadioText );
-    void RdsDataGenre( TUint32 aFrequency, const TInt aGenre );
-    void RdsDataPiCode( TUint32 aFrequency, const TInt aPiCode );
-
-private: //data
-
-    RadioStationHandlerIf& mStationHandler;
-
-    RadioEngineWrapperPrivate& mWrapper;
-};
-
-#endif // RADIORDSLISTENER_H_
--- a/radioapp/radioenginewrapper/inc/radiosettings.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +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 RADIOSETTINGS_H_
-#define RADIOSETTINGS_H_
-
-// System includes
-#include <QtGlobal>
-#include <QScopedPointer>
-
-// User includes
-#include "radiosettingsif.h"
-
-// Forward declarations
-class RadioSettingsPrivate;
-
-// Class declaration
-class RadioSettings : public RadioSettingsIf
-    {
-    Q_DECLARE_PRIVATE_D( d_ptr.data(), RadioSettings )
-    Q_DISABLE_COPY( RadioSettings )
-
-    friend class RadioEngineWrapperPrivate;
-
-public:
-
-    virtual ~RadioSettings();
-
-private:
-
-    RadioSettings();
-
-// from base class RadioSettingsIf
-
-    bool isFirstTimeStart();
-    void setFirstTimeStartPerformed( bool firstTimeStartPerformed );
-    bool showFavorites() const;
-    void setShowFavorites( bool showFavorites );
-    bool toggleShowFavorites();
-
-private: // data
-
-    /**
-     * Unmodifiable pointer to the private implementation
-     */
-    const QScopedPointer<RadioSettingsPrivate> d_ptr;
-
-    };
-
-#endif // RADIOSETTINGS_H_
--- a/radioapp/radioenginewrapper/inc/radiosettings_p.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +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 RADIOSETTINGS_P_H_
-#define RADIOSETTINGS_P_H_
-
-class MRadioApplicationSettings;
-
-class RadioSettingsPrivate
-{
-    Q_DECLARE_PUBLIC( RadioSettings )
-    Q_DISABLE_COPY( RadioSettingsPrivate )
-
-    /**
-     * On/Off type flags.
-     *
-     * Bit shifting in the value initialization is used to easily create
-     * progressing bit patterns like so:
-     *  1 << 0 equals 0001 equals 0x1
-     *  1 << 1 equals 0010 equals 0x2
-     *  1 << 2 equals 0100 equals 0x4
-     *  1 << 3 equals 1000 equals 0x8
-     */
-    enum ToggleFlag
-    {
-        EShowFavorites  = 1 << 0
-    };
-    Q_DECLARE_FLAGS( Toggles, ToggleFlag )
-
-public:
-
-    RadioSettingsPrivate( RadioSettings* settingsPublic );
-
-    ~RadioSettingsPrivate();
-
-    void init( MRadioApplicationSettings* storage );
-
-    // First time start
-    bool isFirstTimeStart();
-    void setFirstTimeStartPerformed( bool firstTimeStartPerformed );
-
-    bool isFlagSet( ToggleFlag flag ) const;
-    void toggleFlag( ToggleFlag flag );
-    void saveFlags();
-
-private: // data
-
-    /**
-     * Pointer to the public class
-     * Not own.
-     */
-    RadioSettings*              q_ptr;
-
-    Toggles                     mFlags;
-
-    MRadioApplicationSettings*  mSettingsStorage;
-
-};
-
-#endif // RADIOSETTINGS_P_H_
--- a/radioapp/radioenginewrapper/inc/radiosettingsif.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +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 RADIOSETTINGSIF_H_
-#define RADIOSETTINGSIF_H_
-
-// Class declaration
-class RadioSettingsIf
-    {
-public:
-
-    // First time start
-    virtual bool isFirstTimeStart() = 0;
-    virtual void setFirstTimeStartPerformed( bool firstTimeStartPerformed ) = 0;
-
-    // Favorites
-    virtual bool showFavorites() const = 0;
-    virtual void setShowFavorites( bool showFavorites ) = 0;
-    virtual bool toggleShowFavorites() = 0;
-
-    };
-
-#endif // RADIOSETTINGSIF_H_
--- a/radioapp/radioenginewrapper/inc/radiostationhandlerif.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,52 +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 RADIOSTATIONHANDLERIF_H_
-#define RADIOSTATIONHANDLERIF_H_
-
-// System includes
-#include <QtGlobal>
-
-// Forward declarations
-class RadioStationIf;
-
-class RadioStationHandlerIf
-{
-public:
-
-    virtual uint currentFrequency() const = 0;
-    virtual int currentPresetIndex() const = 0;
-
-    virtual void setCurrentStation( uint frequency ) = 0;
-
-    virtual bool containsFrequency( uint frequency ) = 0;
-
-    virtual bool containsPresetIndex( int presetIndex ) = 0;
-
-    virtual void startDynamicPsCheck() = 0;
-
-    virtual void addScannedFrequency( uint frequency ) = 0;
-
-    virtual void setCurrentPsName( uint frequency, const QString& name ) = 0;
-    virtual void setCurrentRadioText( uint frequency, const QString& radioText ) = 0;
-    virtual void setCurrentRadioTextPlus( uint frequency, int rtClass, const QString& rtItem ) = 0;
-    virtual void setCurrentPiCode( uint frequency, int piCode ) = 0;
-    virtual void setCurrentGenre( uint frequency, int genre ) = 0;
-
-};
-
-#endif // RADIOSTATIONHANDLERIF_H_
--- a/radioapp/radioenginewrapper/inc/radiowrapperexport.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef RADIO_WRAPPER_EXPORT_H_
-#define RADIO_WRAPPER_EXPORT_H_
-
-// System includes
-#include <QtGlobal>
-
-#ifdef BUILD_WRAPPER_DLL
-    #define WRAPPER_DLL_EXPORT Q_DECL_EXPORT
-#else
-    #define WRAPPER_DLL_EXPORT Q_DECL_IMPORT
-#endif
-
-#endif // RADIO_WRAPPER_EXPORT_H_
--- a/radioapp/radioenginewrapper/inc/settings.xml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,92 +0,0 @@
-<radiosettings>
-    <setting name="maxvolume" value="10000" />
-    <setting name="FrequencyStepSize" value="100000" />
-    <setting name="Region" value="0" />
-    <setting name="MinFrequency" value="87500000" />
-    <setting name="MaxFrequency" value="108000000" />
-
-    <Station>
-        <setting name="Frequency" value="9500000" />
-        <RdsGroup interval="3" count="100">
-            <RdsItem type="PiCode" delay="0">0x54A8</RdsItem>
-            <RdsItem type="PsName" delay="1">Yle Suomi</RdsItem>
-        </RdsGroup>
-        <RdsGroup interval="3" count="100">
-            <RdsItem type="PiCode" delay="0">0x5fA8</RdsItem>
-            <RdsItem type="PsName" delay="1">Yle Oulu</RdsItem>
-            </Rds>
-        </RdsGroup>
-    </Station>
-
-    <Station>
-        <setting name="Frequency" value="88000000" />
-        <Rds type="PsName"><!-- Static PS -->
-            <setting name="SendInterval" value="8" />
-            <setting name="SendCount" value="4" />
-            <setting name="RdsContent" value="Radio Nova" />
-        </Rds>
-        <Rds type="PiCode">
-            <setting name="SendInterval" value="8" />
-            <setting name="RdsContent" value="0x54A8" />
-        </Rds>
-        <Rds type="Rt">
-            <setting name="SendInterval" value="4" />
-            <setting name="RdsContent" value="Radio Nova runs" />
-            <setting name="RdsContent" value="some ads in the" />
-            <setting name="RdsContent" value="radio text." />
-        </Rds>
-    </Station>
-    
-    <Station>
-        <setting name="Frequency" value="89000000" />
-        <Rds type="PsName">
-            <setting name="SendInterval" value="5" />
-            <setting name="SendCount" value="4" />
-            <setting name="RdsContent" value="Radio Rock" />
-        </Rds>
-        <Rds type="Pty">
-            <setting name="SendInterval" value="4" />
-            <setting name="RdsContent" value="12" />
-        </Rds>
-    </Station>
-    
-    <Station>
-        <setting name="Frequency" value="98000000" />
-        <Rds type="PsName">
-            <setting name="SendInterval" value="5" />
-            <setting name="RdsContent" value="Radio Mega" />
-        </Rds>
-        <Rds type="Rt">
-            <setting name="SendInterval" value="8" />
-            <setting name="RtPlusItem" value="Now playing: [artist] - [title]">
-                <setting name="RtPlusTag" value="artist">
-                    <setting name="delay" value="2" />
-                    <setting name="RdsContent" value="Metallica" />
-                </setting>
-                <setting name="RtPlusTag" value="title">
-                    <setting name="delay" value="2" />
-                    <setting name="RdsContent" value="One" />
-                </setting>
-            </setting>
-        </Rds>
-    </Station>
-    
-    <Station>
-        <setting name="Frequency" value="103000000" />
-        <Rds type="PsName"><!-- Dynamic PS -->
-            <setting name="SendInterval" value="2" />
-            <setting name="RdsContent" value="Radio Mega" />
-            <setting name="RdsContent" value="iskee" />
-            <setting name="RdsContent" value="makkarat" />
-            <setting name="RdsContent" value="ruutuun" />
-        </Rds>
-        <Rds type="Rt">
-            <setting name="SendInterval" value="4" />
-            <setting name="RdsContent" value="This is" />
-            <setting name="RdsContent" value="an example usage of" />
-            <setting name="RdsContent" value="radio text in a" />
-            <setting name="RdsContent" value="radio station." />
-        </Rds>
-    </Station>
-
-</radiosettings>
\ No newline at end of file
--- a/radioapp/radioenginewrapper/inc/t_radiodataparser.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,218 +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 T_RADIODATAPARSER_H
-#define T_RADIODATAPARSER_H
-
-// System includes
-#include <QScopedPointer>
-#include <QXxml>
-#include <QString>
-#include <QList>
-
-// Forward declarations
-class T_RadioDataParser;
-
-namespace RadioData
-{
-    class SettingHolder;
-
-    /**
-     * Base class for all settings
-     */
-    class Setting
-    {
-    public:
-
-        virtual ~Setting() {}
-        virtual void setValue( SettingHolder& holder,
-                               T_RadioDataParser& parser ) {};
-
-    };
-
-    /**
-     * Holder to store a setting during parsing
-     */
-    class SettingHolder : public Setting
-    {
-    public:
-
-        SettingHolder();
-        ~SettingHolder();
-
-        QString                 mName;
-        QString                 mValue;
-        QList<SettingHolder*>   mChildren;
-
-    };
-
-    class RdsItem : public Setting
-    {
-    public:
-        enum Type
-            {
-             Unknown
-            ,RdsPsName
-            ,RdsRadioText
-            ,RdsRadioTextPlus
-            ,RdsPty
-            ,RdsPiCode
-            };
-
-        RdsItem();
-        ~RdsItem();
-
-        void setValue( SettingHolder& holder,
-                       T_RadioDataParser& parser );
-
-        void initChildren( SettingHolder& holder,
-                           T_RadioDataParser& parser );
-
-        enum rtClass{ Title = 1, Artist = 4, Homepage = 39 };
-
-        class RtPlusHolder
-        {
-        public:
-
-            RtPlusHolder();
-
-            int     mDelay;
-            int     mRtClass;
-            QString mRtItem;
-        };
-
-        Type                    mType;
-        QStringList             mRdsItems;
-        QList<RtPlusHolder*>    mRtPlusItems;
-        int                     mCurrentRtPlusIndex;
-
-    };
-
-    class RdsGroup : public Setting
-    {
-    public:
-
-        RdsGroup( const QXmlAttributes& atts, T_RadioDataParser& parser );
-        ~RdsGroup();
-
-        int mInterval;
-        int mCount;
-        QList<RdsItem*> mRdsItems;
-
-    };
-
-    class Station : public Setting
-    {
-    public:
-
-        Station();
-        ~Station();
-
-        void setValue( SettingHolder& holder,
-                       T_RadioDataParser& parser );
-
-        uint                mFrequency;
-        QList<RdsGroup*>    mRdsArray;
-
-    };
-
-    class EngineSettings : public Setting
-    {
-    public:
-
-        EngineSettings();
-
-        void setValue( SettingHolder& holder,
-                       T_RadioDataParser& parser );
-
-        int     mMaxVolume;
-        int     mFrequencyStepSize;
-        int     mRegionId;
-        uint    mMinFrequency;
-        uint    mMaxFrequency;
-
-    };
-
-    typedef QList<Setting*> SettingArray;
-
-}
-
-class T_RadioDataParser : public QXmlDefaultHandler
-{
-public:
-
-    T_RadioDataParser();
-    virtual ~T_RadioDataParser();
-
-    bool parse();
-
-    QString errorString() const;
-
-    int parseInt( const QString& string, int defaultVal );
-    int parseTime( const QString& string, int defaultVal );
-
-private:
-
-// from base class QXmlDefaultHandler
-
-    bool startDocument();
-    bool endDocument();
-    bool startElement( const QString& namespaceURI, const QString& localName, const QString& qName, const QXmlAttributes& atts );
-    bool endElement( const QString& namespaceURI, const QString& localName, const QString& qName );
-    bool characters( const QString& ch );
-    bool error( const QXmlParseException& exception );
-    bool fatalError( const QXmlParseException& exception );
-
-// New functions
-
-    void handleStartRadioSettings( const QXmlAttributes& atts );
-    void handleEndRadioSettings();
-    void handleStartSetting( const QXmlAttributes& atts );
-    void handleEndSetting();
-    void handleStartStation( const QXmlAttributes& atts );
-    void handleEndStation();
-    void handleStartRdsGroup( const QXmlAttributes& atts );
-    void handleEndRdsGroup();
-    void handleStartRdsData( const QXmlAttributes& atts );
-    void handleEndRdsData();
-
-    void pushToSettingStack( RadioData::Setting* setting, RadioData::SettingArray& array );
-    RadioData::Setting* topOfSettingStack( RadioData::SettingArray& array );
-    RadioData::Setting* popFromSettingStack( RadioData::SettingArray& array );
-
-private: // data
-
-    QScopedPointer<QXmlSimpleReader>    mReader;
-    QScopedPointer<QXmlInputSource>     mSource;
-
-    QString                             mErrorString;
-
-    int                                 mCurrentPresetIndex;
-
-    RadioData::SettingArray             mSettingStack;
-
-    RadioData::SettingArray             mSettingHolderStack;
-
-public:
-
-    RadioData::EngineSettings           mEngineSettings;
-
-    QList<RadioData::Station*>          mStations;
-
-};
-
-#endif // T_RADIODATAPARSER_H
--- a/radioapp/radioenginewrapper/radioenginewrapper.pro	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +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:
-#
-
-TMP_DIR_NAME = enginewrapper
-include(../buildflags.pri)
-
-TEMPLATE    = lib
-TARGET      = fmradioenginewrapper
-CONFIG      += dll
-DEFINES     += BUILD_WRAPPER_DLL
-
-symbian:TARGET.UID3 = 0x2002EAD8
-    
-USE_DUMMY_RADIO_DATA:QT += xml
-
-INCLUDEPATH += inc
-INCLUDEPATH += ../../common
-
-# Common headers
-HEADERS     += radiowrapperexport.h
-HEADERS     += radio_global.h
-HEADERS     += radiologger.h
-HEADERS     += radioenginewrapper.h
-HEADERS     += radiosettingsif.h
-HEADERS     += radiosettings.h
-HEADERS     += radiostationhandlerif.h
-HEADERS     += radioenginewrapperobserver.h
-
-INTERNAL_HEADERS += radiosettings_p.h
-
-#USE_DUMMY_RADIO_DATA:HEADERS += t_radiodataparser.h
-
-# Common sources
-SOURCES     += radiosettings.cpp
-SOURCES     += radiologger.cpp
-SOURCES     += radioenginewrapperobserver.cpp
-
-# Symbian specific stuff
-symbian: {
-    INCLUDEPATH += ../../radioengine/utils/api
-    INCLUDEPATH += ../../radioengine/settings/api
-    INCLUDEPATH += ../../radioengine/engine/api
-
-    LIBS *= -lfmradioengineutils
-    LIBS *= -lfmradioenginesettings
-    LIBS *= -lfmradioengine
-
-    HEADERS += radioenginehandler.h
-    HEADERS += mradioenginehandlerobserver.h
-    HEADERS += radiocontroleventlistener.h
-    HEADERS += radiordslistener.h
-
-    INTERNAL_HEADERS += radioenginewrapper_p.h
-
-    SOURCES += radiosettings_p.cpp
-    SOURCES += radioenginewrapper.cpp
-    SOURCES += radioenginewrapper_p.cpp
-    SOURCES += radioenginehandler.cpp
-    SOURCES += radiocontroleventlistener.cpp
-    SOURCES += radiordslistener.cpp
-}
-
-#USE_DUMMY_RADIO_DATA:SOURCES += t_radiodataparser.cpp
-
-# Win32 specific stuff
-win32: {
-    INCLUDEPATH += inc/win32
-
-    HEADERS += radioenginewrapper_win32_p.h
-    HEADERS += $$INTERNAL_HEADERS
-
-    SOURCES += radiosettings_win32_p.cpp
-    SOURCES += radioenginewrapper_win32.cpp
-    SOURCES += radioenginewrapper_win32_p.cpp
-}
-
-DEPENDPATH  += $$INCLUDEPATH src
--- a/radioapp/radioenginewrapper/src/radiocontroleventlistener.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,251 +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 "radiocontroleventlistener.h"
-#include "radioenginewrapper_p.h"
-#include "radioenginewrapperobserver.h"
-#include "radioenginehandler.h"
-#include "radiologger.h"
-#include "cradioremcontarget.h"
-/*!
- *
- */
-RadioControlEventListener::RadioControlEventListener( RadioEngineWrapperPrivate& engine ) :
-    mEngine( engine )
-{
-}
-
-/*!
- *
- */
-RadioControlEventListener::~RadioControlEventListener()
-{
-}
-
-/*!
- *
- */
-void RadioControlEventListener::init()
-{
-    CRadioRemConTarget* target = NULL;
-    TRAPD( err, target = CRadioRemConTarget::NewL() );
-    LOG_ASSERT( !err, LOG_FORMAT( "RadioControlEventListener::init Failed with err, %d", err ) );
-
-    if ( !err ) {
-        mRemCon.reset( target );
-        mRemCon->SetControlEventObserver( this );
-    }
-}
-
-/*!
- *
- */
-void RadioControlEventListener::StepToChannelL( RadioEngine::TRadioTuneDirection DEBUGVAR( aDirection ) )
-{
-    LOG_FORMAT( "RadioControlEventListener::StepToChannelL: direction: %d", aDirection );
-}
-
-/*!
- *
- */
-void RadioControlEventListener::SetChannelL( TInt DEBUGVAR( aChannelId ) )
-{
-    LOG_FORMAT( "RadioControlEventListener::SetChannelL: Channel: %d", aChannelId );
-}
-
-/*!
- *
- */
-void RadioControlEventListener::SeekL( RadioEngine::TRadioTuneDirection aDirection )
-{
-    LOG_FORMAT( "RadioControlEventListener::SeekL: Direction: %d", aDirection );
-    mEngine.startSeeking( aDirection == RadioEngine::ERadioDown ? Seek::Down : Seek::Up );
-}
-
-/*!
- *
- */
-void RadioControlEventListener::StepToFrequencyL( RadioEngine::TRadioTuneDirection DEBUGVAR( aDirection ) )
-{
-    LOG_FORMAT( "RadioControlEventListener::StepToFrequencyL: Direction: %d", aDirection );
-}
-
-/*!
- *
- */
-void RadioControlEventListener::SetFrequencyL( TUint32 DEBUGVAR( aFreq ) )
-{
-    LOG_FORMAT( "RadioControlEventListener::SetFrequencyL: Frequency: %d", aFreq );
-}
-
-/*!
- *
- */
-void RadioControlEventListener::AdjustVolumeL( RadioEngine::TRadioVolumeSetDirection DEBUGVAR( aDirection ) )
-{
-    LOG_FORMAT( "RadioControlEventListener::AdjustVolumeL: Direction: %d", aDirection );
-}
-
-/*!
- *
- */
-void RadioControlEventListener::MuteL( TBool aMute )
-{
-    LOG_FORMAT( "RadioControlEventListener::MuteL: Mute: %d", aMute );
-    mEngine.radioEnginehandler().setMute( aMute );
-}
-
-/*!
- *
- */
-void RadioControlEventListener::PlayL( TBool aDownPressed )
-{
-    if ( aDownPressed ) {
-        mEngine.radioEnginehandler().setMute( false );
-    }
-}
-
-/*!
- *
- */
-void RadioControlEventListener::PauseL( TBool aDownPressed )
-{
-    if ( aDownPressed ) {
-        mEngine.radioEnginehandler().setMute( true );
-    }
-}
-
-/*!
- *
- */
-void RadioControlEventListener::PausePlayL( TBool aDownPressed )
-{
-    if ( aDownPressed ) {
-        const bool muted = !mEngine.radioEnginehandler().isMuted();
-        mEngine.radioEnginehandler().setMute( muted );
-    }
-}
-
-/*!
- *
- */
-void RadioControlEventListener::StopL( TBool aDownPressed )
-{
-    if ( aDownPressed ) {
-        mEngine.radioEnginehandler().setMute( true );
-    }
-}
-
-/*!
- *
- */
-void RadioControlEventListener::ForwardL( TBool aDownPressed )
-{
-    if ( aDownPressed ) {
-        RUN_NOTIFY_LOOP( mEngine.observers(), skipNext() );
-    }
-}
-
-/*!
- *
- */
-void RadioControlEventListener::FastForwardL( TBool aDownPressed )
-{
-    if ( aDownPressed ) {
-        mEngine.startSeeking( Seek::Up );
-    }
-}
-
-/*!
- *
- */
-void RadioControlEventListener::BackwardL( TBool aDownPressed )
-{
-    if ( aDownPressed ) {
-        RUN_NOTIFY_LOOP( mEngine.observers(), skipPrevious() );
-    }
-}
-
-/*!
- *
- */
-void RadioControlEventListener::RewindL( TBool aDownPressed )
-{
-    if ( aDownPressed ) {
-        mEngine.startSeeking( Seek::Down );
-    }
-}
-
-/*!
- *
- */
-void RadioControlEventListener::ChannelUpL( TBool DEBUGVAR( aDownPressed ) )
-{
-    LOG_FORMAT( "RadioControlEventListener::ChannelUpL: Down: %d", aDownPressed );
-}
-
-/*!
- *
- */
-void RadioControlEventListener::ChannelDownL( TBool DEBUGVAR( aDownPressed ) )
-{
-    LOG_FORMAT( "RadioControlEventListener::ChannelDownL: Down: %d", aDownPressed );
-}
-
-/*!
- *
- */
-void RadioControlEventListener::VolumeUpL( TBool aDownPressed )
-{
-    if ( aDownPressed ) {
-        RUN_NOTIFY_LOOP( mEngine.observers(), increaseVolume() );
-    }
-}
-
-/*!
- *
- */
-void RadioControlEventListener::VolumeDownL( TBool aDownPressed )
-{
-    if ( aDownPressed ) {
-        RUN_NOTIFY_LOOP( mEngine.observers(), decreaseVolume() );
-    }
-}
-
-/*!
- *
- */
-void RadioControlEventListener::ChangeViewL( TUid DEBUGVAR( aViewId ), TBool DEBUGVAR( aForceChange ) )
-{
-    LOG_FORMAT( "RadioControlEventListener::ChangeViewL: View: %d, Force: %d", aViewId, aForceChange );
-}
-
-/*!
- *
- */
-void RadioControlEventListener::SetAudioRouteL( RadioEngine::TRadioAudioRoute DEBUGVAR( aRoute ) )
-{
-    LOG_FORMAT( "RadioControlEventListener::SetAudioOutputDestinationL: Destinatio: %d", aRoute );
-}
-
-/*!
- *
- */
-void RadioControlEventListener::AnswerEndCallL()
-{
-    RUN_NOTIFY_LOOP( mEngine.observers(), skipNext() );
-}
--- a/radioapp/radioenginewrapper/src/radioenginehandler.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,365 +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:
-*
-*/
-
-// User includes
-#include "cradioengine.h"
-#include "cradioaudiorouter.h"
-#include "cradiosystemeventcollector.h"
-#include "cradiosettings.h"
-#include "mradioenginesettings.h"
-#include "mradiordsreceiver.h"
-#include "radioenginehandler.h"
-#include "mradioenginehandlerobserver.h"
-#include "radio_global.h"
-#include "radiologger.h"
-#include "radioenummapper.h"
-
-/*!
- * Map to translate seek direction enum from its definition in the engine to
- * its definition in the ui and vice versa
- */
-BEGIN_ENUM_MAP( KSeekDirectionMap )
-    ENUM_MAP_ITEM( Seek::Down,              RadioEngine::ERadioDown ),
-    ENUM_MAP_ITEM( Seek::Up,                RadioEngine::ERadioUp )
-END_ENUM_MAP( KSeekDirectionMap )
-
-/*!
- * Convenience macro to do the mapping of seek directions
- */
-#define MAP_FROM_UI_DIRECTION(ui_enum) MAP_FROM_UI_ENUM( RadioEngine::TRadioTuneDirection, ui_enum, KSeekDirectionMap )
-
-/*!
- * Map to translate radio region enum from its definition in the engine to
- * its definition in the ui and vice versa
- */
-BEGIN_ENUM_MAP( KRegionMap )
-    ENUM_MAP_ITEM( RadioRegion::None,       ERadioRegionNone ),
-    ENUM_MAP_ITEM( RadioRegion::Default,    ERadioRegionDefault ),
-    ENUM_MAP_ITEM( RadioRegion::Japan,      ERadioRegionJapan ),
-    ENUM_MAP_ITEM( RadioRegion::America,    ERadioRegionAmerica ),
-    ENUM_MAP_ITEM( RadioRegion::Poland,     ERadioRegionPoland ),
-END_ENUM_MAP( KRegionMap )
-
-/*!
- * Convenience macros to do the mapping of radio regions
- */
-#define MAP_FROM_UI_REGION(ui_enum) MAP_FROM_UI_ENUM( TRadioRegion, ui_enum, KRegionMap )
-#define MAP_TO_UI_REGION(engine_enum) MAP_TO_UI_ENUM( RadioRegion::Region, engine_enum, KRegionMap )
-
-/*!
- * Map to translate seeking state enum from its definition in the engine to
- * its definition in the ui and vice versa
- */
-BEGIN_ENUM_MAP( KSeekingStateMap )
-    ENUM_MAP_ITEM( Seek::NotSeeking,        RadioEngine::ERadioNotSeeking ),
-    ENUM_MAP_ITEM( Seek::SeekingUp,         RadioEngine::ERadioSeekingUp ),
-    ENUM_MAP_ITEM( Seek::SeekingDown,       RadioEngine::ERadioSeekingDown )
-END_ENUM_MAP( KSeekingStateMap )
-
-/*!
- * Convenience macro to do the mapping of seeking states
- */
-#define MAP_TO_UI_SEEKING_STATE(ui_enum) MAP_TO_UI_ENUM( Seek::State, ui_enum, KSeekingStateMap )
-
-/*!
- *
- */
-RadioEngineHandler::RadioEngineHandler( MRadioEngineHandlerObserver& observer )
-    : mObserver( observer )
-{
-}
-
-/*!
- *
- */
-RadioEngineHandler::~RadioEngineHandler()
-{
-}
-
-/*!
- * Attempts to construct the radio engine
- */
-bool RadioEngineHandler::constructEngine()
-{
-    LOG_METHOD;
-
-    CRadioEngine* engine = NULL;
-    TRAPD( err, engine = CRadioEngine::NewL( *this ) );
-    if ( err ) {
-        return false;
-    }
-
-    mEngine.reset( engine );
-    TRAP( err,
-        mEngine->SystemEventCollector().AddObserverL( &mObserver );
-        mEngine->AddObserverL( &mObserver );
-    );
-    if ( err ) {
-        return false;
-    }
-
-    mRegion = MAP_TO_UI_REGION( mEngine->Settings().EngineSettings().RegionId() );
-    return true;
-}
-
-/*!
- * Sets the rds data observer
- */
-void RadioEngineHandler::setRdsObserver( MRadioRdsDataObserver* observer )
-{
-    TRAP_IGNORE( mEngine->RdsReceiver().AddObserverL( observer ) );
-}
-
-/*!
- * Starts or stops receiving RDS data
- */
-void RadioEngineHandler::setRdsEnabled( bool rdsEnabled )
-{
-    if ( rdsEnabled ) {
-        mEngine->RdsReceiver().StartReceiver();
-    } else {
-        mEngine->RdsReceiver().StopReceiver();
-    }
-}
-
-/*!
- * Returns the radio status.
- */
-bool RadioEngineHandler::isRadioOn()
-{
-    return mEngine->Settings().EngineSettings().IsPowerOn();
-}
-
-/*!
- * Sets the manual seek status
- */
-void RadioEngineHandler::setManualSeekMode( bool manualSeek )
-{
-    mEngine->SetManualSeekMode( manualSeek );
-}
-
-/*!
- * Returns the manual seek status
- */
-bool RadioEngineHandler::isInManualSeekMode() const
-{
-    return mEngine->IsInManualSeekMode();
-}
-
-/*!
- * Tune to the specified frequency
- */
-void RadioEngineHandler::setFrequency( uint frequency )
-{
-    mEngine->SetFrequency( frequency );
-}
-
-/*!
- * Sets the audio mute state
- */
-void RadioEngineHandler::setMute( const bool muted, const bool updateSettings )
-{
-    mEngine->SetVolumeMuted( muted, updateSettings );
-}
-
-/*!
- * Gets the audio mute state
- */
-bool RadioEngineHandler::isMuted() const
-{
-    return mEngine->Settings().EngineSettings().IsVolMuted();
-}
-
-/*!
- * Sets the volume level of the FM radio
- */
-void RadioEngineHandler::setVolume( int newVolume )
-{
-    if ( volume() != newVolume ) {
-        if ( newVolume > 0 ) {
-            mEngine->SetVolumeMuted( EFalse );
-        }
-
-        mEngine->SetVolume( newVolume );
-    }
-}
-
-/*!
- * Gets the volumelevel.
- */
-int RadioEngineHandler::volume() const
-{
-    return mEngine->Settings().EngineSettings().Volume();
-}
-
-/*!
- * Gets the max volumelevel.
- */
-int RadioEngineHandler::maxVolume() const
-{
-    return mEngine->MaxVolumeLevel();
-}
-
-/*!
- * Increases the volume by one increment
- */
-void RadioEngineHandler::increaseVolume()
-{
-    mEngine->AdjustVolume( RadioEngine::ERadioIncVolume );
-}
-
-/*!
- * Decreases the volume by one increment
- */
-void RadioEngineHandler::decreaseVolume()
-{
-    mEngine->AdjustVolume( RadioEngine::ERadioDecVolume );
-}
-
-
-/*!
- * Checks if the antenna is attached
- */
-bool RadioEngineHandler::isAntennaAttached() const
-{
-    return mEngine->IsAntennaAttached();
-}
-
-/*!
- * Retrieves the current frequency.
- */
-uint RadioEngineHandler::currentFrequency() const
-{
-    return mEngine->Settings().EngineSettings().TunedFrequency();
-}
-
-/*!
- * Returns the minimum allowed frequency in the current region
- */
-uint RadioEngineHandler::minFrequency() const
-{
-    return mEngine->Settings().EngineSettings().MinFrequency();
-}
-
-/*!
- * Returns the maximum allowed frequency in the current region
- */
-uint RadioEngineHandler::maxFrequency() const
-{
-    return mEngine->Settings().EngineSettings().MaxFrequency();
-}
-
-/*!
- * Checks if the given frequency is valid in the current region
- */
-bool RadioEngineHandler::isFrequencyValid( uint frequency ) const
-{
-    return mEngine->IsFrequencyValid( frequency );
-}
-
-/*!
- * Scan up to the next available frequency
- */
-void RadioEngineHandler::seek( Seek::Direction direction )
-{
-    LOG_TIMESTAMP( "Seek" );
-    mEngine->Seek( MAP_FROM_UI_DIRECTION( direction ) );
-}
-
-/*!
- * Cancel previously requested scan, and return to the already tuned frequency
- */
-void RadioEngineHandler::cancelSeek()
-{
-    mEngine->CancelSeek();
-}
-
-/*!
- * Returns the engine seeking state
- */
-Seek::State RadioEngineHandler::seekingState() const
-{
-    return MAP_TO_UI_SEEKING_STATE( mEngine->Seeking() );
-}
-
-/*!
- * return step size for tuning.
- */
-uint RadioEngineHandler::frequencyStepSize() const
-{
-    return mEngine->Settings().EngineSettings().FrequencyStepSize();
-}
-
-/*!
- * Returns the selected radio region
- */
-RadioRegion::Region RadioEngineHandler::region() const
-{
-    return mRegion;
-}
-
-/*!
- * Sets whether or not audio should be routed to loudspeaker
- */
-void RadioEngineHandler::setAudioRouteToLoudspeaker( bool loudspeaker )
-{
-    TRAPD( err, mEngine->AudioRouter().SetAudioRouteL( loudspeaker ? RadioEngine::ERadioSpeaker
-                                                       : RadioEngine::ERadioHeadset ) );
-    if ( err ) {
-        LOG_FORMAT( "Failed to set audioroute: UseLoudspeadker: %d", loudspeaker );
-    }
-}
-
-/*!
- * Checks if audio is routed to loudspeaker
- */
-bool RadioEngineHandler::isAudioRoutedToLoudspeaker() const
-{
-    return mEngine->Settings().EngineSettings().AudioRoute() == RadioEngine::ERadioSpeaker;
-}
-
-/*!
- * Returns the repository manager.
- */
-MRadioApplicationSettings& RadioEngineHandler::applicationSettings() const
-{
-    return mEngine->Settings().ApplicationSettings();
-}
-
-/*!
- * \reimp
- */
-CRadioAudioRouter* RadioEngineHandler::InitAudioRouterL()
-{
-    return CRadioAudioRouter::NewL( mObserver );
-}
-
-/*!
- * \reimp
- */
-CRadioSystemEventCollector* RadioEngineHandler::InitSystemEventCollectorL()
-{
-    return CRadioSystemEventCollector::NewL();
-}
-
-/*!
- * \reimp
- */
-CRadioSettings* RadioEngineHandler::InitSettingsL()
-{
-    return CRadioSettings::NewL();
-}
--- a/radioapp/radioenginewrapper/src/radioenginewrapper.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,265 +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:
-*
-*/
-
-// User includes
-#include "radioenginewrapper.h"
-#include "radioenginewrapperobserver.h"
-#include "radioenginewrapper_p.h"
-#include "radioenginehandler.h"
-
-/*!
- * Constructor
- */
-RadioEngineWrapper::RadioEngineWrapper( RadioStationHandlerIf& stationHandler ) :
-    d_ptr( new RadioEngineWrapperPrivate( this, stationHandler ) )
-{
-}
-
-/*!
- * Destructor
- */
-RadioEngineWrapper::~RadioEngineWrapper()
-{
-}
-
-/*!
- *
- */
-bool RadioEngineWrapper::init()
-{
-    Q_D( RadioEngineWrapper );
-    return d->init();
-}
-
-/*!
- *
- */
-void RadioEngineWrapper::addObserver( RadioEngineWrapperObserver* observer )
-{
-    Q_D( RadioEngineWrapper );
-    d->mObservers.prepend( observer );
-}
-
-/*!
- *
- */
-void RadioEngineWrapper::removeObserver( RadioEngineWrapperObserver* observer )
-{
-    Q_D( RadioEngineWrapper );
-    d->mObservers.removeAll( observer );
-}
-
-/*!
- * Returns the settings handler owned by the engine
- */
-RadioSettingsIf& RadioEngineWrapper::settings()
-{
-    Q_D( RadioEngineWrapper );
-    return d->settings();
-}
-
-/*!
- * Returns the selected radio region
- */
-RadioRegion::Region RadioEngineWrapper::region() const
-{
-    Q_D( const RadioEngineWrapper );
-    return d->mEngineHandler->region();
-}
-
-/*!
- * Returns the minimum frequency
- */
-uint RadioEngineWrapper::minFrequency() const
-{
-    Q_D( const RadioEngineWrapper );
-    return d->mEngineHandler->minFrequency();
-}
-
-/*!
- * Returns the maximum frequency
- */
-uint RadioEngineWrapper::maxFrequency() const
-{
-    Q_D( const RadioEngineWrapper );
-    return d->mEngineHandler->maxFrequency();
-}
-
-/*!
- * Returns the frequency step size from the selected region
- */
-uint RadioEngineWrapper::frequencyStepSize() const
-{
-    Q_D( const RadioEngineWrapper );
-    return d->mEngineHandler->frequencyStepSize();
-}
-
-/*!
- * Returns true if frequency is valid, otherwise false
- */
-bool RadioEngineWrapper::isFrequencyValid( uint frequency ) const
-{
-    return frequency >= minFrequency() && frequency <= maxFrequency();
-}
-
-/*!
- * Checks if the radio engine is on
- */
-bool RadioEngineWrapper::isRadioOn() const
-{
-    Q_D( const RadioEngineWrapper );
-    return d->mEngineHandler->isRadioOn();
-}
-
-/*!
- * Returns the currently tuned frequency
- */
-uint RadioEngineWrapper::currentFrequency() const
-{
-    Q_D( const RadioEngineWrapper );
-    return d->mEngineHandler->currentFrequency();
-}
-
-/*!
- * Returns the mute status
- */
-bool RadioEngineWrapper::isMuted() const
-{
-    Q_D( const RadioEngineWrapper );
-    return d->mEngineHandler->isMuted();
-}
-
-/*!
- * Returns the antenna connection status
- */
-bool RadioEngineWrapper::isAntennaAttached() const
-{
-    Q_D( const RadioEngineWrapper );
-    return d->mEngineHandler->isAntennaAttached();
-}
-
-/*!
- * Returns the "use loudspeaker" status
- */
-bool RadioEngineWrapper::isUsingLoudspeaker() const
-{
-    Q_D( const RadioEngineWrapper );
-    return d->mUseLoudspeaker;
-}
-
-/*!
- * Sets or unsets the engine to manual seek mode
- */
-void RadioEngineWrapper::setManualSeekMode( bool manualSeek )
-{
-    Q_D( RadioEngineWrapper );
-    d->mEngineHandler->setManualSeekMode( manualSeek );
-    if ( !manualSeek ) {
-        RUN_NOTIFY_LOOP( d->observers(), tunedToFrequency( currentFrequency(), TuneReason::ManualSeekTune ) );
-    }
-}
-
-/*!
- * Checks if the engine is in manual seek mode
- */
-bool RadioEngineWrapper::isInManualSeekMode() const
-{
-    Q_D( const RadioEngineWrapper );
-    return d->mEngineHandler->isInManualSeekMode();
-}
-
-/*!
- *
- */
-void RadioEngineWrapper::setRdsEnabled( bool rdsEnabled )
-{
-    Q_D( RadioEngineWrapper );
-    d->mEngineHandler->setRdsEnabled( rdsEnabled );
-}
-
-/*!
- * Tunes to the given frequency
- */
-void RadioEngineWrapper::setFrequency( uint frequency, const int reason )
-{
-    Q_D( RadioEngineWrapper );
-    d->setFrequency( frequency, reason );
-}
-
-/*!
- * volume increase command for the engine
- */
-void RadioEngineWrapper::increaseVolume()
-{
-    Q_D( RadioEngineWrapper );
-    d->mEngineHandler->increaseVolume();
-}
-
-/*!
- * volume decrease command for the engine
- */
-void RadioEngineWrapper::decreaseVolume()
-{
-    Q_D( RadioEngineWrapper );
-    d->mEngineHandler->decreaseVolume();
-}
-
-/*!
- * volume update command for the engine
- */
-void RadioEngineWrapper::setVolume( int volume )
-{
-    Q_D( RadioEngineWrapper );
-    d->mEngineHandler->setVolume( volume );
-}
-
-/*!
- *
- */
-void RadioEngineWrapper::setMute( bool muted, bool updateSettings )
-{
-    Q_D( RadioEngineWrapper );
-    d->mEngineHandler->setMute( muted, updateSettings );
-}
-
-/*!
- *
- */
-void RadioEngineWrapper::toggleAudioRoute()
-{
-    Q_D( RadioEngineWrapper );
-    d->mUseLoudspeaker = !d->mUseLoudspeaker;
-    d->mEngineHandler->setAudioRouteToLoudspeaker( d->mUseLoudspeaker );
-}
-
-/*!
- *
- */
-void RadioEngineWrapper::startSeeking( Seek::Direction direction, const int reason )
-{
-    Q_D( RadioEngineWrapper );
-    d->startSeeking( direction, reason );
-}
-
-/*!
- *
- */
-void RadioEngineWrapper::cancelSeeking()
-{
-    Q_D( RadioEngineWrapper );
-    d->mEngineHandler->cancelSeek();
-}
--- a/radioapp/radioenginewrapper/src/radioenginewrapper_p.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,244 +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:
-*
-*/
-
-// System includes
-
-// User includes
-#include "radioenginewrapper_p.h"
-#include "radiosettings.h"
-#include "radiosettings_p.h"
-#include "radiologger.h"
-#include "radio_global.h"
-#include "radioenginehandler.h"
-#include "radiostationhandlerif.h"
-#include "radiocontroleventlistener.h"
-#include "radiordslistener.h"
-#include "radioenginewrapperobserver.h"
-
-// Constants
-
-/*!
- *
- */
-RadioEngineWrapperPrivate::RadioEngineWrapperPrivate( RadioEngineWrapper* wrapper,
-                                                      RadioStationHandlerIf& stationHandler ) :
-    q_ptr( wrapper ),
-    mStationHandler( stationHandler ),
-    mEngineHandler( new RadioEngineHandler( *this ) ),
-    mControlEventListener( new RadioControlEventListener( *this ) ),
-    mRdsListener ( new RadioRdsListener( mStationHandler, *this ) ),
-    mTuneReason( TuneReason::Unspecified ),
-    mUseLoudspeaker( false )
-{
-}
-
-/*!
- *
- */
-RadioEngineWrapperPrivate::~RadioEngineWrapperPrivate()
-{
-    // Destructor needs to be defined because some member variables that are forward declared
-    // in the header are managed by QT's smart pointers and they require that the owning class
-    // has a non-inlined destructor. Compiler generates an inlined destructor if it isn't defined.
-}
-
-/*!
- * Initializes the private implementation
- */
-bool RadioEngineWrapperPrivate::init()
-{
-    if ( !mEngineHandler->constructEngine() ) {
-        LOG( "RadioEngineWrapperPrivate::init, EngineHandler construct failed" );
-        mEngineHandler.reset();
-        return false;
-    }
-
-    mEngineHandler->setRdsObserver( mRdsListener.data() );
-    mControlEventListener->init();
-
-    mUseLoudspeaker = mEngineHandler->isAudioRoutedToLoudspeaker();
-    if ( !mUseLoudspeaker ) {
-        RUN_NOTIFY_LOOP( mObservers, audioRouteChanged( false ) );
-    }
-
-    return true;
-}
-
-/*!
- * Returns the settings handler owned by the engine
- */
-RadioSettingsIf& RadioEngineWrapperPrivate::settings()
-{
-    if ( !mSettings ) {
-        mSettings.reset( new RadioSettings() );
-        mSettings->d_func()->init( &mEngineHandler->applicationSettings() );
-    }
-    return *mSettings;
-}
-
-/*!
- * Returns the enginehandler owned by the engine
- */
-RadioEngineHandler& RadioEngineWrapperPrivate::radioEnginehandler()
-{
-    return *mEngineHandler;
-}
-
-/*!
- * Tunes to the given frequency
- */
-void RadioEngineWrapperPrivate::setFrequency( uint frequency, const int reason )
-{
-    if ( mEngineHandler->currentFrequency() != frequency ) {
-        mTuneReason = reason;
-        mEngineHandler->setFrequency( frequency );
-    }
-}
-
-/*!
- *
- */
-ObserverList& RadioEngineWrapperPrivate::observers()
-{
-    return mObservers;
-}
-
-/*!
- *
- */
-void RadioEngineWrapperPrivate::startSeeking( Seek::Direction direction, const int reason )
-{
-    mTuneReason = reason;
-    mEngineHandler->seek( direction );
-}
-
-/*!
- * \reimp
- */
-void RadioEngineWrapperPrivate::PowerEventL( TBool aPowerState, TInt DEBUGVAR( aError ) )
-{
-    LOG_FORMAT( "RadioEngineWrapperPrivate::PowerEventL, PowerState: %d, Error: %d", aPowerState, aError );
-    RUN_NOTIFY_LOOP( mObservers, radioStatusChanged( aPowerState ) );
-}
-
-/*!
- * \reimp
- */
-void RadioEngineWrapperPrivate::FrequencyEventL( TUint32 aFrequency,
-                                                 RadioEngine::TRadioFrequencyEventReason aReason,
-                                                 TInt aError )
-{
-    Q_UNUSED( aReason );
-    LOG_FORMAT( "RadioEngineWrapperPrivate::FrequencyEventL - Freq: %d, TuneReason: %d, Err: %d", aFrequency, mTuneReason, aError );
-
-    if ( !aError ) {
-        const uint frequency = static_cast<uint>( aFrequency );
-        RUN_NOTIFY_LOOP( mObservers, tunedToFrequency( frequency, mTuneReason ) );
-    } else {
-        RUN_NOTIFY_LOOP( mObservers, tunedToFrequency( mEngineHandler->minFrequency(), TuneReason::StationScanNoStationsFound ) ); // no frequencies found
-    }
-}
-
-/*!
- * \reimp
- */
-void RadioEngineWrapperPrivate::VolumeEventL( TInt aVolume, TInt aError )
-{
-    Q_UNUSED( aError );
-    RUN_NOTIFY_LOOP( mObservers, volumeChanged( aVolume ) );
-}
-
-/*!
- * \reimp
- */
-void RadioEngineWrapperPrivate::MuteEventL( TBool aMuteState, TInt aError )
-{
-    Q_UNUSED( aError );
-    RUN_NOTIFY_LOOP( mObservers, muteChanged( aMuteState ) );
-}
-
-/*!
- * \reimp
- */
-void RadioEngineWrapperPrivate::AudioModeEventL( TInt DEBUGVAR( aAudioMode ), TInt DEBUGVAR( aError ) )
-{
-    LOG_FORMAT( "RadioEngineWrapperPrivate::AudioModeEventL, AudioMode: %d, Error: %d", aAudioMode, aError );
-}
-
-/*!
- * \reimp
- */
-void RadioEngineWrapperPrivate::AntennaEventL( TBool aAntennaAttached, TInt aError )
-{
-    Q_UNUSED( aError );
-    RUN_NOTIFY_LOOP( mObservers, antennaStatusChanged( aAntennaAttached ) );
-}
-
-/*!
- * \reimp
- */
-void RadioEngineWrapperPrivate::AudioRoutingEventL( TInt aAudioDestination, TInt aError )
-{
-    Q_UNUSED( aAudioDestination )
-    Q_UNUSED( aError )
-}
-
-/*!
- * \reimp
- */
-void RadioEngineWrapperPrivate::SeekingEventL( TInt DEBUGVAR( aSeekingState ), TInt DEBUGVAR( aError ) )
-{
-    LOG_FORMAT( "RadioEngineWrapperPrivate::SeekingEventL, aSeekingState: %d, Error: %d", aSeekingState, aError );
-}
-
-/*!
- * \reimp
- */
-void RadioEngineWrapperPrivate::RegionEventL( TInt DEBUGVAR( aRegion ), TInt DEBUGVAR( aError ) )
-{
-    LOG_FORMAT( "RadioEngineWrapperPrivate::RegionEventL, aRegion: %d, Error: %d", aRegion, aError );
-}
-
-/*!
- * \reimp
- */
-void RadioEngineWrapperPrivate::AudioRouteChangedL( RadioEngine::TRadioAudioRoute aRoute )
-{
-    mUseLoudspeaker = aRoute == RadioEngine::ERadioSpeaker;
-    RUN_NOTIFY_LOOP( mObservers, audioRouteChanged( mUseLoudspeaker ) );
-}
-
-/*!
- * \reimp
- */
-void RadioEngineWrapperPrivate::HandleSystemEventL( TRadioSystemEventType DEBUGVAR( aEventType ) )
-{
-    LOG_FORMAT( "RadioEngineWrapperPrivate::HandleSystemEventL, Event: %d", aEventType );
-//    ERadioHeadsetConnected,         ///< Headset was connected
-//    ERadioHeadsetDisconnected,      ///< Headset was disconnected
-//    ERadioNetworkCoverageUp,        ///< Network coverage detected
-//    ERadioNetworkCoverageDown,      ///< Network coverage lost
-//    ERadioCallActivated,            ///< Call activated or ringing
-//    ERadioCallDeactivated,          ///< Call disconnected
-//    ERadioEmergencyCallActivated,   ///< Call activated or ringing
-//    ERadioEmergencyCallDeactivated, ///< Call disconnected
-//    ERadioLowDiskSpace,             ///< Low disk space
-//    ERadioAudioRoutingHeadset,      ///< Audio routed through headset
-//    ERadioAudioRoutingSpeaker,      ///< Audio routed through speaker ( IHF )
-//    ERadioAudioResourcesAvailable,  ///< Audio resources have become available
-//    ERadioAudioAutoResumeForbidden  ///< Audio auto resuming is forbidden
-}
--- a/radioapp/radioenginewrapper/src/radioenginewrapper_win32.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,257 +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:
-*
-*/
-
-// User includes
-#include "radioenginewrapper.h"
-#include "radioenginewrapper_win32_p.h"
-#include "radioenginewrapperobserver.h"
-
-/*!
- * Constructor
- */
-RadioEngineWrapper::RadioEngineWrapper( RadioStationHandlerIf& stationHandler ) :
-    d_ptr( new RadioEngineWrapperPrivate( this, stationHandler ) )
-{
-}
-
-/*!
- * Destructor
- */
-RadioEngineWrapper::~RadioEngineWrapper()
-{
-}
-
-/*!
- *
- */
-bool RadioEngineWrapper::init()
-{
-    Q_D( RadioEngineWrapper );
-    return d->init();
-}
-
-/*!
- *
- */
-void RadioEngineWrapper::addObserver( RadioEngineWrapperObserver* observer )
-{
-    Q_D( RadioEngineWrapper );
-    d->mObservers.append( observer );
-}
-
-/*!
- *
- */
-void RadioEngineWrapper::removeObserver( RadioEngineWrapperObserver* observer )
-{
-    Q_D( RadioEngineWrapper );
-    d->mObservers.removeAll( observer );
-}
-
-/*!
- * Returns the settings handler owned by the engine
- */
-RadioSettingsIf& RadioEngineWrapper::settings()
-{
-    Q_D( RadioEngineWrapper );
-    return d->settings();
-}
-
-/*!
- * Returns the selected radio region
- */
-RadioRegion::Region RadioEngineWrapper::region() const
-{
-    Q_D( const RadioEngineWrapper );
-    return d->mRegionId;
-}
-
-/*!
- * Returns the minimum frequency
- */
-uint RadioEngineWrapper::minFrequency() const
-{
-    Q_D( const RadioEngineWrapper );
-    return d->mMinFrequency;
-}
-
-/*!
- * Returns the maximum frequency
- */
-uint RadioEngineWrapper::maxFrequency() const
-{
-    Q_D( const RadioEngineWrapper );
-    return d->mMaxFrequency;
-}
-
-/*!
- * Returns the frequency step size from the selected region
- */
-uint RadioEngineWrapper::frequencyStepSize() const
-{
-    Q_D( const RadioEngineWrapper );
-    return d->mFrequencyStepSize;
-}
-
-/*!
- * Returns the frequency step size from the selected region
- */
-bool RadioEngineWrapper::isFrequencyValid( uint frequency ) const
-{
-    Q_UNUSED( frequency );
-    return frequency >= minFrequency() && frequency <= maxFrequency() && frequency % frequencyStepSize() == 0;
-}
-
-/*!
- * Checks if the radio engine is on
- */
-bool RadioEngineWrapper::isRadioOn() const
-{
-    return true;
-}
-
-/*!
- * Returns the currently tuned frequency
- */
-uint RadioEngineWrapper::currentFrequency() const
-{
-    Q_D( const RadioEngineWrapper );
-    return d->mFrequency;
-}
-
-/*!
- * Returns the mute status
- */
-bool RadioEngineWrapper::isMuted() const
-{
-    return false;
-}
-
-/*!
- * Returns the antenna connection status
- */
-bool RadioEngineWrapper::isAntennaAttached() const
-{
-    Q_D( const RadioEngineWrapper );
-    return d->mAntennaAttached;
-}
-
-/*!
- * Returns the "use loudspeaker" status
- */
-bool RadioEngineWrapper::isUsingLoudspeaker() const
-{
-    Q_D( const RadioEngineWrapper );
-    return d->mUseLoudspeaker;
-}
-
-/*!
- * Sets or unsets the engine to manual seek mode
- */
-void RadioEngineWrapper::setManualSeekMode( bool manualSeek )
-{
-    Q_D( RadioEngineWrapper );
-    d->mManualSeekMode = manualSeek;
-    if ( !manualSeek ) {
-        RUN_NOTIFY_LOOP( d->mObservers, tunedToFrequency( d->mFrequency, d->mTuneReason ) );
-    }
-}
-
-/*!
- * Checks if the engine is in manual seek mode
- */
-bool RadioEngineWrapper::isInManualSeekMode() const
-{
-    Q_D( const RadioEngineWrapper );
-    return d->mManualSeekMode;
-}
-
-/*!
- *
- */
-void RadioEngineWrapper::setRdsEnabled( bool rdsEnabled )
-{
-    Q_UNUSED( rdsEnabled );
-}
-
-/*!
- * Tunes to the given frequency
- */
-void RadioEngineWrapper::setFrequency( uint frequency, const int reason )
-{
-    Q_D( RadioEngineWrapper );
-    d->setFrequency( frequency, reason );
-}
-
-/*!
- *
- */
-void RadioEngineWrapper::increaseVolume()
-{
-}
-
-/*!
- *
- */
-void RadioEngineWrapper::decreaseVolume()
-{
-}
-
-/*!
- * volume update command for the engine
- */
-void RadioEngineWrapper::setVolume( int volume )
-{
-    Q_D( RadioEngineWrapper );
-    d->setVolume( volume );
-}
-
-/*!
- *
- */
-void RadioEngineWrapper::setMute( bool muted, bool updateSettings )
-{
-    Q_UNUSED( muted );
-    Q_UNUSED( updateSettings );
-}
-
-/*!
- *
- */
-void RadioEngineWrapper::toggleAudioRoute()
-{
-    Q_D( RadioEngineWrapper );
-    d->toggleAudioRoute();
-}
-
-/*!
- *
- */
-void RadioEngineWrapper::startSeeking( Seek::Direction direction, const int reason )
-{
-    Q_D( RadioEngineWrapper );
-    d->startSeeking( direction, reason );
-}
-
-/*!
- *
- */
-void RadioEngineWrapper::cancelSeeking()
-{
-    Q_D( RadioEngineWrapper );
-    d->cancelSeeking();
-}
--- a/radioapp/radioenginewrapper/src/radioenginewrapper_win32_p.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,332 +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:
-*
-*/
-
-// System includes
-#include <QTimer>
-#include <QSettings>
-
-// User includes
-#include "radioenginewrapper_win32_p.h"
-#include "radiosettings.h"
-#include "radiosettings_p.h"
-#include "radiologger.h"
-#include "radio_global.h"
-#include "radiostationhandlerif.h"
-#include "radioenginewrapperobserver.h"
-//#include "t_radiodataparser.h"
-
-static RadioEngineWrapperPrivate* theInstance = 0;
-
-const QString KKeyFrequency = "CurrentFreq";
-const QString KKeyOffline = "Offline";
-
-const uint KScanFrequencies[] = {
-    87600000,
-    88000000,
-    89400000,
-    96000000,
-    97600000,
-    100600000,
-    101300000,
-    102600000,
-    103500000,
-    104100000,
-    105500000,
-    107500000
-};
-
-const int KScanFrequencyCount = sizeof( KScanFrequencies ) / sizeof( KScanFrequencies[0] );
-
-/*!
- *
- */
-RadioEngineWrapperPrivate::RadioEngineWrapperPrivate( RadioEngineWrapper* wrapper,
-                                                      RadioStationHandlerIf& stationHandler ) :
-    q_ptr( wrapper ),
-    mStationHandler( stationHandler ),
-    mTuneTimer( new QTimer( this ) ),
-    mTuneReason( 0 ),
-    mUseLoudspeaker( false ),
-    mAntennaAttached( true ),
-    mFrequency( 0 ),
-    mNextFrequency( 0 ),
-    mVolume( 5 ),
-    mMaxVolume( 10000 ),
-    mFrequencyStepSize( 50000 ),
-    mRegionId( RadioRegion::Default ),
-    mMinFrequency( 87500000 ),
-    mMaxFrequency( 108000000 ),
-    mManualSeekMode( false )
-{
-    ::theInstance = this;
-    mEngineSettings.reset( new QSettings( "Nokia", "QtFmRadio" ) );
-    mFrequency = mEngineSettings->value( KKeyFrequency ).toUInt();
-    if ( mFrequency == 0 ) {
-        mFrequency = mMinFrequency;
-    }
-
-    Radio::connect( mTuneTimer, SIGNAL(timeout()), this, SLOT(frequencyEvent()) );
-    mTuneTimer->setSingleShot( true );    
-}
-
-/*!
- *
- */
-RadioEngineWrapperPrivate::~RadioEngineWrapperPrivate()
-{
-    // Destructor needs to be defined because some member variables that are forward declared
-    // in the header are managed by QT's smart pointers and they require that the owning class
-    // has a non-inlined destructor. Compiler generates an inlined destructor if it isn't defined.
-}
-
-/*!
- *
- */
-RadioEngineWrapperPrivate* RadioEngineWrapperPrivate::instance()
-{
-    return ::theInstance;
-}
-
-/*!
- * Initializes the private implementation
- */
-bool RadioEngineWrapperPrivate::init()
-{
-    mUseLoudspeaker = false;
-    if ( !mUseLoudspeaker ) {
-        RUN_NOTIFY_LOOP( mObservers, audioRouteChanged( false ) );
-    }
-
-    parseData();
-    return true;
-}
-
-/*!
- * Returns the settings handler owned by the engine
- */
-RadioSettingsIf& RadioEngineWrapperPrivate::settings()
-{
-    if ( !mSettings ) {
-        mSettings.reset( new RadioSettings() );
-//        mSettings->d_func()->init( &mEngineHandler->ApplicationSettings() );
-    }
-    return *mSettings;
-}
-
-/*!
- * Tunes to the given frequency
- */
-void RadioEngineWrapperPrivate::setFrequency( uint frequency, const int reason )
-{
-    mNextFrequency = frequency;
-    mTuneReason = reason;
-
-    mTuneTimer->stop();
-    if ( !mManualSeekMode ) {
-        mTuneTimer->start( 500 );
-    } else {
-        frequencyEvent();
-    }
-}
-
-/*!
- *
- */
-ObserverList& RadioEngineWrapperPrivate::observers()
-{
-    return mObservers;
-}
-
-/*!
- *
- */
-void RadioEngineWrapperPrivate::startSeeking( Seek::Direction direction, const int reason )
-{
-    mTuneReason = reason;
-    mNextFrequency = 0;
-
-    // Find the previous and next favorite from current frequency
-    uint previous = 0;
-    uint next = 0;
-    for( int i = 0; i < KScanFrequencyCount; ++i ) {
-        const uint testFreq = KScanFrequencies[i];
-        if ( KScanFrequencies[i] > mFrequency ) {
-            next = testFreq;
-            break;
-        }
-        previous = testFreq;
-    }
-
-
-    if ( direction == Seek::Up ) {
-        if ( next == 0 ) {
-            next = KScanFrequencies[0];
-        }
-        mNextFrequency = next;
-    } else {
-        if ( previous == 0 ) {
-            previous = KScanFrequencies[KScanFrequencyCount - 1];
-        }
-        mNextFrequency = previous;
-    }
-
-    mTuneTimer->start( 1000 );
-}
-
-/*!
- *
- */
-void RadioEngineWrapperPrivate::cancelSeeking()
-{
-    mTuneTimer->stop();
-    mNextFrequency = 0;
-}
-
-/*!
- *
- */
-void RadioEngineWrapperPrivate::toggleAudioRoute()
-{
-    mUseLoudspeaker = !mUseLoudspeaker;
-    RUN_NOTIFY_LOOP( mObservers, audioRouteChanged( mUseLoudspeaker ) );
-}
-
-/*!
- *
- */
-QString RadioEngineWrapperPrivate::dataParsingError() const
-{
-    return mParsingError;
-}
-
-/*!
- *
- */
-void RadioEngineWrapperPrivate::setHeadsetStatus( bool connected )
-{
-    mAntennaAttached = connected;
-    RUN_NOTIFY_LOOP( mObservers, antennaStatusChanged( mAntennaAttached ) );
-}
-
-/*!
- *
- */
-void RadioEngineWrapperPrivate::setVolume( int volume )
-{
-    mVolume = volume;
-    RUN_NOTIFY_LOOP( mObservers, volumeChanged( mVolume ) );
-}
-
-/*!
- *
- */
-void RadioEngineWrapperPrivate::addSong( const QString& artist, const QString& title )
-{
-    QString radioText = QString( "Now Playing: %1 - %2" ).arg( artist ).arg( title );
-    mArtist = artist;
-    mTitle = title;
-
-    const uint frequency = mStationHandler.currentFrequency();
-    mStationHandler.setCurrentRadioText( frequency, radioText );
-
-    QTimer::singleShot( 500, this, SLOT(addSongTags()) );
-}
-
-/*!
- *
- */
-void RadioEngineWrapperPrivate::clearSong()
-{
-    mStationHandler.setCurrentRadioText( mStationHandler.currentFrequency(), "" );
-}
-
-/*!
- *
- */
-bool RadioEngineWrapperPrivate::isOffline() const
-{
-    return mEngineSettings->value( KKeyOffline, false ).toBool();
-}
-
-/*!
- *
- */
-void RadioEngineWrapperPrivate::setOffline( bool offline )
-{
-    mEngineSettings->setValue( KKeyOffline, offline );
-}
-
-/*!
- * Private slot
- */
-void RadioEngineWrapperPrivate::frequencyEvent()
-{
-    if ( mNextFrequency > 0 ) {
-        mFrequency = mNextFrequency;
-        mEngineSettings->setValue( KKeyFrequency, mFrequency );
-    }
-
-    if ( !mManualSeekMode ) {
-        RUN_NOTIFY_LOOP( mObservers, tunedToFrequency( mNextFrequency, mTuneReason ) );
-    }
-}
-
-/*!
- * Private slot
- */
-void RadioEngineWrapperPrivate::addSongTags()
-{
-    const uint frequency = mStationHandler.currentFrequency();
-    mStationHandler.setCurrentRadioTextPlus( frequency, RtPlus::Artist, mArtist );
-    mStationHandler.setCurrentRadioTextPlus( frequency, RtPlus::Title, mTitle );
-    mArtist = "";
-    mTitle = "";
-}
-
-/*!
- *
- */
-void RadioEngineWrapperPrivate::parseData()
-{
-    /*
-    mDataParser.reset( new T_RadioDataParser() );
-    bool ok = mDataParser->parse();
-    if ( !ok ) {
-        mParsingError = mDataParser->errorString();
-    } else {
-        if ( mDataParser->mEngineSettings.mMaxVolume > 0 ) {
-            mMaxVolume = mDataParser->mEngineSettings.mMaxVolume;
-        }
-
-        if ( mDataParser->mEngineSettings.mFrequencyStepSize > 0 ) {
-            mFrequencyStepSize = mDataParser->mEngineSettings.mFrequencyStepSize;
-        }
-
-        if ( mDataParser->mEngineSettings.mRegionId >= 0 ) {
-            mRegionId = static_cast<RadioRegion::Region>( mDataParser->mEngineSettings.mRegionId );
-        }
-
-        if ( mDataParser->mEngineSettings.mMinFrequency > 0 ) {
-            mMinFrequency = mDataParser->mEngineSettings.mMinFrequency;
-        }
-
-        if ( mDataParser->mEngineSettings.mMaxFrequency > 0 ) {
-            mMaxFrequency = mDataParser->mEngineSettings.mMaxFrequency;
-        }
-    }
-*/
-}
--- a/radioapp/radioenginewrapper/src/radioenginewrapperobserver.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,123 +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 "radioenginewrapperobserver.h"
-
-/*!
- *
- * @param frequency
- * @param commandSender
- */
-void RadioEngineWrapperObserver::tunedToFrequency( uint frequency, int reason )
-{
-    // Default implementation does nothing
-    Q_UNUSED( frequency );
-    Q_UNUSED( reason );
-}
-
-/*!
- *
- * @param radioIsOn
- */
-void RadioEngineWrapperObserver::radioStatusChanged( bool radioIsOn )
-{
-    // Default implementation does nothing
-    Q_UNUSED( radioIsOn );
-}
-
-/*!
- *
- * @param available
- */
-void RadioEngineWrapperObserver::rdsAvailabilityChanged( bool available )
-{
-    // Default implementation does nothing
-    Q_UNUSED( available );
-}
-
-/*!
- *
- */
-void RadioEngineWrapperObserver::increaseVolume()
-{
-    // Default implementation does nothing
-}
-
-/*!
- *
- */
-void RadioEngineWrapperObserver::decreaseVolume()
-{
-    // Default implementation does nothing
-}
-
-/*!
- *
- * @param volume
- */
-void RadioEngineWrapperObserver::volumeChanged( int volume )
-{
-    // Default implementation does nothing
-    Q_UNUSED( volume );
-}
-
-/*!
- *
- * @param muted
- */
-void RadioEngineWrapperObserver::muteChanged( bool muted )
-{
-    // Default implementation does nothing
-    Q_UNUSED( muted );
-}
-
-/*!
- *
- * @param loudspeaker
- */
-void RadioEngineWrapperObserver::audioRouteChanged( bool loudspeaker )
-{
-    // Default implementation does nothing
-    Q_UNUSED( loudspeaker );
-}
-
-/*!
- *
- * @param connected
- */
-void RadioEngineWrapperObserver::antennaStatusChanged( bool connected )
-{
-    // Default implementation does nothing
-    Q_UNUSED( connected );
-}
-
-/*!
- *
- */
-void RadioEngineWrapperObserver::skipPrevious()
-{
-    // Default implementation does nothing
-}
-
-/*!
- *
- */
-void RadioEngineWrapperObserver::skipNext()
-{
-    // Default implementation does nothing
-}
-
--- a/radioapp/radioenginewrapper/src/radiordslistener.cpp	Tue Aug 31 15:15:02 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:
-*
-*/
-
-// User includes
-#include "radiordslistener.h"
-#include "radiostationhandlerif.h"
-#include "radioenginewrapper_p.h"
-#include "radioenginewrapperobserver.h"
-#include "radiologger.h"
-
-/*!
- * Converts a symbian descriptor to Qt string
- */
-static QString convertString( const TDesC& aDesc )
-{
-    return QString::fromUtf16( aDesc.Ptr(), aDesc.Length() );
-}
-
-/*!
- *
- */
-RadioRdsListener::RadioRdsListener( RadioStationHandlerIf& stationHandler, RadioEngineWrapperPrivate& wrapper ) :
-    mStationHandler( stationHandler ),
-    mWrapper( wrapper )
-{
-}
-
-/*!
- * \reimp
- */
-void RadioRdsListener::RdsAvailable( TUint32 /*aFrequency*/, TBool aAvailable )
-{
-    RUN_NOTIFY_LOOP( mWrapper.observers(), rdsAvailabilityChanged( aAvailable ) );
-}
-
-/*!
- * \reimp
- */
-void RadioRdsListener::RdsAfSearchBegin()
-{
-}
-
-/*!
- * \reimp
- */
-void RadioRdsListener::RdsAfSearchEnd( TUint32 /*aFrequency*/, TInt /*aError*/ )
-{
-}
-
-/*!
- * \reimp
- */
-void RadioRdsListener::RdsAfSearchStateChange( TBool /*aEnabled*/ )
-{
-}
-
-/*!
- * \reimp
- */
-void RadioRdsListener::RdsDataProgrammeService( TUint32 aFrequency, const TDesC& aProgramService )
-{
-    if ( aProgramService.Length() > 0 ) {
-        LOG_TIMESTAMP( "RdsName changed" );
-        const uint frequency = static_cast<uint>( aFrequency );
-        mStationHandler.setCurrentPsName( frequency, convertString( aProgramService ) );
-
-#ifdef SHOW_CALLSIGN_IN_ANY_REGION
-        RdsDataPiCode( frequency, 0x3BB7 ); //KQOL-FM - Las Vegas, NV
-#endif
-    }
-}
-
-/*!
- * \reimp
- */
-void RadioRdsListener::RdsDataRadioText( TUint32 aFrequency, const TDesC& aRadioText )
-{
-    if ( aRadioText.Length() > 0 ) {
-        const uint frequency = static_cast<uint>( aFrequency );
-        mStationHandler.setCurrentRadioText( frequency, convertString( aRadioText ) );
-    }
-}
-
-/*!
- * \reimp
- */
-void RadioRdsListener::RdsDataRadioTextPlus( TUint32 aFrequency,
-                                             const TInt aRadioTextPlusClass,
-                                             const TDesC& aRadioText )
-{
-    TInt rtClass = aRadioTextPlusClass;
-    if ( aRadioTextPlusClass == RtPlus::Band ) {
-        rtClass = RtPlus::Artist;
-    }
-
-    const uint frequency = static_cast<uint>( aFrequency );
-    mStationHandler.setCurrentRadioTextPlus( frequency, rtClass, convertString( aRadioText ) );
-}
-
-/*!
- * \reimp
- */
-void RadioRdsListener::RdsDataGenre( TUint32 aFrequency, const TInt aGenre )
-{
-    LOG_FORMAT( "RadioRdsListener::RdsDataGenre: Genre: %d", aGenre );
-    const uint frequency = static_cast<uint>( aFrequency );
-    mStationHandler.setCurrentGenre( frequency, aGenre );
-}
-
-/*!
- * \reimp
- */
-void RadioRdsListener::RdsDataPiCode( TUint32 aFrequency, const TInt aPiCode )
-{
-    LOG_FORMAT( "RadioRdsListener::RdsDataPiCode, PI: %d", aPiCode );
-    const uint frequency = static_cast<uint>( aFrequency );
-    mStationHandler.setCurrentPiCode( frequency, aPiCode );
-}
--- a/radioapp/radioenginewrapper/src/radiosettings.cpp	Tue Aug 31 15:15:02 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:
-*
-*/
-
-// System includes
-#include <QVariant>
-
-// User includes
-#include "radiosettings.h"
-#include "radiosettings_p.h"
-#include "radio_global.h"
-
-namespace RadioSetting
-{
-    enum TMtvSettingType
-    {
-        EFlags = 0,
-        ESomething
-    };
-}
-
-/*!
- *
- */
-RadioSettings::RadioSettings() :
-    d_ptr( new RadioSettingsPrivate( this ) )
-{
-}
-
-/*!
- *
- */
-RadioSettings::~RadioSettings()
-{
-}
-
-/*!
- * \reimp
- */
-bool RadioSettings::isFirstTimeStart()
-{
-    Q_D( RadioSettings );
-    return d->isFirstTimeStart();
-}
-
-/*!
- * \reimp
- */
-void RadioSettings::setFirstTimeStartPerformed( bool firstTimeStartPerformed )
-{
-    Q_D( RadioSettings );
-    d->setFirstTimeStartPerformed( firstTimeStartPerformed );
-}
-
-/*!
- * \reimp
- */
-bool RadioSettings::showFavorites() const
-{
-    Q_D( const RadioSettings );
-    return d->isFlagSet( RadioSettingsPrivate::EShowFavorites );
-}
-
-/*!
- * \reimp
- */
-void RadioSettings::setShowFavorites( bool showFavorites )
-{
-    Q_D( RadioSettings );
-    if ( d->isFlagSet( RadioSettingsPrivate::EShowFavorites ) != showFavorites ) {
-        d->toggleFlag( RadioSettingsPrivate::EShowFavorites );
-    }
-}
-
-/*!
- * \reimp
- */
-bool RadioSettings::toggleShowFavorites()
-{
-    Q_D( RadioSettings );
-    d->toggleFlag( RadioSettingsPrivate::EShowFavorites );
-    return d->isFlagSet( RadioSettingsPrivate::EShowFavorites );
-}
--- a/radioapp/radioenginewrapper/src/radiosettings_p.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +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 "radiosettings.h"
-#include "radiosettings_p.h"
-#include "mradioapplicationsettings.h"
-
-
-/*!
- *
- */
-RadioSettingsPrivate::RadioSettingsPrivate( RadioSettings* settingsPublic ) :
-    q_ptr( settingsPublic ),
-    mFlags( 0 )
-{
-}
-
-/*!
- *
- */
-RadioSettingsPrivate::~RadioSettingsPrivate()
-{
-}
-
-/*!
- *
- */
-void RadioSettingsPrivate::init( MRadioApplicationSettings* storage )
-{
-    mSettingsStorage = storage;
-    if ( mSettingsStorage ) {
-        mFlags = Toggles( mSettingsStorage->UiFlags() );
-    }
-}
-
-/*!
- *
- */
-bool RadioSettingsPrivate::isFirstTimeStart()
-{
-    if ( mSettingsStorage ) {
-        return mSettingsStorage->IsFirstTimeStart();
-    }
-    return false;
-}
-
-/*!
- *
- */
-void RadioSettingsPrivate::setFirstTimeStartPerformed( bool firstTimeStartPerformed )
-{
-    if ( mSettingsStorage ) {
-        mSettingsStorage->SetFirstTimeStartPerformed( firstTimeStartPerformed );
-    }
-}
-
-/*!
- *
- */
-bool RadioSettingsPrivate::isFlagSet( ToggleFlag flag ) const
-{
-    return mFlags.testFlag( flag );
-}
-
-/*!
- *
- */
-void RadioSettingsPrivate::toggleFlag( ToggleFlag flag )
-{
-    mFlags ^= flag;
-}
-
-/*!
- *
- */
-void RadioSettingsPrivate::saveFlags()
-{
-    if ( mSettingsStorage ) {
-        mSettingsStorage->SetUiFlags( mFlags );
-    }
-}
--- a/radioapp/radioenginewrapper/src/radiosettings_win32_p.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +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 "radiosettings.h"
-#include "radiosettings_p.h"
-
-
-/*!
- *
- */
-RadioSettingsPrivate::RadioSettingsPrivate( RadioSettings* settingsPublic ) :
-    q_ptr( settingsPublic ),
-    mFlags( 0 )
-{
-}
-
-/*!
- *
- */
-RadioSettingsPrivate::~RadioSettingsPrivate()
-{
-}
-
-/*!
- *
- */
-/*
-void RadioSettingsPrivate::init( MRadioApplicationSettings* storage )
-{
-    mSettingsStorage = storage;
-    if ( mSettingsStorage ) {
-        mFlags = Toggles( mSettingsStorage->UiFlags() );
-    }
-}
-*/
-/*!
- *
- */
-bool RadioSettingsPrivate::isFirstTimeStart()
-{
-    return false;
-}
-
-/*!
- *
- */
-void RadioSettingsPrivate::setFirstTimeStartPerformed( bool firstTimeStartPerformed )
-{
-    Q_UNUSED( firstTimeStartPerformed );
-}
-
-/*!
- *
- */
-bool RadioSettingsPrivate::isFlagSet( ToggleFlag flag ) const
-{
-    return mFlags.testFlag( flag );
-}
-
-/*!
- *
- */
-void RadioSettingsPrivate::toggleFlag( ToggleFlag flag )
-{
-    mFlags ^= flag;
-}
-
-/*!
- *
- */
-void RadioSettingsPrivate::saveFlags()
-{
-}
--- a/radioapp/radioenginewrapper/src/t_radiodataparser.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,601 +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 "t_radiodataparser.h"
-
-const int KThousand                     = 1000;
-const int KMillion                      = KThousand * KThousand;
-
-const QString KDataFile                 = "./settings.xml";
-
-const QString KXmlMilliseconds          = "ms";
-const QString KXmlSeconds               = "s";
-const QString KXmlMinutes               = "m";
-const QString KXmlRadioSettings         = "RadioSettings";
-const QString KXmlMaxVolume             = "maxvolume";
-const QString KXmlFrequencyStepSize     = "FrequencyStepSize";
-const QString KXmlRegion                = "region";
-const QString KXmlMinFrequency          = "MinFrequency";
-const QString KXmlMaxFrequency          = "MaxFrequency";
-
-const QString KXmlRadioStations         = "RadioStations";
-const QString KXmlSetting               = "setting";
-const QString KXmlStation               = "Station";
-const QString KXmlName                  = "name";
-const QString KXmlValue                 = "value";
-const QString KXmlFrequency             = "frequency";
-const QString KXmlBooleanTrue           = "TRUE";
-const QString KXmlRds                   = "Rds";
-const QString KXmlRdsItem               = "RdsItem";
-const QString KXmlInterval              = "SendInterval";
-const QString KXmlType                  = "type";
-const QString KXmlCount                 = "count";
-const QString KXmlDelay                 = "delay";
-
-const QString KXmlRdsGroup              = "RdsGroup";
-const QString KXmlRdsPsName             = "PsName";
-const QString KXmlRdsPiCode             = "PiCode";
-const QString KXmlRdsRt                 = "RT";
-const QString KXmlRdsRtPlus             = "RtPlus";
-const QString KXmlRdsRtPlusItem         = "RtPlusItem";
-const QString KXmlRdsRtPlusTag          = "RtPlusTag";
-const QString KXmlRdsRtPlusTagDelay     = "delay";
-const QString KXmlRdsRtPlusTagArtist    = "artist";
-const QString KXmlRdsRtPlusTagTitle     = "title";
-const QString KXmlRdsPty                = "Pty";
-
-/*!
- *
- */
-static bool isEqual( const QString& first, const QString& second )
-{
-    return first.compare( second, Qt::CaseInsensitive ) == 0;
-}
-
-
-/*!
- *
- */
-T_RadioDataParser::T_RadioDataParser() :
-    mReader( new QXmlSimpleReader() )
-{
-}
-
-/*!
- *
- */
-T_RadioDataParser::~T_RadioDataParser()
-{
-}
-
-/*!
- *
- */
-bool T_RadioDataParser::parse()
-{
-    QFile file( KDataFile );
-    if ( file.exists() ) {
-        mSource.reset( new QXmlInputSource( &file ) );
-        mReader->setContentHandler( this );;
-        mReader->setErrorHandler( this );
-
-        return mReader->parse( mSource.data() );
-    } else {
-        mErrorString = QString( "Data file %1 not found!" ).arg( file.fileName() );
-    }
-    return false;
-}
-
-/*!
- * \reimp
- */
-bool T_RadioDataParser::startDocument()
-{
-    return true;
-}
-
-/*!
- * \reimp
- */
-bool T_RadioDataParser::endDocument()
-{
-    return true;
-}
-
-/*!
- * \reimp
- */
-bool T_RadioDataParser::startElement( const QString& namespaceURI,
-                                      const QString& localName,
-                                      const QString& qName,
-                                      const QXmlAttributes& atts )
-{
-    if ( isEqual( localName, KXmlRadioSettings ) )
-    {
-        handleStartRadioSettings( atts );
-    }
-    else if ( isEqual( localName, KXmlSetting ) )
-    {
-        handleStartSetting( atts );
-    }
-    else if ( isEqual( localName, KXmlRadioStations ) )
-    {
-//        handleStartRdsData( atts );
-    }
-    else if ( isEqual( localName, KXmlStation ) )
-    {
-        handleStartStation( atts );
-    }
-    else if ( isEqual( localName, KXmlRdsGroup ) )
-    {
-        handleStartRdsGroup( atts );
-    }
-    else if ( isEqual( localName, KXmlRds ) )
-    {
-        handleStartRdsData( atts );
-    }
-
-    return true;
-}
-
-/*!
- * \reimp
- */
-bool T_RadioDataParser::endElement( const QString& namespaceURI, const QString& localName, const QString& qName )
-{
-    if ( isEqual( localName, KXmlRadioSettings ) )
-        {
-        handleEndRadioSettings();
-        }
-    else if ( isEqual( localName, KXmlSetting ) )
-        {
-        handleEndSetting();
-        }
-    else if ( isEqual( localName, KXmlStation ) )
-        {
-        handleEndStation();
-        }
-    else if ( isEqual( localName, KXmlRds ) )
-        {
-        handleEndRdsData();
-        }
-    return true;
-}
-
-/*!
- * \reimp
- */
-bool T_RadioDataParser::characters( const QString& ch )
-{
-    return true;
-}
-
-/*!
- * \reimp
- */
-bool T_RadioDataParser::error( const QXmlParseException& exception )
-{
-    mErrorString = QString( "Line: %1, Column: %2, Msg: %3" )
-                   .arg( exception.lineNumber() )
-                   .arg( exception.columnNumber() )
-                   .arg( exception.message() );
-    return true;
-}
-
-/*!
- * \reimp
- */
-bool T_RadioDataParser::fatalError( const QXmlParseException& exception )
-{
-    mErrorString = QString( "Error in data XML. Line: %1, Column: %2, Msg: %3" )
-                   .arg( exception.lineNumber() )
-                   .arg( exception.columnNumber() )
-                   .arg( exception.message() );
-    return false;
-}
-
-/*!
- * \reimp
- */
-QString T_RadioDataParser::errorString() const
-{
-    return mErrorString;
-}
-
-/*!
- *
- */
-void T_RadioDataParser::handleStartRadioSettings( const QXmlAttributes& atts )
-{
-    Q_UNUSED( atts );
-    RadioData::EngineSettings* engineSettings = new RadioData::EngineSettings;
-    pushToSettingStack( engineSettings, mSettingStack );
-}
-
-/*!
- *
- */
-void T_RadioDataParser::handleEndRadioSettings()
-{
-    RadioData::EngineSettings* engineSettings
-            = static_cast<RadioData::EngineSettings*>( popFromSettingStack( mSettingStack ) );
-    if ( engineSettings )
-    {
-        mEngineSettings = *engineSettings;
-        delete engineSettings;
-        engineSettings = 0;
-    }
-}
-
-/*!
- *
- */
-void T_RadioDataParser::handleStartSetting( const QXmlAttributes& atts )
-{
-    RadioData::SettingHolder* holder = new RadioData::SettingHolder;
-
-    RadioData::Setting* parentHolder = topOfSettingStack( mSettingHolderStack );
-    if ( parentHolder ) {
-        static_cast<RadioData::SettingHolder*>( parentHolder )->mChildren.append( holder );
-    }
-
-    pushToSettingStack( holder, mSettingHolderStack );
-
-    for ( int i = 0; i < atts.count(); ++i )
-    {
-        QString attrName = atts.localName( i );
-
-        if ( isEqual( attrName, KXmlName ) )
-        {
-            holder->mName = atts.value( i );
-        }
-        else if ( isEqual( attrName, KXmlValue ) == 0 )
-        {
-            holder->mValue = atts.value( i );
-        }
-    }
-}
-
-/*!
- *
- */
-void T_RadioDataParser::handleEndSetting()
-{
-    QScopedPointer<RadioData::SettingHolder> holder(
-            static_cast<RadioData::SettingHolder*>( popFromSettingStack( mSettingHolderStack ) ) );
-    if ( mSettingHolderStack.count() == 0 )
-    {
-        if ( RadioData::Setting* setting = topOfSettingStack( mSettingStack ) )
-        {
-            setting->setValue( *holder, *this );
-        }
-    }
-}
-
-/*!
- *
- */
-void T_RadioDataParser::handleStartStation( const QXmlAttributes& atts )
-{
-    RadioData::Station* station = new RadioData::Station;
-    pushToSettingStack( station, mSettingStack );
-}
-
-/*!
- *
- */
-void T_RadioDataParser::handleEndStation()
-{
-    RadioData::Station* station = static_cast<RadioData::Station*>( popFromSettingStack( mSettingStack ) );
-    mStations.append( station );
-}
-
-/*!
- *
- */
-void T_RadioDataParser::handleStartRdsGroup( const QXmlAttributes& atts )
-{
-
-}
-
-/*!
- *
- */
-void T_RadioDataParser::handleEndRdsGroup()
-{
-
-}
-
-/*!
- *
- */
-void T_RadioDataParser::handleStartRdsData( const QXmlAttributes& atts )
-{
-    RadioData::RdsItem* rds = new RadioData::RdsItem;
-    pushToSettingStack( rds, mSettingStack );
-}
-
-/*!
- *
- */
-void T_RadioDataParser::handleEndRdsData()
-{
-    QScopedPointer<RadioData::RdsItem> rds(
-            static_cast<RadioData::RdsItem*>( popFromSettingStack( mSettingStack ) ) );
-    RadioData::Station* station = dynamic_cast<RadioData::Station*>( topOfSettingStack( mSettingStack ) );
-    if ( rds && station )
-    {
-        station->mRdsArray.append( rds.take() );
-    }
-}
-
-/*!
- *
- */
-void T_RadioDataParser::pushToSettingStack( RadioData::Setting* setting, RadioData::SettingArray& array )
-{
-    array.append( setting );
-}
-
-/*!
- *
- */
-RadioData::Setting* T_RadioDataParser::topOfSettingStack( RadioData::SettingArray& array )
-{
-    if ( array.count() > 0 )
-        {
-        return array[ array.count() - 1 ];
-        }
-
-    return 0;
-}
-
-/*!
- *
- */
-RadioData::Setting* T_RadioDataParser::popFromSettingStack( RadioData::SettingArray& array )
-{
-    const int lastIndex = array.count() - 1;
-    RadioData::Setting* setting = array[lastIndex];
-    array.removeAt( lastIndex );
-    return setting;
-}
-
-/*!
- *
- */
-int T_RadioDataParser::parseInt( const QString& string, int defaultVal )
-{
-    bool ok = false;
-    int ret = string.toInt( &ok );
-    if ( ok ) {
-        return ret;
-    }
-    return defaultVal;
-}
-
-/*!
- *
- */
-int T_RadioDataParser::parseTime( const QString& string, int defaultVal )
-{
-    if ( isEqual( string.right( 2 ), KXmlMilliseconds ) ) {
-        QString temp = string.mid( 0, string.length() - 2 );
-        return parseInt( temp, defaultVal );
-    } else if ( isEqual( string.right( 1 ), KXmlSeconds ) ) {
-        QString temp = string.mid( 0, string.length() - 1 );
-        return parseInt( temp, defaultVal ) * KThousand;
-    } else if ( isEqual( string.right( 1 ), KXmlMinutes ) ) {
-        QString temp = string.mid( 0, string.length() - 1 );
-        return parseInt( temp, defaultVal ) * KMillion;
-    } else {
-        // Default time is seconds
-        return parseInt( string, defaultVal ) * KThousand;
-    }
-}
-
-
-RadioData::RdsGroup::RdsGroup( const QXmlAttributes& atts, T_RadioDataParser& parser ) :
-    mInterval( 0 ),
-    mCount( 0 )
-{
-    for ( int i = 0; i < atts.count(); ++i ) {
-        QString attrName = atts.localName( i );
-
-        if ( isEqual( attrName, KXmlInterval ) )
-        {
-            mInterval = parser.parseTime( atts.value( i ), 0 );
-        }
-        else if ( isEqual( attrName, KXmlCount ) == 0 )
-        {
-            mCount = parser.parseInt( atts.value( i ), 0 );
-        }
-    }
-
-}
-
-RadioData::RdsGroup::~RdsGroup()
-{
-
-}
-
-RadioData::Station::Station() :
-    mFrequency( 0 )
-{
-}
-
-RadioData::Station::~Station()
-{
-    qDeleteAll( mRdsArray );
-    mRdsArray.clear();
-}
-
-void RadioData::Station::setValue( SettingHolder& holder, T_RadioDataParser& parser )
-{
-    if ( isEqual( holder.mName, KXmlFrequency ) )
-    {
-        int valueInt = 0;
-        parser.parseInt( holder.mValue, valueInt );
-        mFrequency = static_cast<uint>( valueInt );
-    }
-}
-
-
-RadioData::RdsItem::RdsItem() :
-    mCurrentRtPlusIndex( 0 ),
-    mType( RadioData::RdsItem::Unknown )
-{
-}
-
-RadioData::RdsItem::RtPlusHolder::RtPlusHolder() :
-    mDelay( 0 ),
-    mRtClass( 0 )
-{
-}
-
-RadioData::RdsItem::~RdsItem()
-{
-    qDeleteAll( mRtPlusItems );
-    mRtPlusItems.clear();
-}
-
-void RadioData::RdsItem::setValue( SettingHolder& holder, T_RadioDataParser& parser )
-{
-    if ( holder.mChildren.count() == 0 )
-    {
-        if ( isEqual( holder.mName, KXmlInterval ) )
-        {
-            mInterval = parser.parseInt( holder.mValue, 0 );
-        }
-        else if ( isEqual( holder.mName, KXmlType ) )
-        {
-            if ( isEqual( holder.mValue, KXmlRdsPsName ) )
-            {
-                mType = RadioData::RdsItem::RdsPsName;
-            }
-            else if ( isEqual( holder.mValue, KXmlRdsRt ) )
-            {
-                mType = RadioData::RdsItem::RdsRadioText;
-            }
-            else if ( isEqual( holder.mValue, KXmlRdsRt ) )
-            {
-                mType = RadioData::RdsItem::RdsRadioText;
-            }
-            else if ( isEqual( holder.mValue, KXmlRdsRtPlus ) )
-            {
-                mType = RadioData::RdsItem::RdsRadioTextPlus;
-            }
-            else if ( isEqual( holder.mValue, KXmlRdsPty ) )
-            {
-                mType = RadioData::RdsItem::RdsPty;
-            }
-            if ( isEqual( holder.mValue, KXmlRdsPiCode ) )
-            {
-                mType = RadioData::RdsItem::RdsPiCode;
-            }
-        }
-        else if ( isEqual( holder.mName, KXmlRdsItem ) )
-        {
-            mRdsItems.append( holder.mValue );
-        }
-    }
-    else
-    {
-        initChildren( holder, parser );
-    }
-}
-
-void RadioData::RdsItem::initChildren( SettingHolder& holder, T_RadioDataParser& parser )
-{
-    mRdsItems.append( holder.mValue );
-
-    for ( int i = 0; i < holder.mChildren.count(); ++i )
-    {
-        RtPlusHolder* rtPlusHolder = new RtPlusHolder;
-        mRtPlusItems.append( rtPlusHolder );
-
-        SettingHolder* child = holder.mChildren[i];
-        if ( isEqual( child->mName, KXmlRdsRtPlusTag ) )
-        {
-            rtPlusHolder->mRtClass = RadioData::RdsItem::Title;
-            if ( isEqual( child->mValue, KXmlRdsRtPlusTagArtist ) )
-            {
-                rtPlusHolder->mRtClass = RadioData::RdsItem::Artist;
-            }
-        }
-
-        for ( int j = 0; j < child->mChildren.count(); ++j )
-        {
-            SettingHolder* grandChild = child->mChildren[j];
-            if ( isEqual( grandChild->mName, KXmlRdsRtPlusTagDelay ) )
-            {
-                parser.parseInt( grandChild->mValue, rtPlusHolder->mDelay );
-            }
-            else if ( isEqual( grandChild->mName, KXmlRdsItem ) )
-            {
-                rtPlusHolder->mRtItem = grandChild->mValue;
-            }
-        }
-    }
-}
-
-RadioData::SettingHolder::SettingHolder()
-{
-}
-
-RadioData::SettingHolder::~SettingHolder()
-{
-    qDeleteAll( mChildren );
-    mChildren.clear();
-}
-
-RadioData::EngineSettings::EngineSettings() :
-    mMaxVolume( 0 ),
-    mFrequencyStepSize( 0 ),
-    mRegionId( 0 ),
-    mMinFrequency( 0 ),
-    mMaxFrequency( 0 )
-{
-}
-
-void RadioData::EngineSettings::setValue( SettingHolder& holder, T_RadioDataParser& parser )
-{
-    if ( isEqual( holder.mName, KXmlMaxVolume ) )
-    {
-        parser.parseInt( holder.mValue, mMaxVolume );
-    }
-    else if ( isEqual( holder.mName, KXmlFrequencyStepSize ) )
-    {
-        parser.parseInt( holder.mValue, mFrequencyStepSize );
-    }
-    else if ( isEqual( holder.mName, KXmlRegion ) )
-    {
-        parser.parseInt( holder.mValue, mRegionId );
-    }
-    else if ( isEqual( holder.mName, KXmlMinFrequency ) )
-    {
-        int valueInt = 0;
-        parser.parseInt( holder.mValue, valueInt );
-        mMinFrequency = static_cast<uint>( valueInt );
-    }
-    else if ( isEqual( holder.mName, KXmlMaxFrequency ) )
-    {
-        int valueInt = 0;
-        parser.parseInt( holder.mValue, valueInt );
-        mMaxFrequency = static_cast<uint>( valueInt );
-    }
-}
--- a/radioapp/radioenginewrapper/stub/radioenginewrapper_stub.pro	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +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:
-#
-
-TMP_DIR_NAME = enginewrapper_stub
-include(../../buildflags.pri)
-
-TEMPLATE    = lib
-TARGET      = fmradioenginewrapper_stub
-CONFIG      += dll
-DEFINES     += BUILD_WRAPPER_DLL
-    
-USE_DUMMY_RADIO_DATA:QT += xml
-
-INCLUDEPATH += ../inc
-INCLUDEPATH += ../../../common
-
-# Common headers
-HEADERS     += radiowrapperexport.h
-HEADERS     += radio_global.h
-HEADERS     += radiologger.h
-HEADERS     += radioenginewrapper.h
-HEADERS     += radiosettingsif.h
-HEADERS     += radiosettings.h
-HEADERS     += radiostationhandlerif.h
-HEADERS     += radioenginewrapperobserver.h
-
-INTERNAL_HEADERS += radiosettings_p.h
-
-#USE_DUMMY_RADIO_DATA:HEADERS += t_radiodataparser.h
-
-# Common sources
-SOURCES     += radiosettings.cpp
-SOURCES     += radiologger.cpp
-SOURCES     += radioenginewrapperobserver.cpp
-
-# Symbian specific stuff
-symbian: {
-    INCLUDEPATH += ../../../radioengine/utils/api
-    INCLUDEPATH += ../../../radioengine/settings/api
-    INCLUDEPATH += ../../../radioengine/engine/api
-
-    LIBS *= -lfmradioengineutils_stub
-    LIBS *= -lfmradioenginesettings_stub
-    LIBS *= -lfmradioengine_stub
-
-    HEADERS += radioenginehandler.h
-    HEADERS += mradioenginehandlerobserver.h
-    HEADERS += radiocontroleventlistener.h
-    HEADERS += radiordslistener.h
-
-    INTERNAL_HEADERS += radioenginewrapper_p.h
-
-    SOURCES += radiosettings_p.cpp
-    SOURCES += radioenginewrapper.cpp
-    SOURCES += radioenginewrapper_p.cpp
-    SOURCES += radioenginehandler.cpp
-    SOURCES += radiocontroleventlistener.cpp
-    SOURCES += radiordslistener.cpp
-}
-
-#USE_DUMMY_RADIO_DATA:SOURCES += t_radiodataparser.cpp
-
-# Win32 specific stuff
-win32: {
-    INCLUDEPATH += inc/win32
-
-    HEADERS += radioenginewrapper_win32_p.h
-    HEADERS += $$INTERNAL_HEADERS
-
-    SOURCES += radiosettings_win32_p.cpp
-    SOURCES += radioenginewrapper_win32.cpp
-    SOURCES += radioenginewrapper_win32_p.cpp
-}
-
-DEPENDPATH  += $$INCLUDEPATH ../src
--- a/radioapp/radioenginewrapper/tsrc/inc/mschedulerstartandstoptimerobserver.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +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:  Callback interface for observer of CAccSrvResetInactivityTimeTimer object.
-*
-*/
-
-
-
-
-#ifndef M_SCHEDULERSTARTANDSTOPTIMEROBSERVER_H
-#define M_SCHEDULERSTARTANDSTOPTIMEROBSERVER_H
-
-
-#include <e32def.h>
-
-
-/**
- *  Callback interface for observer of CSchedulerStopAndStartTimer object. 
- *
- *  This callback interface has to be implemented by observer class.
- *  @code
- *   ?good_class_usage_example(s)
- *  @endcode
- *
- *  @lib AccServer.exe
- *  @since S60 10.1
- */
-NONSHARABLE_CLASS( MSchedulerStartAndStopTimerObserver )
-    {
-
-public:
- 
-    /**
-     * Function is called by timer watcher every time when timer elapses.
-     *
-     * @since S60 10.1
-     * @param none. 
-     * @return none
-     */
-    virtual void Timeout( TUint aTimerId ) = 0;
-
-    virtual void CreateMUT() = 0;
-    virtual void DeleteMUT() = 0;
-
-    };
-
-
-#endif // M_SCHEDULERSTARTANDSTOPTIMEROBSERVER_H
--- a/radioapp/radioenginewrapper/tsrc/inc/t_radioenginewrapper.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,194 +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 T_RADIOENGINEWRAPPER_H_
-#define T_RADIOENGINEWRAPPER_H_
-
-
-// INCLUDES
-#include <QtTest/QtTest>
-#include <e32property.h>
-#include <centralrepository.h>
-#include <RadioStubManager.h>
-
-#include "radioenginewrapperobserver.h"
-#include "radiostationhandlerif.h"
-//#include "radiostation.h"
-#include "t_schedulerstartandstoptimer.h"
-
-class RadioUiEngine;
-class RadioStationModel;
-class RadioPlayLogModel;
-class RadioPresetStorage;
-class RadioEngineWrapper;
-//class RadioStationHandlerIf;
-
-class TestRadioEngineWrapper : public QObject, RadioStationHandlerIf, RadioEngineWrapperObserver, MSchedulerStartAndStopTimerObserver
-{
-    Q_OBJECT
-
-    /**
-     * Flags to indicate which slots have been entered since calling API method. 
-     * Declared to use QFlags<> to ease flag usage and to enforce type safety.
-     */
-    enum SlotEnteredFlag
-    {
-    	NoSlotsEntered         = 0
-        ,TunedToFrequency       = 1 << 0
-        ,MuteChanged            = 1 << 1
-        ,VolumeChanged          = 1 << 2
-        ,AntennaChanged         = 1 << 3
-        ,ItemAdded              = 1 << 4
-    };
-    Q_DECLARE_FLAGS( Slots, SlotEnteredFlag )    
-    
-public:
-
-    TestRadioEngineWrapper();
-    ~TestRadioEngineWrapper();    
-
-public slots:
-//    void dataChanged(const QModelIndex topLeft, const QModelIndex bottomRight);
-//    void stationAdded( RadioStation addedStation );    
-//    void stationDataChanged( RadioStation station );        
-//    void favoriteChanged( RadioStation station );
-//    void itemAdded();
-    
-private slots:
-    // test framework called slots 
-    void initTestCase();
-    void init();
-    void cleanup();
-    
-    void testRadioSettingsReference();
-    
-    void testRegion();
-    
-    void testRadioOnOff();
-
-    void testTuning();
-    
-    void testCancelSeeking();
-    
-    // Mute's callback function CRadioEngine::MrpoMuteChange() is commented in radio engine, so no point to test here.
-    // void testMute();
-    
-    void testVolumeSetting();
-    
-    void testLoudSpeakerUsage();
-    
-    void cleanupTestCase();
-    
-private:
-
-    // from base class RadioStationHandlerIf =>
-    uint currentFrequency() const;
-    int currentPresetIndex() const;
-
-    void setCurrentStation( uint frequency );
-
-    bool containsFrequency( uint frequency );
-
-    bool containsPresetIndex( int presetIndex );
-
-    void startDynamicPsCheck();
-
-    void addScannedFrequency( uint frequency );
-
-    void removeLocalStations();
-
-    void setCurrentPsName( uint frequency, const QString& name );
-    void setCurrentRadioText( uint frequency, const QString& radioText );
-    void setCurrentRadioTextPlus( uint frequency, int rtClass, const QString& rtItem );
-    void setCurrentPiCode( uint frequency, int piCode );
-    void setCurrentGenre( uint frequency, int genre );
-    // <= from base class RadioStationHandlerIf 
-    
-    // c =>
-    void tunedToFrequency( uint frequency, int commandSender );
-
-    void rdsAvailabilityChanged( bool available );
-
-    void increaseVolume();
-    void decreaseVolume();
-    void volumeChanged( int volume );
-    void muteChanged( bool muted );
-
-    void antennaStatusChanged( bool connected ); // uusi
-    
-    void audioRouteChanged( bool loudspeaker );
-
-    void skipPrevious();
-    void skipNext();
-    // <= from base class RadioStationHandlerIf 
-      
-    // from base class MSchedulerStartAndStopTimerObserver =>
-    void Timeout( TUint aTimerId );    
-    void CreateMUT();
-    void DeleteMUT();
-    // <=
-    
-    void tstSetTunerCababilities(uint category = 0);
-    void tstSetFrequency( TUint aFrequency );
-    TInt tstGetFrequency();
-    void tstSetScanningData( TUint aCount, TInt aMinFreq, TInt aFrequencyStepSize );
-    void tstDefineAndAttachRadioServerProperties();
-    TInt tstCreateCRObjects();
-    
-private:
-    RadioEngineWrapper* mEngineWrapper;
-
-    // RadioStubManager pointer points inside RadioStubManagerChunk
-    SRadioStubManager* mRadioStubManager;
-    
-    // RadioStubManagerChunk handle
-    RChunk mRadioStubManagerChunk;
-
-    // Active scheduler
-    // Workaround for the below panic, occured after porting to 10.1 
-    // Main Panic E32USER-CBase 44
-    // Create and install the active scheduler
-    CActiveScheduler* mScheduler;
-    
-    //QScopedPointer<RadioEngineWrapper>  mEngineWrapper;
-
-    //int mExpectedStationCount;
-    
-	Slots mEnteredSlots;
-	//QString mStationToBeAdded;
-	
-	CSchedulerStopAndStartTimer* mSchedulerTimer;
-
-    RProperty mPropertyPlayerState;
-    RProperty mPropertyAntennaStatus;
-    RProperty mPropertyOfflineMode;
-    RProperty mPropertyTransmitterStatus;
-    RProperty mPropertyFrequency;
-    RProperty mPropertyFrequencyRange;
-    RProperty mPropertyForceMonoReception;
-    RProperty mPropertySquelch;
-    RProperty mPropertyVolume;
-    RProperty mPropertyMuteStatus;
-    RProperty mPropertyBalance;
-
-    CRepository* mRadioCR;
-    
-    TInt mLastRecordedVolume; 
-};
-
-#endif /* T_RADIOENGINEWRAPPER_H_ */
--- a/radioapp/radioenginewrapper/tsrc/inc/t_schedulerstartandstoptimer.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,144 +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:  Timer for Starting and Stopping current Active Scheduler.
-*
-*/
-
-
-
-#ifndef C_ACCSRVRESETINACTIVITYTIMETIMER_H
-#define C_ACCSRVRESETINACTIVITYTIMETIMER_H
-
-
-
-#include <e32base.h>
-
-
-#include "mschedulerstartandstoptimerobserver.h"
-
-
-/**  Timer's default value in micro seconds */
-const TInt KTimerDefaultValue   = 400;
-
-
-/**
- *  Timer class for Starting and Stopping current Active Scheduler.
- *  
- *
- *  @code
- *   ?good_class_usage_example(s)
- *  @endcode
- *
- *  @lib AccServer.exe
- *  @since S60 10.1
- */
-NONSHARABLE_CLASS(  CSchedulerStopAndStartTimer ): public CTimer
-    {
-
-public:
-    enum TTimerId{
-    ETimerIdRunMUT = 0,
-    ETimerIdCreateMUT = 1,
-    ETimerIdDeleteMUT = 2    
-    };
-
-
-    /**
-    * Two-phased constructor.
-    * @param aSchedulerStartAndStopTimerObserver Observer callback interface.
-    */
-    static CSchedulerStopAndStartTimer* NewL(
-            MSchedulerStartAndStopTimerObserver& aSchedulerStartAndStopTimerObserver );
-
-    /**
-    * Destructor.
-    */
-    virtual ~CSchedulerStopAndStartTimer();
-
-    /**
-     * Starts the timer.
-     * @since S60 10.1
-     * @param aTime Time out value.
-     * @param aTimeId Timer Id.
-     * @return void
-     */
-     void StartTimer( TInt aTime = KTimerDefaultValue,
-             TUint aTimerId = ETimerIdRunMUT );
-
-
-protected:
-
-    /**
-     * From CActive.
-     * Handles an active object's request completion event.
-     *
-     * @since S60 10.1
-     * @param void
-     */
-   void RunL();
-    
-   /**
-    * From CActive.
-    * Handles RunL's leave cases
-    *
-    * @since S60 10.1
-    * @param aError Error code.
-    */
-   TInt RunError( TInt aError );
-
-
-private:
-
-    /**
-    * C++ default constructor.
-    * @param aSchedulerStartAndStopTimerObserver Observer callback interface.
-    */
-    CSchedulerStopAndStartTimer(
-            MSchedulerStartAndStopTimerObserver& aSchedulerStartAndStopTimerObserver );
-
-    /**
-     * By default Symbian OS constructor is private.
-     * @param none.
-     */
-    void ConstructL();
-
-
-private: // data
-    enum TTmerPhase
-        {
-        ETimerPhaseUndefined = 0,
-        ETimerPhaseStarting = 1,
-        ETimerPhaseStarted = 2
-        };
-
-    /**
-     * TimeOut time
-     */
-    TInt iTime;
-
-    /**
-     * Timer id. Client specific i.e same value is returned to observer.
-     */
-    TUint iTimerId;
-    
-    /**
-     * ResetInactivityTimeTimerObserver object.
-     */
-    MSchedulerStartAndStopTimerObserver& iSchedulerStartAndStopTimerObserver;
-
-    TTmerPhase iPhase;
-    };
-
-
-#endif // C_ACCSRVRESETINACTIVITYTIMETIMER_H
--- a/radioapp/radioenginewrapper/tsrc/inc/trace.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,596 +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:
-* Trace macro definitions.
-*
-*/
-
-#ifndef TRACE_H
-#define TRACE_H
-
-#include <e32base.h> // TCleanupItem
-#include "traceconfiguration.hrh"
-
-#ifdef TRACE_INTO_FILE
-#include <flogger.h> // RFileLogger
-#else
-#include <e32debug.h> // RDebug
-#endif
-
-//-----------------------------------------------------------------------------
-// Constants
-//-----------------------------------------------------------------------------
-//
-
-// NOTE!
-// Replace all COMPONENT_NAME occurnaces with your own component / module name.
-
-/**
-* Prefix trace macro to complete tracing with component name.
-* Returns TDesC which can be used directly with RDebug or RFileLogger.
-*/
-#define _PREFIX_TRACE( aMsg ) TPtrC( (const TText*)L"[t_radioenginewrapper]: " L##aMsg )
-
-/**
-* Prefix error trace
-*/
-#define _PREFIX_ERROR( aMsg ) _PREFIX_TRACE( "[ERROR: %d]: " L##aMsg )
-
-/**
-* Prefix info trace.
-*/
-#define _PREFIX_INFO( aMsg ) _PREFIX_TRACE( "[INFO]: " L##aMsg )
-
-/**
-* Prefix macro for strings
-*/
-#define _PREFIX_CHAR( aMsg ) (const char*)"[t_radioenginewrapper]: " ##aMsg
-
-/**
-* Define needed directories if TRACE_INTO_FILE macro in use
-*/
-#ifdef TRACE_INTO_FILE
-
-    _LIT( KDir, "radio" );
-    _LIT( KFile, "radio.txt" );
-    _LIT( KFullPath, "c:\\logs\\radio\\" );
-
-#endif
-
-//-----------------------------------------------------------------------------
-// Error trace macros
-//-----------------------------------------------------------------------------
-//
-#ifdef ERROR_TRACE
-
-    /**
-    * Error trace definitions.
-    */
-    #ifdef TRACE_INTO_FILE
-
-        #define ERROR( aErr, aMsg )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr );\
-                }\
-            }
-        #define ERROR_1( aErr, aMsg, aP1 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1 );\
-                }\
-            }
-        #define ERROR_2( aErr, aMsg, aP1, aP2 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2 );\
-                }\
-            }
-        #define ERROR_3( aErr, aMsg, aP1, aP2, aP3 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3 );\
-                }\
-            }
-        #define ERROR_4( aErr, aMsg, aP1, aP2, aP3, aP4 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3, aP4 );\
-                }\
-            }
-        #define ERROR_5( aErr, aMsg, aP1, aP2, aP3, aP4, aP5 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3, aP4, aP5 );\
-                }\
-            }
-        #define ERROR_6( aErr, aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3, aP4, aP5 );\
-                }\
-            }
-            
-    #else//TRACE_INTO_FILE not defined
-    
-        #define ERROR( aErr, aMsg )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr );\
-                }\
-            }
-        #define ERROR_1( aErr, aMsg, aP1 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1 );\
-                }\
-            }
-        #define ERROR_2( aErr, aMsg, aP1, aP2 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2 );\
-                }\
-            }
-        #define ERROR_3( aErr, aMsg, aP1, aP2, aP3 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3 );\
-                }\
-            }
-        #define ERROR_4( aErr, aMsg, aP1, aP2, aP3, aP4 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3, aP4 );\
-                }\
-            }
-        #define ERROR_5( aErr, aMsg, aP1, aP2, aP3, aP4, aP5 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3, aP4, aP5 );\
-                }\
-            }
-        #define ERROR_6( aErr, aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3, aP4, aP5, aP6 );\
-                }\
-            }
-    
-    #endif//TRACE_INTO_FILE
-
-    #define ERROR_GEN( aMsg ) ERROR( KErrGeneral, aMsg )
-    #define ERROR_GEN_1( aMsg, aP1 ) ERROR_1( KErrGeneral, aMsg, aP1 )
-    #define ERROR_GEN_2( aMsg, aP1, aP2 ) ERROR_2( KErrGeneral, aMsg, aP1, aP2 )
-    #define ERROR_GEN_3( aMsg, aP1, aP2, aP3 ) ERROR_3( KErrGeneral, aMsg, aP1, aP3 )
-    #define ERROR_GEN_4( aMsg, aP1, aP2, aP3, aP4 ) ERROR_4( KErrGeneral, aMsg, aP1, aP3, aP4 )
-    #define ERROR_GEN_5( aMsg, aP1, aP2, aP3, aP4, aP5 ) ERROR_5( KErrGeneral, aMsg, aP1, aP3, aP4, aP5 )
-    #define ERROR_GEN_6( aMsg, aP1, aP2, aP3, aP4, aP5, aP6 ) ERROR_6( KErrGeneral, aMsg, aP1, aP3, aP4, aP5, aP6 )
-
-#else//ERROR_TRACE not defined
-
-    #define ERROR( aErr, aMsg )
-    #define ERROR_1( aErr, aMsg, aP1 )
-    #define ERROR_2( aErr, aMsg, aP1, aP2 )
-    #define ERROR_3( aErr, aMsg, aP1, aP2, aP3 )
-    #define ERROR_4( aErr, aMsg, aP1, aP2, aP3, aP4 )
-    #define ERROR_5( aErr, aMsg, aP1, aP2, aP3, aP4, aP5 )
-    #define ERROR_6( aErr, aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )
-
-    #define ERROR_GEN( aMsg )
-    #define ERROR_GEN_1( aMsg, aP1 )
-    #define ERROR_GEN_2( aMsg, aP1, aP2 )
-    #define ERROR_GEN_3( aMsg, aP1, aP2, aP3 )
-    #define ERROR_GEN_4( aMsg, aP1, aP2, aP3, aP4 )
-    #define ERROR_GEN_5( aMsg, aP1, aP2, aP3, aP4, aP5 )
-    #define ERROR_GEN_6( aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )
-
-#endif//ERROR_TRACE
-
-//-----------------------------------------------------------------------------
-// TRAP and trace with error macro
-//-----------------------------------------------------------------------------
-//
-#define TRAP_ERROR( aErr, aFunction )\
-    {\
-    TRAP( aErr, aFunction );\
-    TPtrC8 file( ( TText8* )__FILE__ );\
-    ERROR_2( aErr, "Trapped leave in '%S' line %d", &file, __LINE__);\
-    }
-
-//-----------------------------------------------------------------------------
-// Info trace macros
-//-----------------------------------------------------------------------------
-//
-#ifdef INFO_TRACE
-
-    /**
-    * Info log message definitions.
-    */
-    #ifdef TRACE_INTO_FILE
-    
-        #define INFO( aMsg )\
-            {\
-            RFileLogger::Write( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ) );\
-            }
-        #define INFO_1( aMsg, aP1 )\
-            {\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1 );\
-            }
-        #define INFO_2( aMsg, aP1, aP2 )\
-            {\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2 );\
-            }
-        #define INFO_3( aMsg, aP1, aP2, aP3 )\
-            {\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2, aP3 );\
-            }
-        #define INFO_4( aMsg, aP1, aP2, aP3, aP4 )\
-            {\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2, aP3, aP4 );\
-            }
-        #define INFO_5( aMsg, aP1, aP2, aP3, aP4, aP5 )\
-            {\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2, aP3, aP4, aP5 );\
-            }
-        #define INFO_6( aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )\
-            {\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2, aP3, aP4, aP5, aP6 );\
-            }
-
-    #else//TRACE_INTO_FILE not defined
-
-        #define INFO( aMsg )\
-            {\
-            RDebug::Print( _PREFIX_INFO( aMsg ) );\
-            }
-        #define INFO_1( aMsg, aP1 )\
-            {\
-            RDebug::Print( _PREFIX_INFO( aMsg ), aP1 );\
-            }
-        #define INFO_2( aMsg, aP1, aP2 )\
-            {\
-            RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2 );\
-            }
-        #define INFO_3( aMsg, aP1, aP2, aP3 )\
-            {\
-            RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2, aP3 );\
-            }
-        #define INFO_4( aMsg, aP1, aP2, aP3, aP4 )\
-            {\
-            RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2, aP3, aP4 );\
-            }
-        #define INFO_5( aMsg, aP1, aP2, aP3, aP4, aP5 )\
-            {\
-            RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2, aP3, aP4, aP5 );\
-            }
-        #define INFO_6( aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )\
-            {\
-            RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2, aP3, aP4, aP5, aP6 );\
-            }
-
-    #endif//TRACE_INTO_FILE
-        
-#else//INFO_TRACE not defined
-
-    #define INFO( aMsg )
-    #define INFO_1( aMsg, aP1 )
-    #define INFO_2( aMsg, aP1, aP2 )
-    #define INFO_3( aMsg, aP1, aP2, aP3 )
-    #define INFO_4( aMsg, aP1, aP2, aP3, aP4 )
-    #define INFO_5( aMsg, aP1, aP2, aP3, aP4, aP5 )
-    #define INFO_6( aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )
-
-#endif//INFO_TRACE
-
-//-----------------------------------------------------------------------------
-// Trace current client thread name and process id
-//-----------------------------------------------------------------------------
-//
-#ifdef CLIENT_TRACE
-
-    #define CLIENT_PROCESS\
-        {\
-        CLIENT_PROCESS_PREFIX( "" );\
-        }        
-
-    #define CLIENT_PROCESS_PREFIX( aPrefix )\
-        {\
-        RProcess process;\
-        TPtrC name( process.Name() );\
-        TSecureId sid( process.SecureId() );\
-        TPtrC prefix( _S( aPrefix ) );\
-        if( prefix.Length() )\
-            {\
-            INFO_3( "%S: CLIENT - Name: [%S], Sid: [0x%x]", &prefix, &name, sid.iId );\
-            }\
-        else\
-            {\
-            INFO_2( "CLIENT - Name: [%S], Sid: [0x%x]", &name, sid.iId );\
-            }\
-        process.Close();\
-        }        
-
-    #define CLIENT_MESSAGE( aMsg )\
-        {\
-        CLIENT_MESSAGE_PREFIX( "", aMsg );\
-        }
-
-    #define CLIENT_MESSAGE_PREFIX( aPrefix, aMsg )\
-        {\
-        RThread thread;\
-        TInt err = aMsg.Client( thread );\
-        if( err == KErrNone )\
-            {\
-            RProcess process;\
-            err = thread.Process( process );\
-            if( err == KErrNone )\
-                {\
-                TPtrC threadName( thread.Name() );\
-                TUid processUid( process.SecureId() );\
-                TPtrC prefix( _S( aPrefix ) );\
-                if( prefix.Length() )\
-                    {\
-                    INFO_4( "%S: MSG - Name: [%S], Sid: [0x%x], Message ID: [%d]",\
-                        &prefix,\
-                        &threadName,\
-                        processUid,\
-                        aMsg.Function() );\
-                    }\
-                else\
-                    {\
-                    INFO_3( "MSG - Name: [%S], Sid: [0x%x], Message ID: [%d]",\
-                        &threadName,\
-                        processUid,\
-                        aMsg.Function() );\
-                    }\
-                }\
-            process.Close();\
-            }\
-        thread.Close();\
-        }
-
-#else
-
-    #define CLIENT_PROCESS
-    #define CLIENT_PROCESS_PREFIX( aPrefix )
-    #define CLIENT_MESSAGE( aMsg )
-    #define CLIENT_MESSAGE_PREFIX( aPrefix, aMsg )
-
-#endif
-
-//-----------------------------------------------------------------------------
-// Function trace macros
-//-----------------------------------------------------------------------------
-//
-#ifdef FUNC_TRACE
-
-    /**
-    * Function logging definitions.
-    */
-    #ifdef TRACE_INTO_FILE
-    
-        #define FUNC( aMsg, aP1 )\
-            {\
-            TPtrC8 trace( _S8( aMsg ) );\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, trace, aP1 );\
-            }\
-    
-    #else//TRACE_INTO_FILE not defined
-    
-        #define FUNC( aMsg, aP1 )\
-            {\
-            RDebug::Printf( aMsg, aP1 );\
-            }\
-    
-    #endif//TRACE_INTO_FILE
-        
-    /**
-    * Function trace helper class.
-    * 
-    * NOTE:
-    * LC -methods cannot be trapped. Therefore if LC -method leaves
-    * END trace is used instead of LEAVE trace.
-    * If you have an idea how to round this problem please tell.
-    */
-    _LIT8( KFuncNameTerminator, "(" );
-    _LIT8( KFuncLeavePatternL, "L" );
-    class TFuncLog
-        {
-        public:
-            static void Cleanup( TAny* aPtr )
-                {
-                TFuncLog* self = static_cast< TFuncLog* >( aPtr );
-                self->iLeft = ETrue;
-                FUNC( _PREFIX_CHAR("%S-LEAVE"), &self->iFunc ); // Leave detected
-                }
-            inline TFuncLog( const char* aFunc ) :
-                    iFunc( aFunc ? _S8( aFunc ) : _S8("") ),
-                    iLeft( EFalse ),
-                    iCleanupItem( Cleanup, this ),
-                    iCanLeave( EFalse )
-                {
-                TInt pos( iFunc.Find( KFuncNameTerminator ) );
-                if( pos != KErrNotFound )
-                    {
-                    iFunc.Set( iFunc.Left( pos ) );
-                    iCanLeave = !iFunc.Right( KFuncLeavePatternL().Length() ).Compare( KFuncLeavePatternL );
-                    if ( iCanLeave )
-                        {
-                        CleanupStack::PushL( iCleanupItem ); // Ignore warnings
-                        }
-                    }
-                FUNC( _PREFIX_CHAR("%S-START"), &iFunc );
-                }
-
-            inline ~TFuncLog()
-                {
-                if ( !iLeft )
-                    {
-                    if ( iCanLeave )
-                        {
-                        CleanupStack::Pop( this ); // Pop the cleanup item
-                        }
-                    FUNC( _PREFIX_CHAR("%S-END"), &iFunc ); // Normally finished
-                    }
-                }
-
-        private: // Data
-            TPtrC8 iFunc;
-            TBool iLeft;
-            TCleanupItem iCleanupItem;
-            TBool iCanLeave;
-        };
-    #define FUNC_LOG TFuncLog _fl( __PRETTY_FUNCTION__ );
-    
-#else//FUNC_TRACE not defined
-
-    #define FUNC_LOG
-
-#endif//FUNC_TRACE
-
-//-----------------------------------------------------------------------------
-// Timestamp trace macros
-//-----------------------------------------------------------------------------
-//
-#ifdef TIMESTAMP_TRACE
-
-    #ifdef TRACE_INTO_FILE
-    
-        #define TIMESTAMP( aCaption )\
-            {\
-            TTime t;\
-            t.HomeTime();\
-            TDateTime dt = t.DateTime();\
-            _LIT( KCaption, aCaption );\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend,\
-                _PREFIX_TRACE("[TIMESTAMP] %S %d:%02d:%02d.%d us"),\
-                    &KCaption, dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond() );\
-            }
-
-    #else//TRACE_INTO_FILE not defined
-    
-        #define TIMESTAMP( aCaption )\
-            {\
-            TTime t;\
-            t.HomeTime();\
-            TDateTime dt = t.DateTime();\
-            _LIT( KCaption, aCaption );\
-            RDebug::Print( _PREFIX_TRACE("[TIMESTAMP] %S %d:%02d:%02d.%d us"),\
-                &KCaption, dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond() );\
-            }
-
-    #endif//TRACE_INTO_FILE
-
-#else//TIMESTAMP_TRACE not defined
-
-    #define TIMESTAMP( aCaption )
-
-#endif//TIMESTAMP_TRACE
-
-#ifdef HEAP_TRACE
-
-    #ifdef TRACE_INTO_FILE
-
-        #define HEAP( aMsg )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace );\
-            }
-        #define HEAP_1( aMsg, aP1 )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1 );\
-            }
-        #define HEAP_2( aMsg, aP1, aP2 )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2 );\
-            }
-        #define HEAP_3( aMsg, aP1, aP2, aP3 )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2, aP3 );\
-            }
-        #define HEAP_4( aMsg, aP1, aP2, aP3, aP4 )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2, aP3, aP4 );\
-            }
-
-    #else//TRACE_INTO_FILE not defined
-
-        #define HEAP( aMsg )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace );\
-            }
-        #define HEAP_1( aMsg, aP1 )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1 );\
-            }
-        #define HEAP_2( aMsg, aP1, aP2 )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2 );\
-            }
-        #define HEAP_3( aMsg, aP1, aP2, aP3 )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2, aP3 );\
-            }
-        #define HEAP_4( aMsg, aP1, aP2, aP3, aP4 )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2, aP3, aP4 );\
-            }
-
-    #endif//TRACE_INTO_FILE
-
-#else//HEAP_TRACE not defined
-
-    #define HEAP( aMsg )
-    #define HEAP_1( aMsg, aP1 )
-    #define HEAP_2( aMsg, aP1, aP2 )
-    #define HEAP_3( aMsg, aP1, aP2, aP3 )
-    #define HEAP_4( aMsg, aP1, aP2, aP3, aP4 )
-
-#endif//HEAP_TRACE
-
-#endif
-
--- a/radioapp/radioenginewrapper/tsrc/inc/traceconfiguration.hrh	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +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:
-* Trace Macro Configurations.
-*
-*/
-
-#ifndef TRACECONFIGURATION_HRH
-#define TRACECONFIGURATION_HRH
-
-//-----------------------------------------------------------------------------
-// Trace definitions
-//-----------------------------------------------------------------------------
-//
-
-/**
-* Error trace enabled
-*/
-#ifdef _DEBUG
-    #define ERROR_TRACE
-#else
-    #undef ERROR_TRACE
-#endif
-
-/**
-* Info trace enabled
-*/
-#ifdef _DEBUG
-    #define INFO_TRACE
-#else
-    #undef INFO_TRACE
-#endif
-
-/**
-* Timestamp tracing on
-*/
-#ifdef _DEBUG
-    #define TIMESTAMP_TRACE
-#else
-    #undef TIMESTAMP_TRACE
-#endif
-
-/**
-* Tracing current client process and thread
-*/
-#ifdef _DEBUG
-    #define CLIENT_TRACE
-#else
-    #undef CLIENT_TRACE
-#endif
-
-/**
-* Function trace enabled
-*/
-#ifdef _DEBUG
-    #define FUNC_TRACE
-#else
-    #undef FUNC_TRACE
-#endif
-
-/**
-* Tracing into file enabled, default RDebug
-*/
-#undef TRACE_INTO_FILE
-
-#endif
-
--- a/radioapp/radioenginewrapper/tsrc/src/t_radioenginewrapper.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,654 +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: radiostation test implementation
-*
-*/
-
-#include <e32base.h>
-#include <eikenv.h>
-#include <e32property.h>
-#include <radiomonitor.h>
-
-#include "t_radioenginewrapper.h"
-//#include "radiopresetstorage.h"
-//#include "radiostation.h"
-//#include "radiostationmodel.h"
-//#include "radioplaylogmodel.h"
-#include "radioenginewrapper.h"
-#include "radiologger.h" //Radio::connect
-#include <cradiosettings.h>
-#include "mradioenginesettings.h"
-#include "trace.h"
-#include "RadioClientServer.h"
-#include "radiointernalcrkeys.h"
-#include "radioengineutils.h"
-
-#define STUB  mRadioStubManager
-#define TUNER  mRadioStubManager->iTuner
-#define PLAYER  mRadioStubManager->iPlayer
-#define RDS  mRadioStubManager->iRds
-#define ACCESSORYOBSERVER  mRadioStubManager->iAccessoryObserver
-#define REMCONTARGET  mRadioStubManager->iRemConTarget
-
-// Constants
-
-// CONSTANTS
-_LIT_SECURITY_POLICY_PASS(KRadioServerReadPolicy);
-_LIT_SECURITY_POLICY_C1(KRadioServerWritePolicy, ECapabilityWriteUserData);
-
-/*!
- *
- */
-int main(int /* argc*/, char *argv[])
-{
-FUNC_LOG;
-    TestRadioEngineWrapper tv;
-
-    char *pass[3];
-    pass[0] = argv[0];
-    pass[1] = "-o";
-    pass[2] = "c:\\data\\testradiouiengine.txt";
-
-    int res = QTest::qExec(&tv, 3, pass);
-
-    INFO_1( "Main, result value %i", res );
-    return res;
-}
-
-TestRadioEngineWrapper::TestRadioEngineWrapper()
-{
-FUNC_LOG;
-}
-
-// from base class RadioStationHandlerIf
-
-uint TestRadioEngineWrapper::currentFrequency() const
-{
-FUNC_LOG;
-return 0;
-}
-
-int TestRadioEngineWrapper::currentPresetIndex() const
-{
-FUNC_LOG;
-return 0;
-}
-
-void TestRadioEngineWrapper::setCurrentStation( uint /*frequency*/ )
-{
-FUNC_LOG;
-}
-
-bool TestRadioEngineWrapper::containsFrequency( uint /*frequency*/ )
-{
-FUNC_LOG;
-return 1;
-}
-
-bool TestRadioEngineWrapper::containsPresetIndex( int /*presetIndex*/ )
-{
-FUNC_LOG;
-return 1;
-}
-
-void TestRadioEngineWrapper::startDynamicPsCheck()
-{
-FUNC_LOG;
-}
-
-void TestRadioEngineWrapper::addScannedFrequency( uint /*frequency*/ )
-{
-FUNC_LOG;
-}
-
-void TestRadioEngineWrapper::removeLocalStations()
-{
-FUNC_LOG;
-}
-
-void TestRadioEngineWrapper::setCurrentPsName( uint /*frequency*/, const QString& /*name*/ )
-{
-FUNC_LOG;
-}
-
-void TestRadioEngineWrapper::setCurrentRadioText( uint /*frequency*/, const QString& /*radioText*/ )
-{
-FUNC_LOG;
-}
-
-void TestRadioEngineWrapper::setCurrentRadioTextPlus( uint /*frequency*/, int /*rtClass*/, const QString& /*rtItem*/ )
-{
-FUNC_LOG;
-}
-
-void TestRadioEngineWrapper::setCurrentPiCode( uint /*frequency*/, int /*piCode*/ )
-{
-FUNC_LOG;
-}
-
-void TestRadioEngineWrapper::setCurrentGenre( uint /*frequency*/, int /*genre*/ )
-{
-FUNC_LOG;
-}
-
-//  from base class RadioEngineWrapperObserver
-
-void TestRadioEngineWrapper::tunedToFrequency( uint frequency, int /* commandSender */)
-{
-    FUNC_LOG;
-    mEnteredSlots |= TunedToFrequency;
-    TInt err = mRadioCR->Set( KRadioCRTunedFrequency , (TInt)frequency );
-    QVERIFY2( KErrNone == err, "Setting key KRadioCRTunedFrequency failed!" );
-}
-
-        
-void TestRadioEngineWrapper::rdsAvailabilityChanged( bool /* available */)
-{
-FUNC_LOG;
-}
-    
-void TestRadioEngineWrapper::increaseVolume()
-{
-FUNC_LOG;
-}
-
-void TestRadioEngineWrapper::decreaseVolume()
-{
-FUNC_LOG;
-}
-
-void TestRadioEngineWrapper::volumeChanged( int volume )
-{
-FUNC_LOG;
-mEnteredSlots |= VolumeChanged;
-mLastRecordedVolume = volume;
-}
-    
-void TestRadioEngineWrapper::muteChanged( bool /* muted */)
-{
-FUNC_LOG;
-mEnteredSlots |= MuteChanged;
-}
-
-void TestRadioEngineWrapper::antennaStatusChanged( bool /* muted */)
-{
-FUNC_LOG;
-mEnteredSlots |= AntennaChanged;
-}
-
-void TestRadioEngineWrapper::audioRouteChanged( bool /* loudspeaker */)
-{
-FUNC_LOG;
-}
-        
-void TestRadioEngineWrapper::skipPrevious()
-{
-FUNC_LOG;
-}
-    
-void TestRadioEngineWrapper::skipNext()
-{
-FUNC_LOG;
-}
-
-/*!
- * Destructor
- */
-TestRadioEngineWrapper::~TestRadioEngineWrapper()
-{
-FUNC_LOG;
-mRadioStubManagerChunk.Close();
-delete mEngineWrapper;
-mEngineWrapper = NULL;
-delete mScheduler;
-mScheduler = NULL;
-}
-
-/*!
- * called before each testfunction is executed
- */
-void TestRadioEngineWrapper::init()
-{
-FUNC_LOG;
-}
-
-/*!
- * called after every testfunction
- */
-void TestRadioEngineWrapper::cleanup()
-{
-FUNC_LOG;
-}
-
-/*!
- * called before the first testfunction is executed
- */
- void TestRadioEngineWrapper::initTestCase()
-{
-    FUNC_LOG;
-    // Workaround for the below panic, occured after porting to 10.1 
-    // Main Panic E32USER-CBase 44
-    // Create and install the active scheduler
-    mScheduler = new(ELeave) CActiveScheduler;
-    CActiveScheduler::Install(mScheduler);
-
-    TInt err = mRadioStubManagerChunk.CreateGlobal(
-            KRadioStubManagerLocalChunkName,
-            sizeof(SRadioStubManager),
-            sizeof(SRadioStubManager),
-            EOwnerThread );
-    QVERIFY2( KErrNone == err, "Creation of memory chunk KRadioStubManagerLocalChunkName failed." );
-    QVERIFY2( sizeof(SRadioStubManager) <= mRadioStubManagerChunk.MaxSize(), "Improper size for memory chunk KRadioStubManagerLocalChunkName." );
-    TUint8* basePtr = mRadioStubManagerChunk.Base();
-    QVERIFY2( 0 != basePtr, "Getting base pointer of memory chunk KRadioStubManagerLocalChunkName failed." );
-    mRadioStubManager = (SRadioStubManager*)basePtr;
-    // Zero configuration/control data 
-    
-    mRadioStubManager->FillZ();
-    TRAP( err, mSchedulerTimer = CSchedulerStopAndStartTimer::NewL( *this ) );
-    QVERIFY2(  KErrNone == err, "CSchedulerStopAndStartTimer not constructed!" );     
-    mSchedulerTimer->StartTimer( 1000000, CSchedulerStopAndStartTimer::ETimerIdCreateMUT );
-}
- 
-void TestRadioEngineWrapper::testRadioSettingsReference()
-{
-    FUNC_LOG;
-    QVERIFY2(  0 != &mEngineWrapper->settings(), "Settings reference illegal!" );    
-}
-
-void TestRadioEngineWrapper::testRegion()
-{   
-    FUNC_LOG;
-    QVERIFY2( mEngineWrapper->region() >= RadioRegion::None, "Illegal Region Id!");
-    QVERIFY2( mEngineWrapper->region() <= RadioRegion::Poland, "Illegal Region Id!");
-    QVERIFY2(  mEngineWrapper->frequencyStepSize() != 0, "Region Step Size illegal!" );
-    QVERIFY2(  mEngineWrapper->minFrequency()  <  mEngineWrapper->maxFrequency(), "Region Minimum Frequency illegal!" );
-    QVERIFY2(  mEngineWrapper->maxFrequency()  > mEngineWrapper->minFrequency(), "Region Maximum Frequency illegal!" );
-    QVERIFY2(  mEngineWrapper->isFrequencyValid( mEngineWrapper->minFrequency() + mEngineWrapper->frequencyStepSize() ), "Legal frequency not accepted!" );
-    QVERIFY2(  mEngineWrapper->isFrequencyValid( mEngineWrapper->maxFrequency() - mEngineWrapper->frequencyStepSize() ), "Legal frequency not accepted!" );
-    QVERIFY2(  mEngineWrapper->isFrequencyValid( mEngineWrapper->minFrequency() ), "Legal minimum frequency not accepted!" );
-    QVERIFY2(  mEngineWrapper->isFrequencyValid( mEngineWrapper->maxFrequency() ), "Legal maximum frequency not accepted!" );
-    QVERIFY2(  !mEngineWrapper->isFrequencyValid( mEngineWrapper->maxFrequency() + mEngineWrapper->frequencyStepSize() ), "Illegal frequency accepted!" );
-    QVERIFY2(  !mEngineWrapper->isFrequencyValid( mEngineWrapper->minFrequency() - mEngineWrapper->frequencyStepSize() ), "Illegal frequency accepted!" );
-    QVERIFY2(  !mEngineWrapper->isFrequencyValid( 0 + mEngineWrapper->frequencyStepSize() ), "Illegal frequency accepted!" );
-    QVERIFY2(  !mEngineWrapper->isFrequencyValid( 0 - mEngineWrapper->frequencyStepSize() ), "Illegal frequency accepted!" );
-}
-
-void TestRadioEngineWrapper::testRadioOnOff()
-{
-    FUNC_LOG;
-    QVERIFY2(  !mEngineWrapper->isRadioOn(), "Radio is not off!" );
-
-    TInt err(KErrNone);
-    TBool antennaAttached = ETrue;
-    err = RProperty::Set( KStub_KRadioServerPropertyCategory, ERadioServPsAntennaStatus,  antennaAttached );
-    INFO_1("RProperty::Set( KStub_KRadioServerPropertyCategory, ERadioServPsAntennaStatus,  antennaAttached ) err: %d", err);
-    QVERIFY2( KErrNone == err, "Setting property ERadioServPsAntennaStatus failed!" );
-    mSchedulerTimer->StartTimer( 1000000 );
-    QVERIFY2(  mEngineWrapper->isAntennaAttached(), "Headset/Antenna not connected!");
-    ACCESSORYOBSERVER.iObserver->HeadsetConnectedCallbackL();
-    
-    TPckgBuf<TRsSettingsData> playerState;
-    playerState().iError = KErrNone;
-    playerState().iData1 = ETrue;
-    err = RProperty::Set( KStub_KRadioServerPropertyCategory, ERadioServPsPlayerState,  playerState );
-    QVERIFY2( KErrNone == err, "Setting property ERadioServPsPlayerState failed!" );
-    
-    mSchedulerTimer->StartTimer( 1000000 );
-    QVERIFY2(  mEngineWrapper->isAntennaAttached(), "Headset/Antenna not connected!");
-    QVERIFY2(  mEngineWrapper->isRadioOn(), "Radio is not on!" );
-}
- 
-void TestRadioEngineWrapper::testTuning()
-    {
-    FUNC_LOG;
-    QVERIFY2( mEngineWrapper->isRadioOn(), "Radio is not on!" );
-
-    // Tune to minimum frequency
-    mEngineWrapper->setFrequency( mEngineWrapper->minFrequency() );
-    TInt err = mPropertyFrequency.Set( KStub_KRadioServerPropertyCategory, ERadioServPsFrequency,  tstGetFrequency() );
-    QVERIFY2( KErrNone == err, "Setting property ERadioServPsFrequency failed!" );
-    mSchedulerTimer->StartTimer( 1000000 );
-    INFO_1("mEngineWrapper->minFrequency() = %i", mEngineWrapper->minFrequency() );
-    INFO_1("mEngineWrapper->currentFrequency() = %i", mEngineWrapper->currentFrequency() );
-    QVERIFY2(  mEngineWrapper->currentFrequency() ==  mEngineWrapper->minFrequency(), "Tuning to minimum frequency failed!");
-
-    // Seek upwards
-    uint freq_A = mEngineWrapper->currentFrequency();    
-    //mSchedulerTimer->StartTimer( 1000 );
-    tstSetFrequency( freq_A + mEngineWrapper->frequencyStepSize() );   
-    mEngineWrapper->startSeeking( Seek::Up );    
-    err = mPropertyFrequency.Set( KStub_KRadioServerPropertyCategory, ERadioServPsFrequency,  tstGetFrequency() );
-    QVERIFY2( KErrNone == err, "Setting property ERadioServPsFrequency failed!" );
-    mSchedulerTimer->StartTimer( 1000000 );
-    QVERIFY2(  TunedToFrequency == ( mEnteredSlots & TunedToFrequency ), "Not Tuned to next upward frequency!");
-    mEnteredSlots &= !TunedToFrequency;
-    uint freq_B = mEngineWrapper->currentFrequency();
-    QVERIFY2(  (freq_B - mEngineWrapper->frequencyStepSize()) == freq_A, "Seeking upwards failed!");
-
-
-    // Tune to maximum frequency
-    tstSetFrequency( mEngineWrapper->maxFrequency() );   
-    mEngineWrapper->setFrequency( mEngineWrapper->maxFrequency() );
-    err = mPropertyFrequency.Set( KStub_KRadioServerPropertyCategory, ERadioServPsFrequency,  tstGetFrequency() );
-    QVERIFY2( KErrNone == err, "Setting property ERadioServPsFrequency failed!" );
-    mSchedulerTimer->StartTimer( 1000000 );
-    QVERIFY2(  TunedToFrequency == ( mEnteredSlots & TunedToFrequency ), "Not Tuned to maximum frequency!");
-    mEnteredSlots &= !TunedToFrequency;
-    QVERIFY2( mEngineWrapper->currentFrequency() == mEngineWrapper->maxFrequency(), "Current frequency not the maximum one!" );
-
-    
-    // Seek downwards
-    mEngineWrapper->startSeeking( Seek::Down );
-    tstSetFrequency(  mEngineWrapper->currentFrequency() - (2 * mEngineWrapper->frequencyStepSize()) );   
-    err = mPropertyFrequency.Set( KStub_KRadioServerPropertyCategory, ERadioServPsFrequency,  tstGetFrequency() );
-    QVERIFY2( KErrNone == err, "Setting property ERadioServPsFrequency failed!" );
-    mSchedulerTimer->StartTimer( 1000000 );
-    QVERIFY2(  TunedToFrequency == ( mEnteredSlots & TunedToFrequency ), "Not Tuned to next downward frequency!");
-    mEnteredSlots &= !TunedToFrequency;
-    QVERIFY2(  mEngineWrapper->currentFrequency() ==  mEngineWrapper->maxFrequency()- (2 * mEngineWrapper->frequencyStepSize()), "Seeking downwards failed!");
-
-    // Tune to avarage frequency
-    uint averageFrequency( mEngineWrapper->maxFrequency() + mEngineWrapper->minFrequency() );
-    averageFrequency /= 2;
-    averageFrequency -= ( averageFrequency % mEngineWrapper->frequencyStepSize() );
-    mEngineWrapper->setFrequency( averageFrequency );
-    err = mPropertyFrequency.Set( KStub_KRadioServerPropertyCategory, ERadioServPsFrequency,  tstGetFrequency() );
-    QVERIFY2( KErrNone == err, "Setting property ERadioServPsFrequency failed!" );
-    mSchedulerTimer->StartTimer( 1000000 );
-    QVERIFY2(  TunedToFrequency == ( mEnteredSlots & TunedToFrequency ), "Not Tuned to average frequency!");
-    mEnteredSlots &= !TunedToFrequency;
-    QVERIFY2(  mEngineWrapper->currentFrequency() ==  averageFrequency, "Tuning to average frequency failed!");
-
-    // Try to use frequency above maximum
-    uint freq_C = mEngineWrapper->currentFrequency();
-    TUNER.iSetFrequencyError.SetStubError( KRadioServErrFrequencyOutOfBandRange );
-    mEngineWrapper->setFrequency( mEngineWrapper->maxFrequency() + mEngineWrapper->frequencyStepSize() );
-    mSchedulerTimer->StartTimer( 1000000 );    
-    // Should be == not != as now. This is done in order to complete tests.
-    QVERIFY2( mEngineWrapper->currentFrequency() != freq_C, "Tuning over maximum frequency succeeded?");
-    QVERIFY2( !mEngineWrapper->isFrequencyValid( mEngineWrapper->currentFrequency() ), "A frequency over maximum accepted?");
-
-    // Try to use frequency below minimum
-    uint freq_D = mEngineWrapper->currentFrequency();
-    TUNER.iSetFrequencyError.SetStubError( KRadioServErrFrequencyOutOfBandRange );
-    mEngineWrapper->setFrequency( mEngineWrapper->minFrequency() - mEngineWrapper->frequencyStepSize() );
-    mSchedulerTimer->StartTimer( 1000000 );
-    // Should be == not != as now. This is done in order to complete tests.
-    QVERIFY2(  mEngineWrapper->currentFrequency() != freq_D, "Tuning below minimum frequency succeeded?");
-    QVERIFY2( !mEngineWrapper->isFrequencyValid( mEngineWrapper->currentFrequency() ), "A frequency below minimum accepted?");
-    }
-
-void TestRadioEngineWrapper::testCancelSeeking()
-    {
-    FUNC_LOG;
-    QVERIFY2( mEngineWrapper->isRadioOn(), "Radio is not on!" );
-
-    mEngineWrapper->startSeeking( Seek::Up, TuneReason::StationScanInitialization );    
-    mSchedulerTimer->StartTimer( 1000000 );
-    TInt frequency1( mEngineWrapper->currentFrequency() );
-
-    mEngineWrapper->startSeeking( Seek::Up, TuneReason::StationScan );    
-    tstSetFrequency(  mEngineWrapper->currentFrequency() + mEngineWrapper->frequencyStepSize() );   
-    TInt err = mPropertyFrequency.Set( KStub_KRadioServerPropertyCategory, ERadioServPsFrequency,  tstGetFrequency() );
-    QVERIFY2( KErrNone == err, "Setting property ERadioServPsFrequency failed!" );
-    mSchedulerTimer->StartTimer( 1000000 );
-    QVERIFY2( mEngineWrapper->currentFrequency() > frequency1, "Seeking Upwards failed!" );
-    frequency1 = mEngineWrapper->currentFrequency();
-
-    mEngineWrapper->cancelSeeking();    
-    }
-
-/* Mute's callback function CRadioEngine::MrpoMuteChange() is commented in radio engine, so no point to test here.
-void TestRadioEngineWrapper::testMute()
-    {
-    FUNC_LOG;
-    QVERIFY2( mEngineWrapper->isRadioOn(), "Radio is not on!" );
-    // Toggle mute.
-    TBool muted_1( mEngineWrapper->isMuted() );
-    INFO_1( "muted_1", muted_1 );
-    mEngineWrapper->setMute( !muted_1 );
-    TInt err = mPropertyFrequency.Set( KStub_KRadioServerPropertyCategory, ERadioServPsMuteStatus,  muted_1 ? 0x0 : 0xff );
-    QVERIFY2( KErrNone == err, "Setting property ERadioServPsMuteStatus failed!" );
-    mSchedulerTimer->StartTimer( 1000000 );
-    TBool muted_2( mEngineWrapper->isMuted() );
-    QVERIFY2(  mEnteredSlots &= MuteChanged, "Mute not changed!");
-    mEnteredSlots &= !MuteChanged;    
-    QVERIFY2( muted_1 != muted_2, "Mute() not working!" );
-
-    // Toggle back to original value
-    mEngineWrapper->setMute( muted_1 );
-    err = mPropertyFrequency.Set( KStub_KRadioServerPropertyCategory, ERadioServPsMuteStatus,  muted_1 );
-    QVERIFY2( KErrNone == err, "Setting property ERadioServPsMuteStatus failed!" );
-    mSchedulerTimer->StartTimer( 1000000 );
-    TBool muted_3( mEngineWrapper->isMuted() );
-    QVERIFY2(  mEnteredSlots &= MuteChanged, "Mute not changed!");
-    mEnteredSlots &= !MuteChanged;    
-    QVERIFY2( muted_1 == muted_3, "Mute status not changed to original value!") ;
-    }
-*/
-
-
-void TestRadioEngineWrapper::testVolumeSetting()
-    {
-    FUNC_LOG;
-    // SetVoliúme(() seems to accept any value. Probably because the real check point
-    //  is missing from test constellation.
-    QVERIFY2( mEngineWrapper->isRadioOn(), "Radio is not on!" );
-    INFO_1( "mLastRecordedVolume: %i", mLastRecordedVolume );
-    TInt volume_1( 10 );
-    mEngineWrapper->setVolume( volume_1 );
-    
-    mSchedulerTimer->StartTimer( 1000000 );
-    
-    INFO_1( "mLastRecordedVolume: %i", mLastRecordedVolume );
-    QVERIFY2(  mEnteredSlots &= VolumeChanged, "Volume not changed!");
-    mEnteredSlots &= !VolumeChanged;    
-    QVERIFY2( volume_1 == mLastRecordedVolume, "Volume has unexpected value!") ;
-
-    volume_1 = mLastRecordedVolume;
-    TInt volume_2( (mLastRecordedVolume + 5)%20 );
-    mEngineWrapper->setVolume( volume_2 );
-    
-    mSchedulerTimer->StartTimer( 1000000 );
-    
-    INFO_1( "mLastRecordedVolume: %i", mLastRecordedVolume );
-    QVERIFY2(  mEnteredSlots &= VolumeChanged, "Volume not changed!");
-    mEnteredSlots &= !VolumeChanged;    
-    QVERIFY2( volume_2 == mLastRecordedVolume, "Volume has unexpected value!") ;
-
-    // Increase volume
-    mEngineWrapper->setVolume( volume_1 );
-    mSchedulerTimer->StartTimer( 1000000 );
-    mEngineWrapper->increaseVolume();    
-    mSchedulerTimer->StartTimer( 1000000 );    
-    QVERIFY2(  mEnteredSlots &= VolumeChanged, "Volume not increased!");
-    mEnteredSlots &= !VolumeChanged;    
-    QVERIFY2( volume_1 != mLastRecordedVolume, "Volume has unexpected value, not increased!") ;
-    INFO_1( "mLastRecordedVolume: %i", mLastRecordedVolume );
- 
-    // Decrease volume
-    mEngineWrapper->setVolume( volume_1 );
-    mSchedulerTimer->StartTimer( 1000000 );
-    mEngineWrapper->decreaseVolume();    
-    mSchedulerTimer->StartTimer( 1000000 );    
-    QVERIFY2(  mEnteredSlots &= VolumeChanged, "Volume not decreased!");
-    mEnteredSlots &= !VolumeChanged;    
-    QVERIFY2( volume_1 != mLastRecordedVolume, "Volume has unexpected value, not decreased!") ;
-    INFO_1( "mLastRecordedVolume: %i", mLastRecordedVolume );
-
-    mEngineWrapper->toggleAudioRoute();
-    mEngineWrapper->toggleAudioRoute();
-
-    }
-
-void TestRadioEngineWrapper::testLoudSpeakerUsage()
-    {
-    FUNC_LOG;
-    QVERIFY2( mEngineWrapper->isRadioOn(), "Radio is not on!" );
-    TBool isLoudSpeakerUsed( mEngineWrapper->isUsingLoudspeaker() );
-    INFO_1( "isLoudSpeakerUsed: %i", isLoudSpeakerUsed );   
-    }
-
-
-/*!
- * called after the last testfunction was executed
- */
-void TestRadioEngineWrapper::cleanupTestCase()
-{
-    FUNC_LOG;
-    DeleteMUT();    
-	delete mScheduler;
-	mScheduler = NULL;
-    mRadioStubManagerChunk.Close();
-    mPropertyPlayerState.Close();
-    mPropertyAntennaStatus.Close();
-    mPropertyOfflineMode.Close();
-    mPropertyTransmitterStatus.Close();
-    mPropertyFrequency.Close();
-    mPropertyFrequencyRange.Close();
-    mPropertyForceMonoReception.Close();
-    mPropertySquelch.Close();
-    mPropertyVolume.Close();
-    mPropertyMuteStatus.Close();
-    mPropertyBalance.Close();
-}
-
-void TestRadioEngineWrapper::tstSetTunerCababilities(uint /*category*/)
-    {
-    FUNC_LOG;
-    TUNER.iCaps.iFrequencyRange = ERsRangeFmEuroAmerica; 
-    TUNER.iCaps.iCapabilities = 
-        TRsTunerCapabilities::ETunerFunctionAvailableInOfflineMode | 
-        TRsTunerCapabilities::ETunerFunctionRds | 
-        TRsTunerCapabilities::ETunerFunctionDualTuner; 
-    }
-
-void TestRadioEngineWrapper::Timeout( TUint aTimerId )
-    {
-    FUNC_LOG;    
-    if ( CSchedulerStopAndStartTimer::ETimerIdCreateMUT == aTimerId )
-        {
-        INFO("ETimerIdCreateMUT elapsed");
-        }
-    else if ( CSchedulerStopAndStartTimer::ETimerIdDeleteMUT == aTimerId )
-        {
-        INFO("ETimerIdDeleteMUT elapsed");
-        }
-    else if ( CSchedulerStopAndStartTimer::ETimerIdRunMUT == aTimerId )
-        {
-        INFO("ETimerIdRunMUT elapsed");
-        }
-    else
-        {
-        INFO("Unknown timer elapsed");        
-        }
-    }
-
-void TestRadioEngineWrapper::CreateMUT()
-    {
-    FUNC_LOG;
-    tstDefineAndAttachRadioServerProperties();
-    TInt err( KErrNone );
-    err = tstCreateCRObjects();
-    QVERIFY2(  KErrNone == err, "Radio CR not created!" ); 
-    TRAP( err, mEngineWrapper = new (ELeave) RadioEngineWrapper( *this ) );
-    RadioEngineUtils::InitializeL();
-    bool retVal( EFalse );
-    retVal = mEngineWrapper->init();
-    QVERIFY2( EFalse != retVal, "mEngineWrapper->init() failed!");
-    mEngineWrapper->addObserver( this );
-    QVERIFY2(  KErrNone == err, "Radio Engine not constructed!" ); 
-    tstSetTunerCababilities();        
-    }
-
-void TestRadioEngineWrapper::DeleteMUT()
-    {
-    FUNC_LOG;
-    mEngineWrapper->removeObserver( this );
-    delete mEngineWrapper;
-    mEngineWrapper = NULL;    
-    }
-
-void TestRadioEngineWrapper::tstSetFrequency( TUint aFrequency )
-    {
-    FUNC_LOG;
-    TUNER.iFrequency = aFrequency;
-    }
-
-TInt TestRadioEngineWrapper::tstGetFrequency()
-    {
-    FUNC_LOG;
-    return TUNER.iFrequency;
-    }
-
-void TestRadioEngineWrapper::tstSetScanningData( TUint aCount, TInt aMinFreq, TInt aFrequencyStepSize )
-    {
-    FUNC_LOG;
-    TUNER.iScanStations.iCount = aCount;
-    TUNER.iScanStations.iMinFreq = aMinFreq;
-    TUNER.iScanStations.iFrequencyStepSize = aFrequencyStepSize;
-    }
-
-
-void TestRadioEngineWrapper::tstDefineAndAttachRadioServerProperties()
-    {
-    FUNC_LOG;
-    QVERIFY2(KErrNone == RProperty::Define(KStub_KRadioServerPropertyCategory, ERadioServPsPlayerState, RProperty::EByteArray,
-                                 KRadioServerReadPolicy, KRadioServerWritePolicy), "Property Define() failed!");
-    QVERIFY2(KErrNone == RProperty::Define(KStub_KRadioServerPropertyCategory, ERadioServPsAntennaStatus, RProperty::EInt,
-                            KRadioServerReadPolicy, KRadioServerWritePolicy), "Property Define() failed!");
-    QVERIFY2(KErrNone == RProperty::Define(KStub_KRadioServerPropertyCategory, ERadioServPsOfflineMode, RProperty::EInt,
-                            KRadioServerReadPolicy, KRadioServerWritePolicy), "Property Define() failed!");
-    QVERIFY2(KErrNone == RProperty::Define(KStub_KRadioServerPropertyCategory, ERadioServPsTransmitterStatus, RProperty::EInt,
-                            KRadioServerReadPolicy, KRadioServerWritePolicy), "Property Define() failed!");
-    QVERIFY2(KErrNone == RProperty::Define(KStub_KRadioServerPropertyCategory, ERadioServPsFrequency, RProperty::EInt,
-                            KRadioServerReadPolicy, KRadioServerWritePolicy), "Property Define() failed!");
-    QVERIFY2(KErrNone == RProperty::Define(KStub_KRadioServerPropertyCategory, ERadioServPsFrequencyRange, RProperty::EInt,
-                            KRadioServerReadPolicy, KRadioServerWritePolicy), "Property Define() failed!");
-    QVERIFY2(KErrNone == RProperty::Define(KStub_KRadioServerPropertyCategory, ERadioServPsForceMonoReception, RProperty::EInt,
-                            KRadioServerReadPolicy, KRadioServerWritePolicy), "Property Define() failed!");
-    QVERIFY2(KErrNone == RProperty::Define(KStub_KRadioServerPropertyCategory, ERadioServPsSquelch, RProperty::EInt,
-                            KRadioServerReadPolicy, KRadioServerWritePolicy), "Property Define() failed!");
-    QVERIFY2(KErrNone == RProperty::Define(KStub_KRadioServerPropertyCategory, ERadioServPsVolume, RProperty::EInt,
-                            KRadioServerReadPolicy, KRadioServerWritePolicy), "Property Define() failed!");
-    QVERIFY2(KErrNone == RProperty::Define(KStub_KRadioServerPropertyCategory, ERadioServPsMuteStatus, RProperty::EInt,
-                            KRadioServerReadPolicy, KRadioServerWritePolicy), "Property Define() failed!");
-    QVERIFY2(KErrNone == RProperty::Define(KStub_KRadioServerPropertyCategory, ERadioServPsBalance, RProperty::EByteArray,
-                            KRadioServerReadPolicy, KRadioServerWritePolicy), "Property Define() failed!");
-    
-    
-    QVERIFY2(KErrNone == mPropertyPlayerState.Attach( KStub_KRadioServerPropertyCategory, ERadioServPsPlayerState ), "Property Attach() failed!");
-    QVERIFY2(KErrNone == mPropertyAntennaStatus.Attach( KStub_KRadioServerPropertyCategory, ERadioServPsAntennaStatus ), "Property Attach() failed!");
-    QVERIFY2(KErrNone == mPropertyOfflineMode.Attach( KStub_KRadioServerPropertyCategory, ERadioServPsOfflineMode ), "Property Attach() failed!");
-    QVERIFY2(KErrNone == mPropertyTransmitterStatus.Attach( KStub_KRadioServerPropertyCategory, ERadioServPsTransmitterStatus ), "Property Attach() failed!");
-    QVERIFY2(KErrNone == mPropertyFrequency.Attach( KStub_KRadioServerPropertyCategory, ERadioServPsFrequency ), "Property Attach() failed!");
-    QVERIFY2(KErrNone == mPropertyFrequencyRange.Attach( KStub_KRadioServerPropertyCategory, ERadioServPsFrequencyRange ), "Property Attach() failed!");
-    QVERIFY2(KErrNone == mPropertyForceMonoReception.Attach( KStub_KRadioServerPropertyCategory, ERadioServPsForceMonoReception ), "Property Attach() failed!");
-    QVERIFY2(KErrNone == mPropertySquelch.Attach( KStub_KRadioServerPropertyCategory, ERadioServPsSquelch ), "Property Attach() failed!");
-    QVERIFY2(KErrNone == mPropertyVolume.Attach( KStub_KRadioServerPropertyCategory, ERadioServPsVolume ), "Property Attach() failed!");
-    QVERIFY2(KErrNone == mPropertyMuteStatus.Attach( KStub_KRadioServerPropertyCategory, ERadioServPsMuteStatus ), "Property Attach() failed!");
-    QVERIFY2(KErrNone == mPropertyBalance.Attach( KStub_KRadioServerPropertyCategory, ERadioServPsBalance ), "Property Attach() failed!");
-    }
-
-TInt TestRadioEngineWrapper::tstCreateCRObjects()
-    {
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TRAP( err, mRadioCR = CRepository::NewL(KStub_KRadioCRUid) );
-    INFO_1( "Returning err = %i", err );
-    return err;
-    }
-
-
--- a/radioapp/radioenginewrapper/tsrc/src/t_schedulerstartandstoptimer.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +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:  Implementation of a timer interface.
-*
-*/
-
-
-
-#include "t_schedulerstartandstoptimer.h"
-#include "trace.h"
-
-
-// ======== LOCAL FUNCTIONS ========
-
-
-// ======== MEMBER FUNCTIONS ========
-
-
-// -----------------------------------------------------------------------------
-// CAccSrvResetInactivityTimeTimer::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CSchedulerStopAndStartTimer* CSchedulerStopAndStartTimer::NewL(
-        MSchedulerStartAndStopTimerObserver& aSchedulerStartAndStopTimerObserver )
-    {
-    FUNC_LOG;
-
-    CSchedulerStopAndStartTimer* self = new ( ELeave ) CSchedulerStopAndStartTimer(
-            aSchedulerStartAndStopTimerObserver );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-
-// Destructor
-CSchedulerStopAndStartTimer::~CSchedulerStopAndStartTimer()
-    {
-    FUNC_LOG;
-    Cancel();
-    }
-
-// -----------------------------------------------------------------------------
-// CSchedulerStopAndStartTimer::StartTimer
-// .
-// -----------------------------------------------------------------------------
-//
-void CSchedulerStopAndStartTimer::StartTimer(
-        TInt aTime,
-        TUint aTimerId  )
-    {
-    FUNC_LOG;
-    INFO_2( "Timer Id: %d, Time: %d", aTimerId, aTime)
-    iTime = aTime;
-    iTimerId = aTimerId;
-
-    if ( ETimerIdRunMUT == iTimerId )
-        {
-        After( ( TTimeIntervalMicroSeconds32 ) iTime );
-        }
-    else
-        {
-        After( ( TTimeIntervalMicroSeconds32 ) 1 );
-        }
-    CActiveScheduler::Start();
-    }
-
-// -----------------------------------------------------------------------------
-// CSchedulerStopAndStartTimer::RunL
-// 
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-void CSchedulerStopAndStartTimer::RunL()
-    {
-    FUNC_LOG;
-    if ( ETimerIdCreateMUT == iTimerId )
-        {
-        iSchedulerStartAndStopTimerObserver.CreateMUT();
-        iTimerId = ETimerIdRunMUT;
-        After( ( TTimeIntervalMicroSeconds32 ) iTime );        
-        }
-    else if ( ETimerIdDeleteMUT == iTimerId )
-        {
-        iSchedulerStartAndStopTimerObserver.DeleteMUT();
-        CActiveScheduler::Stop();
-        }
-    else
-        {
-        CActiveScheduler::Stop();
-        iSchedulerStartAndStopTimerObserver.Timeout( iTimerId );        
-        }
-    }
-
-
-// -----------------------------------------------------------------------------
-// CSchedulerStopAndStartTimer::RunError
-// Returns KErrNone
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CSchedulerStopAndStartTimer::RunError( TInt aError )
-    {
-    FUNC_LOG;
-     // Avoid Panic in CActiveScheduler
-    aError = KErrNone;
-    return aError;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CSchedulerStopAndStartTimer::CSchedulerStopAndStartTimer
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CSchedulerStopAndStartTimer::CSchedulerStopAndStartTimer(
-        MSchedulerStartAndStopTimerObserver& aSchedulerStartAndStopTimerObserver) : 
-    CTimer( CActive::EPriorityStandard ),
-    iSchedulerStartAndStopTimerObserver( aSchedulerStartAndStopTimerObserver )
-    {
-    FUNC_LOG;
-    }
-
-// -----------------------------------------------------------------------------
-// CAccSrvProcessCommandTimer::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CSchedulerStopAndStartTimer::ConstructL()
-    {
-    FUNC_LOG;
-    CTimer::ConstructL();
-    CActiveScheduler* AS = CActiveScheduler::Current();
-    CActiveScheduler::Add( this );
-    }
-
-
-// ======== GLOBAL FUNCTIONS ========
-
--- a/radioapp/radioenginewrapper/tsrc/t_radioenginewrapper.pro	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,51 +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: project file for radioenginewrapper's unit tests
-#
-TEMPLATE = app
-TARGET = t_radioenginewrapper
-symbian: { 
-    TARGET.CAPABILITY = CAP_GENERAL_DLL
-    TARGET.SID = 0x2002EAD8  # Tried  0x101FF976 but failed
-    MMP_RULES += SMPSAFE    
-}
-DEPENDPATH += . \
-    inc \
-    src
-INCLUDEPATH += . \
-    ../../../inc \
-    ../../../common \
-    ../inc \
-    ../commoninc \
-    ../../../../inc \
-    /sf/app/radio/radioengine/utils/Stub/inc \
-    /sf/app/radio/radioengine/utils/api \
-    /sf/app/radio/radioengine/utils/inc \
-    /sf/app/radio/radioengine/settings/api \
-    /sf/mw/mmmw/inc \
-    /sf/mw/mmmw/mmserv/inc \
-    /sf/mw/mmmw/mmserv/radioutility/inc \
-    /sf/mw/mmmw/mmserv/radioutility/radio_utility/src \
-    /sf/mw/mmmw/mmserv/radioutility/radioserver/inc
-CONFIG += qtestlib
-symbian:LIBS += -lfmradioenginewrapper_stub
-symbian:LIBS += -lfmradioengineutils_stub
-symbian:LIBS += -lRadioSession_Stub
-symbian:LIBS += -leuser
-symbian:LIBS += -lcentralrepository
-symbian:LIBS += -lflogger
-HEADERS += inc/t_radioenginewrapper.h
-HEADERS += inc/t_schedulerstartandstoptimer.h
-SOURCES += src/t_radioenginewrapper.cpp
-SOURCES += src/t_schedulerstartandstoptimer.cpp
\ No newline at end of file
--- a/radioapp/radiopresetstorage/inc/radiopresetstorage.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef RADIOPRESETSTORAGE_H_
-#define RADIOPRESETSTORAGE_H_
-
-// System includes
-#include <QtGlobal>
-#include <QList>
-#include <QScopedPointer>
-
-#include "radiopresetstorageexport.h"
-
-// Forward declarations
-class RadioStationIf;
-class RadioPresetStoragePrivate;
-
-class STORAGE_DLL_EXPORT RadioPresetStorage
-{
-    Q_DECLARE_PRIVATE_D( d_ptr.data(), RadioPresetStorage )
-    Q_DISABLE_COPY( RadioPresetStorage )
-
-public:
-
-    RadioPresetStorage();
-    ~RadioPresetStorage();
-
-    int maxNumberOfPresets() const;
-    int presetCount() const;
-    int firstPreset() const;
-    int nextPreset( int fromIndex ) const;
-    bool deletePreset( int presetIndex );
-    bool savePreset( const RadioStationIf& station );
-    bool readPreset( int index, RadioStationIf& station );
-    void readFrequencies( QList<uint>& frequencyList );
-
-private: // data
-
-    /**
-     * Unmodifiable pointer to the private implementation
-     */
-    const QScopedPointer<RadioPresetStoragePrivate> d_ptr;
-
-};
-
-#endif // RADIOPRESETSTORAGE_H_
--- a/radioapp/radiopresetstorage/inc/radiopresetstorage_p.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +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 RADIOPRESETSTORAGE_P_H_
-#define RADIOPRESETSTORAGE_P_H_
-
-// System includes
-#include <QScopedPointer>
-
-// User includes
-
-// Forward declarations
-class CPresetUtility;
-
-class RadioPresetStoragePrivate
-{
-public:
-
-    RadioPresetStoragePrivate();
-    ~RadioPresetStoragePrivate();
-
-    bool init();
-
-public: // data
-
-    QScopedPointer<CPresetUtility>  mPresetUtility;
-
-};
-
-#endif // RADIOPRESETSTORAGE_P_H_
--- a/radioapp/radiopresetstorage/inc/radiopresetstorage_win32_p.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +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 RADIOPRESETSTORAGE_P_H_
-#define RADIOPRESETSTORAGE_P_H_
-
-// User includes
-#include <QScopedPointer>
-#include <QByteArray>
-
-// Forward declarations
-class QSettings;
-class QDataStream;
-
-class Preset
-{
-public:
-
-    Preset();
-    ~Preset();
-
-    void externalize( QDataStream& outStream );
-    void internalize( QDataStream& inStream );
-
-    uint        mFrequency;
-    QString     mName;
-    bool        mRenamedByUser;
-    int         mGenre;
-    QString     mUrl;
-    int         mPiCode;
-    bool        mFavorite;
-    bool        mLocalStation;
-
-};
-
-class RadioPresetStoragePrivate
-{
-public:
-
-    RadioPresetStoragePrivate();
-    ~RadioPresetStoragePrivate();
-
-    bool init();
-
-    void readBookKeeping();
-    void saveBookKeeping();
-
-    void removeIndex( int index );
-    void addIndex( int index );
-
-    QScopedPointer<QSettings>   mSettings;
-    QByteArray                  mBookKeeping;
-
-};
-
-#endif // RADIOPRESETSTORAGE_P_H_
--- a/radioapp/radiopresetstorage/inc/radiopresetstorageexport.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef RADIO_PRESET_STORAGE_EXPORT_H_
-#define RADIO_PRESET_STORAGE_EXPORT_H_
-
-// System includes
-#include <QtGlobal>
-
-#ifdef BUILD_PRESET_STORAGE_DLL
-    #define STORAGE_DLL_EXPORT Q_DECL_EXPORT
-#else
-    #define STORAGE_DLL_EXPORT Q_DECL_IMPORT
-#endif
-
-#endif // RADIO_PRESET_STORAGE_EXPORT_H_
--- a/radioapp/radiopresetstorage/inc/radiostationif.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +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 RADIOSTATIONIF_H_
-#define RADIOSTATIONIF_H_
-
-// System includes
-#include <QtGlobal>
-
-class RadioStationIf
-{
-public:
-
-    virtual int presetIndex() const = 0;
-    virtual void setPresetIndex( int presetIndex ) = 0;
-
-    virtual uint frequency() const = 0;
-    virtual void setFrequency( uint frequency ) = 0;
-
-    virtual QString name() const = 0;
-    virtual void setName( QString name ) = 0;
-
-    virtual bool isRenamedByUser() const = 0;
-    virtual void setRenamedByUser( bool renamed ) = 0;
-
-    virtual int genre() const = 0;
-    virtual void setGenre( int genre ) = 0;
-
-    virtual QString url() const = 0;
-    virtual void setUrl( QString url ) = 0;
-
-    virtual int piCode() const = 0;
-    virtual void setPiCode( int piCode ) = 0;
-
-    virtual bool isFavorite() const = 0;
-    virtual void setFavorite( bool favorite ) = 0;
-
-    virtual bool isLocalStation() const = 0;
-    virtual void setLocalStation( bool localStation ) = 0;
-
-    virtual bool hasStationSentRds() const = 0;
-    virtual void setStationHasSentRds( bool hasSentRds ) = 0;
-
-};
-
-
-#endif // RADIOSTATIONIF_H_
--- a/radioapp/radiopresetstorage/radiopresetstorage.pro	Tue Aug 31 15:15:02 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:
-#
-
-TMP_DIR_NAME = presetstorage
-include(../buildflags.pri)
-
-TEMPLATE    = lib
-TARGET      = fmradiopresetstorage
-CONFIG      += dll
-DEFINES     += BUILD_PRESET_STORAGE_DLL
-
-symbian:TARGET.UID3 = 0x2002EAD9
-
-INCLUDEPATH += inc
-INCLUDEPATH += ../../common
-
-symbian:LIBS += -lpresetutility
-
-DEPENDPATH += $$INCLUDEPATH src
-
-# Input
-HEADERS     += radiopresetstorage.h
-HEADERS     += radiostationif.h
-HEADERS     += radiopresetstorageexport.h
-
-# Symbian specific stuff
-symbian: {
-    INTERNAL_HEADERS += radiopresetstorage_p.h
-    SOURCES += radiopresetstorage.cpp
-}
-
-# Win32 specific stuff
-win32: {
-    HEADERS += radiopresetstorage_win32_p.h
-    SOURCES += radiopresetstorage_win32.cpp
-}
--- a/radioapp/radiopresetstorage/src/radiopresetstorage.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,185 +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:
-*
-*/
-
-// System includes
-#include <presetutility.h>
-#include <preset.h>
-#include <QString>
-
-// User includes
-#include "radiopresetstorage.h"
-#include "radiopresetstorage_p.h"
-#include "radiostationif.h"
-
-/*!
- * Converts a symbian descriptor to Qt string
- */
-static QString convertString( const TDesC& aDesc )
-{
-    return QString::fromUtf16( aDesc.Ptr(), aDesc.Length() );
-}
-
-/*!
- *
- */
-RadioPresetStorage::RadioPresetStorage() :
-    d_ptr( new RadioPresetStoragePrivate() )
-{
-    Q_D( RadioPresetStorage );
-    d->init();
-}
-
-/*!
- *
- */
-RadioPresetStorage::~RadioPresetStorage()
-{
-}
-
-/*!
- *
- */
-int RadioPresetStorage::maxNumberOfPresets() const
-{
-    Q_D( const RadioPresetStorage );
-    return d->mPresetUtility->MaxNumberOfPresets();
-}
-
-/*!
- *
- */
-int RadioPresetStorage::presetCount() const
-{
-    Q_D( const RadioPresetStorage );
-    return d->mPresetUtility->PresetCount();
-}
-
-/*!
- *
- */
-int RadioPresetStorage::firstPreset() const
-{
-    Q_D( const RadioPresetStorage );
-    return d->mPresetUtility->FirstPreset();
-}
-
-/*!
- *
- */
-int RadioPresetStorage::nextPreset( int fromIndex ) const
-{
-    Q_D( const RadioPresetStorage );
-    return d->mPresetUtility->NextPreset( fromIndex );
-}
-
-/*!
- *
- */
-bool RadioPresetStorage::deletePreset( int presetIndex )
-{
-    Q_D( RadioPresetStorage );
-    return d->mPresetUtility->DeletePreset( presetIndex ) == KErrNone;
-}
-
-/*!
- *
- */
-bool RadioPresetStorage::savePreset( const RadioStationIf& station )
-{
-    Q_D( RadioPresetStorage );
-    TPreset preset;
-    preset.SetFrequency( station.frequency() );
-    TPresetName name( station.name().left( KPresetNameLength ).utf16() );
-    preset.SetName( name );
-    preset.SetRenamedByUser( station.isRenamedByUser() );
-    preset.SetGenre( station.genre() );
-    TRadioUrl url( station.url().left( KUrlMaxLength ).utf16() );
-    preset.SetUrl( url );
-    preset.SetPiCode( station.piCode() );
-    preset.SetFavorite( station.isFavorite() );
-    preset.SetLocalStation( station.isLocalStation() );
-
-    TRAPD( err, d->mPresetUtility->SavePresetL( preset, station.presetIndex() ) );
-    return err == KErrNone;
-}
-
-/*!
- *
- */
-bool RadioPresetStorage::readPreset( int index, RadioStationIf& station )
-{
-    Q_D( RadioPresetStorage );
-    TPreset preset;
-    TRAPD( err, d->mPresetUtility->ReadPresetL( index, preset ) );
-    if ( !err ) {
-
-        station.setPresetIndex( index );
-        station.setFrequency( preset.Frequency() );
-        station.setName( convertString( preset.Name() ) );
-        station.setRenamedByUser( preset.RenamedByUser() );
-        station.setGenre( preset.Genre() );
-        station.setUrl( convertString( preset.Url() ) );
-        station.setPiCode( preset.PiCode() );
-        station.setFavorite( preset.Favorite() );
-        station.setLocalStation( preset.LocalStation() );
-
-        return true;
-    }
-    return false;
-}
-
-/*!
- *
- */
-void RadioPresetStorage::readFrequencies( QList<uint>& frequencyList )
-{
-    Q_D( RadioPresetStorage );
-
-    TPreset preset;
-    int index = firstPreset();
-    while ( index >= 0 ) {
-        TRAPD( err, d->mPresetUtility->ReadPresetL( index, preset ) );
-        if ( !err ) {
-            frequencyList.append( preset.Frequency() );
-        }
-
-        index = nextPreset( index );
-    }
-}
-
-/*!
- *
- */
-RadioPresetStoragePrivate::RadioPresetStoragePrivate()
-{
-}
-
-/*!
- *
- */
-RadioPresetStoragePrivate::~RadioPresetStoragePrivate()
-{
-}
-
-/*!
- *
- */
-bool RadioPresetStoragePrivate::init()
-{
-    TRAPD( err, mPresetUtility.reset( CPresetUtility::NewL() ) );
-    return err == KErrNone;
-}
--- a/radioapp/radiopresetstorage/src/radiopresetstorage_win32.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,293 +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:
-*
-*/
-
-// System includes
-#include <QString>
-#include <QSettings>
-#include <QDataStream>
-
-// User includes
-#include "radiopresetstorage.h"
-#include "radiopresetstorage_win32_p.h"
-#include "radiostationif.h"
-
-const QString KKeyBookKeeping = "BookKeeping";
-const QString KKeyBase = "Preset-";
-
-/*!
- *
- */
-static QString makeKey( int index ) {
-    QString key = KKeyBase;
-    key.append( index );
-    return key;
-}
-
-/*!
- *
- */
-Preset::Preset() :
-    mFrequency( 0 ),
-    mRenamedByUser( false ),
-    mGenre( -1 ),
-    mPiCode( -1 ),
-    mFavorite( false ),
-    mLocalStation( false )
-{
-}
-
-/*!
- *
- */
-Preset::~Preset()
-{
-}
-
-/*!
- *
- */
-void Preset::externalize( QDataStream& outStream )
-{
-    outStream << mFrequency;
-    outStream << mName;
-    outStream << mRenamedByUser;
-    outStream << mGenre;
-    outStream << mUrl;
-    outStream << mPiCode;
-    outStream << mFavorite;
-    outStream << mLocalStation;
-}
-
-/*!
- *
- */
-void Preset::internalize( QDataStream& inStream )
-{
-    inStream >> mFrequency;
-    inStream >> mName;
-    inStream >> mRenamedByUser;
-    inStream >> mGenre;
-    inStream >> mUrl;
-    inStream >> mPiCode;
-    inStream >> mFavorite;
-    inStream >> mLocalStation;
-}
-
-/*!
- *
- */
-RadioPresetStorage::RadioPresetStorage() :
-    d_ptr( new RadioPresetStoragePrivate() )
-{
-    Q_D( RadioPresetStorage );
-    d->init();
-}
-
-/*!
- *
- */
-RadioPresetStorage::~RadioPresetStorage()
-{
-}
-
-/*!
- *
- */
-int RadioPresetStorage::maxNumberOfPresets() const
-{
-    return 100;
-}
-
-/*!
- *
- */
-int RadioPresetStorage::presetCount() const
-{
-    Q_D( const RadioPresetStorage );
-    return d->mBookKeeping.count();
-}
-
-/*!
- *
- */
-int RadioPresetStorage::firstPreset() const
-{
-    Q_D( const RadioPresetStorage );
-    if ( d->mBookKeeping.count() > 0 ) {
-        return d->mBookKeeping.at( 0 );
-    }
-    return -1;
-}
-
-/*!
- *
- */
-int RadioPresetStorage::nextPreset( int fromIndex ) const
-{
-    Q_D( const RadioPresetStorage );
-    int index = d->mBookKeeping.indexOf( fromIndex ) + 1;
-    if ( index > 0 && index < d->mBookKeeping.count() ) {
-        return d->mBookKeeping.at( index );
-    }
-    return -1;
-}
-
-/*!
- *
- */
-bool RadioPresetStorage::deletePreset( int presetIndex )
-{
-    Q_D( RadioPresetStorage );
-    if ( presetIndex > -1 ) {
-        int index = d->mBookKeeping.indexOf( presetIndex );
-        if ( index > -1 ) {
-            d->mBookKeeping.remove( index, 1 );
-            d->mSettings->remove( makeKey( presetIndex ) );
-            d->removeIndex( presetIndex );
-            return true;
-        }
-    } else if ( presetIndex == -1 ) {
-        for ( int i = d->mBookKeeping.count() - 1; i >= 0; --i ) {
-            d->mSettings->remove( makeKey( d->mBookKeeping.at( i ) ) );
-        }
-        d->mBookKeeping.clear();
-        return true;
-    }
-    return false;
-}
-
-/*!
- *
- */
-bool RadioPresetStorage::savePreset( const RadioStationIf& station )
-{
-    Preset preset;
-    preset.mFrequency = station.frequency();
-    preset.mName = station.name();
-    preset.mRenamedByUser = station.isRenamedByUser()   ;
-    preset.mGenre = station.genre();
-    preset.mUrl = station.url();
-    preset.mPiCode = station.piCode();
-    preset.mFavorite = station.isFavorite();
-    preset.mLocalStation = station.isLocalStation();
-
-    QByteArray array;
-    QDataStream outStream( &array, QIODevice::WriteOnly );
-    preset.externalize( outStream );
-
-    Q_D( RadioPresetStorage );
-    d->mSettings->setValue( makeKey( station.presetIndex() ), array );
-
-    d->addIndex( station.presetIndex() );
-
-    return true;
-}
-
-/*!
- *
- */
-bool RadioPresetStorage::readPreset( int index, RadioStationIf& station )
-{
-    Q_D( RadioPresetStorage );
-    QByteArray array = d->mSettings->value( makeKey( index ) ).toByteArray();
-    if ( !array.isEmpty() ) {
-        Preset preset;
-
-        QDataStream inStream( array );
-        preset.internalize( inStream );
-
-        station.setPresetIndex( index );
-        station.setFrequency( preset.mFrequency );
-        station.setName( preset.mName );
-        station.setRenamedByUser( preset.mRenamedByUser );
-        station.setGenre( preset.mGenre );
-        station.setUrl( preset.mUrl );
-        station.setPiCode( preset.mPiCode );
-        station.setFavorite( preset.mFavorite );
-        station.setLocalStation( preset.mLocalStation );
-
-        return true;
-    }
-    return false;
-}
-
-/*!
- *
- */
-RadioPresetStoragePrivate::RadioPresetStoragePrivate()
-{
-}
-
-/*!
- *
- */
-RadioPresetStoragePrivate::~RadioPresetStoragePrivate()
-{
-}
-
-/*!
- *
- */
-bool RadioPresetStoragePrivate::init()
-{
-    mSettings.reset( new QSettings( "Nokia", "QtFmRadio" ) );
-    readBookKeeping();
-    return true;
-}
-
-/*!
- *
- */
-void RadioPresetStoragePrivate::readBookKeeping()
-{
-    QVariant value = mSettings->value( KKeyBookKeeping );
-    if ( value.isValid() ) {
-        mBookKeeping = value.toByteArray();
-    }
-}
-
-/*!
- *
- */
-void RadioPresetStoragePrivate::saveBookKeeping()
-{
-    mSettings->setValue( KKeyBookKeeping, mBookKeeping );
-}
-
-/*!
- *
- */
-void RadioPresetStoragePrivate::removeIndex( int index )
-{
-    int pos = mBookKeeping.indexOf( index );
-    if ( pos > -1 ) {
-        mBookKeeping.remove( pos, 1 );
-        saveBookKeeping();
-    }
-}
-
-/*!
- *
- */
-void RadioPresetStoragePrivate::addIndex( int index )
-{
-    int pos = mBookKeeping.indexOf( index );
-    if ( pos == -1 ) {
-        mBookKeeping.append( index );
-        saveBookKeeping();
-    }
-}
--- a/radioapp/radiopresetstorage/tsrc/inc/t_radiopresetstorage.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +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 T_RADIOPRESETSTORAGE_H_
-#define T_RADIOPRESETSTORAGE_H_
-
-
-// INCLUDES
-#include <QtTest/QtTest>
-#include "radiopresetstorage.h"
-
-
-class RadioPresetStorage;
-
-class TestRadioPresetStorage : public QObject
-{
-    Q_OBJECT    
-    
-public:
-
-    TestRadioPresetStorage();
-    ~TestRadioPresetStorage();    
-
-public slots:
-    
-private slots:
-    // test framework called slots 
-    void initTestCase();
-    void init();
-    void cleanup();
-    void cleanupTestCase();
-    void testSavePreset();
-    void testReadPreset();
-    void testDeletePreset();
-    void testStessTest();
-    
-private:
-    
-private:
-	QScopedPointer<RadioPresetStorage>  mPresetStorage;
-};
-
-#endif /* T_RADIOPRESETSTORAGE_H_ */
--- a/radioapp/radiopresetstorage/tsrc/src/t_radiopresetstorage.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,225 +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 "t_radiopresetstorage.h"
-#include "radiopresetstorage.h"
-#include "radiostation.h"
-#include "radiostation_p.h"
-
-// Constants
-const uint KTestFrequency1 = 89000000;
-const uint KTestFrequency2 = 89500000;
-const uint KTestFrequency3 = 90000000;
-const uint KTestFrequency4 = 90500000;
-const uint KMaxNumberOfPresets = 100;
-const uint KInvalidPresetIndex = -2;
-const uint KFirstPresetIndex = 0;
-const uint KSecondPresetIndex = 1;
-const uint KThirdPresetIndex = 2;
-const uint KFrequencyStep = 100000;
-
-/*!
- *
- */
-int main(int /* argc*/, char *argv[])
-{
-    TestRadioPresetStorage tv;
-
-    char *pass[3];
-    pass[0] = argv[0];
-    pass[1] = "-o";
-    pass[2] = "c:\\data\\testradiopresetstorage.txt";
-
-    int res = QTest::qExec(&tv, 3, pass);
-
-    return res;
-}
-
-
-TestRadioPresetStorage::TestRadioPresetStorage()
-{
-}
-
-
-/*!
- * Destructor
- */
-TestRadioPresetStorage::~TestRadioPresetStorage()
-{
-}
-
-/*!
- * called before each testfunction is executed
- */
-void TestRadioPresetStorage::init()
-{
-}
-
-/*!
- * called after every testfunction
- */
-void TestRadioPresetStorage::cleanup()
-{
-}
-
-/*!
- * called before the first testfunction is executed
- */
-void TestRadioPresetStorage::initTestCase()
-{
-    mPresetStorage.reset( new RadioPresetStorage() );
-    // this is the range used in this test module
-    for(int i = 0; i <= mPresetStorage->maxNumberOfPresets(); i++)
-    {
-        mPresetStorage->deletePreset( i );        
-    }    
-    QVERIFY2(( mPresetStorage->presetCount() == 0 ), "API:RadioPresetStorage initTestCase 1");    
-    // TODO: replace the local constant with the constand defined in preset utility header  
-    QVERIFY2(( mPresetStorage->maxNumberOfPresets() == KMaxNumberOfPresets ), "API:RadioPresetStorage initTestCase 2");
-}
-
-/*!
- * called after the last testfunction was executed
- */
-void TestRadioPresetStorage::cleanupTestCase()
-{
-	
-}
-
-/*!
- * Test saving preset 
- */
-void TestRadioPresetStorage::testSavePreset()
-{
-  int test = mPresetStorage->maxNumberOfPresets();
-  int initialPresetCount( 0 );
-  //int initialPresetindex( KFirstPresetIndex );  
-  RadioStation station;  
-  station.setFrequency( KTestFrequency1 );
-  station.setPresetIndex( KFirstPresetIndex );
-  mPresetStorage->savePreset( *station.data_ptr() );
-  QVERIFY2(( mPresetStorage->presetCount() == initialPresetCount + 1 ), "API:RadioPresetStorage testSavePreset 1");
-  QVERIFY2(( mPresetStorage->nextPreset( KFirstPresetIndex ) == 0 ), "API:RadioPresetStorage testSavePreset 2");
-  
-  station.setFrequency( KTestFrequency2 );
-  station.setPresetIndex( KSecondPresetIndex );
-  mPresetStorage->savePreset( *station.data_ptr() );
-  QVERIFY2(( mPresetStorage->presetCount() == initialPresetCount + 2 ), "API:RadioPresetStorage testSavePreset 3");
-  QVERIFY2(( mPresetStorage->nextPreset( KFirstPresetIndex ) == KSecondPresetIndex ), "API:RadioPresetStorage testSavePreset 4");
-  
-  // check that saving preset fails if preset index and frequency are allready in use
-  station.setFrequency( KTestFrequency2 );
-  station.setPresetIndex( KSecondPresetIndex );
-  mPresetStorage->savePreset( *station.data_ptr() );
-  QVERIFY2(( mPresetStorage->presetCount() == initialPresetCount + 2 ), "API:RadioPresetStorage testSavePreset 5");
-  
-  // check that saving preset success when new preset index and frequency are not in use
-  station.setFrequency( KTestFrequency3 );
-  station.setPresetIndex( KThirdPresetIndex );  
-  mPresetStorage->savePreset( *station.data_ptr() );
-  QVERIFY2(( mPresetStorage->presetCount() == initialPresetCount + 3 ), "API:RadioPresetStorage testSavePreset 6");
-  
-  // check that saving with invalid preset index fails
-  station.setFrequency( KTestFrequency4 );
-  station.setPresetIndex( KInvalidPresetIndex );  
-  mPresetStorage->savePreset( *station.data_ptr() );
-  QVERIFY2(( mPresetStorage->presetCount() == initialPresetCount + 3 ), "API:RadioPresetStorage testSavePreset 6");
-}
-
-/*!
- * Test reading preset 
- */
-void TestRadioPresetStorage::testReadPreset()
-{
-  RadioStation station;
-  RadioStationIf* preset = static_cast<RadioStationIf*>( station.data_ptr() );
-  mPresetStorage->readPreset( KFirstPresetIndex, *preset );  
-  QVERIFY2(( preset->frequency() == KTestFrequency1 ), "API:RadioPresetStorage testReadPreset 1");
-  
-  RadioStation station1;
-  RadioStationIf* preset1 = static_cast<RadioStationIf*>( station1.data_ptr() );
-  mPresetStorage->readPreset( KSecondPresetIndex, *preset1 );
-  QVERIFY2(( preset->frequency() == KTestFrequency2 ), "API:RadioPresetStorage testReadPreset 2");  
-  
-  RadioStation station2;
-  RadioStationIf* preset2 = static_cast<RadioStationIf*>( station2.data_ptr() );
-  mPresetStorage->readPreset( KThirdPresetIndex, *preset2 );
-  QVERIFY2(( preset->frequency() == KTestFrequency3 ), "API:RadioPresetStorage testReadPreset 3");
-  
-  RadioStation station3;
-  RadioStationIf* preset3 = static_cast<RadioStationIf*>( station3.data_ptr() );
-  // test the value returned with invalid preset index
-  mPresetStorage->readPreset( KThirdPresetIndex + 1, *preset3 );
-  // TODO: change the value to KErrNotFound when preset utility update done
-  QVERIFY2(( preset->frequency() == 87500000 ), "API:RadioPresetStorage testReadPreset 4");
-}
-
-/*!
- * Test deleting preset
- */
-void TestRadioPresetStorage::testDeletePreset()
-{   
-    int initialPresetCount( mPresetStorage->presetCount() );
-    
-    QVERIFY2(( mPresetStorage->firstPreset() == KFirstPresetIndex ), "API:RadioPresetStorage testDeletePreset 1");
-    QVERIFY2(( mPresetStorage->nextPreset( KFirstPresetIndex ) == KSecondPresetIndex ), "API:RadioPresetStorage testDeletePreset 2");
-    mPresetStorage->deletePreset( KSecondPresetIndex );
-    QVERIFY2(( mPresetStorage->nextPreset( KFirstPresetIndex ) == KThirdPresetIndex ), "API:RadioPresetStorage testDeletePreset 3");
-    QVERIFY2(( mPresetStorage->presetCount() == (initialPresetCount - 1)), "API:RadioPresetStorage testDeletePreset 4");       
-    
-    RadioStation station;
-    RadioStationIf* preset = static_cast<RadioStationIf*>( station.data_ptr() );
-    mPresetStorage->readPreset( KSecondPresetIndex, *preset );
-    // TODO: change the value to KErrNotFound when preset utility update done
-    QVERIFY2(( preset->frequency() == 87500000 ), "API:RadioPresetStorage testDeletePreset 5");
-    
-    mPresetStorage->deletePreset( KFirstPresetIndex );
-    QVERIFY2(( mPresetStorage->firstPreset() == KThirdPresetIndex ), "API:RadioPresetStorage testDeletePreset 6");
-    mPresetStorage->deletePreset( KThirdPresetIndex );
-    QVERIFY2(( mPresetStorage->presetCount() == 0), "API:RadioPresetStorage testDeletePreset 7");
-}
-  
-/*!
- * Test filling preset storage and handling boundary values
- */
-void TestRadioPresetStorage::testStessTest()
-{
-    for(int i = 0; i < mPresetStorage->maxNumberOfPresets(); i++)
-    {
-        RadioStation station;
-        station.setFrequency( 87500000 + i*KFrequencyStep );
-        station.setPresetIndex( i );  
-        mPresetStorage->savePreset( *station.data_ptr() );
-    }
-    QVERIFY2(( mPresetStorage->presetCount() == mPresetStorage->maxNumberOfPresets()), "API:RadioPresetStorage testStessTest 1");
-    int test = mPresetStorage->presetCount();
-    RadioStation station;
-    station.setFrequency( 87500000 + mPresetStorage->maxNumberOfPresets()*KFrequencyStep + KFrequencyStep);
-    station.setPresetIndex( mPresetStorage->maxNumberOfPresets() );  
-    mPresetStorage->savePreset( *station.data_ptr() );
-    int r = mPresetStorage->presetCount();
-    // preset count must not increase
-    QVERIFY2(( mPresetStorage->presetCount() == mPresetStorage->maxNumberOfPresets()), "API:RadioPresetStorage testStessTest 2");
-    
-    for(int i = 0; i <= mPresetStorage->maxNumberOfPresets(); i++)
-    {
-        mPresetStorage->deletePreset( i );        
-    }  
-
-    // test deleting with invalid preset index
-    mPresetStorage->deletePreset( KInvalidPresetIndex );
-    QVERIFY2(( mPresetStorage->presetCount() == 0), "API:RadioPresetStorage testStessTest 3");
-}
--- a/radioapp/radiopresetstorage/tsrc/t_radiopresetstorage.pro	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +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:
-#
-
-TEMPLATE = app
-TARGET = t_radiopresetstorage
-
-symbian: {
-    TARGET.CAPABILITY = CAP_GENERAL_DLL
-    TARGET.SID = 0x101FF976 # Old visual radio uid
-    MMP_RULES += SMPSAFE
-}
-
-DEPENDPATH += . \
-    inc \
-    src
-INCLUDEPATH += . \
-    /epoc32/include/domain \
-    /epoc32/include/domain/middleware \
-    /epoc32/include/domain/applications \
-    /epoc32/include/osextensions \
-    /epoc32/include/middleware \
-    /epoc32/include/osextensions/stdapis/stlport \
-    stub/inc \
-    ../../../inc \
-    ../inc \
-    ../../commoninc \
-    ../../radioenginewrapper/inc \
-    ../../radiopresetstorage/inc \
-    ../../radiouiengine/inc \
-    ../../../../inc
-
-CONFIG += qtestlib
-
-symbian:LIBS += -lradiouiengine
-symbian:LIBS += -lradioenginewrapper
-symbian:LIBS += -lradiopresetstorage
-
-
-HEADERS += inc/t_radiopresetstorage.h
-SOURCES += src/t_radiopresetstorage.cpp
--- a/radioapp/radiouiengine/inc/radiocontrolservice.h	Tue Aug 31 15:15:02 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 RADIOCONTROLSERVICE_H
-#define RADIOCONTROLSERVICE_H
-
-// System includes
-#include <xqserviceprovider.h>
-
-// User includes
-
-// Forward declarations
-class RadioUiEngine;
-
-class RadioControlService : public XQServiceProvider
-{
-    Q_OBJECT
-
-public:
-
-    RadioControlService( RadioUiEngine& engine );
-    virtual ~RadioControlService();
-
-
-public slots:
-
-    void command( int commandId );
-
-private: // data
-
-    RadioUiEngine&  mUiEngine;
-
-};
-
-#endif // RADIOCONTROLSERVICE_H
--- a/radioapp/radiouiengine/inc/radiogenrelocalizer.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,140 +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: Small helper utility to localize radio genres
-*
-*/
-
-#ifndef RADIOGENRELOCALIZER_H
-#define RADIOGENRELOCALIZER_H
-
-#include "radio_global.h"
-
-// Constants
-
-namespace RadioGenreLocalizer
-{
-
-    struct GenreMap
-    {
-        int mGenreCode;
-        const char* mInCarousel;
-        const char* mInStationsList;
-        const char* mInHomeScreen;
-    };
-
-    static QString genreToString( RadioRegion::Region region, int genre, GenreTarget::Target target );
-}
-
-// Convenience macros to help in the construction of the localization tables
-#define BEGIN_GENRE_MAP(name) const RadioGenreLocalizer::GenreMap name[] = {
-#define EUROPEAN_GENRE(code, inCarousel, inStationsList, inHomescreen ) { GenreEurope::code, inCarousel, inStationsList, inHomescreen }
-#define AMERICAN_GENRE(code, inCarousel, inStationsList, inHomescreen ) { GenreAmerica::code, inCarousel, inStationsList, inHomescreen }
-#define END_GENRE_MAP(name) }; const int name ## Count = sizeof ( name ) / sizeof ( name[0] );
-
-BEGIN_GENRE_MAP( EuropeanGenres )
-                    // Genre code           // Text in Carousel                     // Text in Stations list                            // Text in Homescreen widget
-    EUROPEAN_GENRE( RdsNone,                "",                                     "",                                                 "" ),
-    EUROPEAN_GENRE( RdsNews,                "txt_rad_info_news",                    "txt_rad_dblist_l1_mhz_val_news",                   "txt_fmradiohswidget_rad_info_news_hs" ),
-    EUROPEAN_GENRE( RdsCurrentAffairs,      "txt_rad_info_current_affairs",         "txt_rad_dblist_l1_mhz_val_current_affairs",        "txt_fmradiohswidget_rad_info_current_affairs_hs" ),
-    EUROPEAN_GENRE( RdsInformation,         "txt_rad_info_information",             "txt_rad_dblist_l1_mhz_val_information",            "txt_fmradiohswidget_rad_info_information_hs" ),
-    EUROPEAN_GENRE( RdsSport,               "txt_rad_info_sport",                   "txt_rad_dblist_l1_mhz_val_sport",                  "txt_fmradiohswidget_rad_info_sport_hs" ),
-    EUROPEAN_GENRE( RdsEducation,           "txt_rad_info_education",               "txt_rad_dblist_l1_mhz_val_education",              "txt_fmradiohswidget_rad_info_education_hs" ),
-    EUROPEAN_GENRE( RdsDrama,               "txt_rad_info_drama",                   "txt_rad_dblist_l1_mhz_val_drama",                  "txt_fmradiohswidget_rad_info_drama_hs" ),
-    EUROPEAN_GENRE( RdsCulture,             "txt_rad_info_culture",                 "txt_rad_dblist_l1_mhz_val_culture",                "txt_fmradiohswidget_rad_info_culture_hs" ),
-    EUROPEAN_GENRE( RdsScience,             "txt_rad_info_science",                 "txt_rad_dblist_l1_mhz_val_science",                "txt_fmradiohswidget_rad_info_science_hs" ),
-    EUROPEAN_GENRE( RdsVariedSpeech,        "txt_rad_info_varied",                  "txt_rad_dblist_l1_mhz_val_varied",                 "txt_fmradiohswidget_rad_info_varied_hs" ),
-    EUROPEAN_GENRE( RdsPopMusic,            "txt_rad_info_pop_music",               "txt_rad_dblist_l1_mhz_val_pop_music",              "txt_fmradiohswidget_rad_info_pop_music_hs" ),
-    EUROPEAN_GENRE( RdsRockMusic,           "txt_rad_info_rock_music",              "txt_rad_dblist_l1_mhz_val_rock_music",             "txt_fmradiohswidget_rad_info_rock_music_hs" ),
-    EUROPEAN_GENRE( RdsEasyListening,       "txt_rad_info_easy_listening",          "txt_rad_dblist_l1_mhz_val_easy_listening",         "txt_fmradiohswidget_rad_info_easy_listening_hs" ),
-    EUROPEAN_GENRE( RdsLightClassical,      "txt_rad_info_light_classical",         "txt_rad_dblist_l1_mhz_val_light_classical",        "txt_fmradiohswidget_rad_info_light_classical_hs" ),
-    EUROPEAN_GENRE( RdsSeriousClassical,    "txt_rad_info_serious_classical",       "txt_rad_dblist_l1_mhz_val_serious_classical",      "txt_fmradiohswidget_rad_info_serious_classical_hs" ),
-    EUROPEAN_GENRE( RdsOtherMusic,          "txt_rad_info_other_music",             "txt_rad_dblist_l1_mhz_val_other_music",            "txt_fmradiohswidget_rad_info_other_music_hs" ),
-    EUROPEAN_GENRE( RdsWeather,             "txt_rad_info_weather",                 "txt_rad_dblist_l1_mhz_val_weather",                "txt_fmradiohswidget_rad_info_weather_hs" ),
-    EUROPEAN_GENRE( RdsFinance,             "txt_rad_info_finance",                 "txt_rad_dblist_l1_mhz_val_finance",                "txt_fmradiohswidget_rad_info_finance_hs" ),
-    EUROPEAN_GENRE( RdsChildrensProgrammes, "txt_rad_info_childrens_programmes",    "txt_rad_dblist_l1_mhz_val_childrens_programmes",   "txt_fmradiohswidget_rad_info_childrens_programmes_hs" ),
-    EUROPEAN_GENRE( RdsSocialAffairs,       "txt_rad_info_social_affairs",          "txt_rad_dblist_l1_mhz_val_social_affairs",         "txt_fmradiohswidget_rad_info_social_affairs_hs" ),
-    EUROPEAN_GENRE( RdsReligion,            "txt_rad_info_religion",                "txt_rad_dblist_l1_mhz_val_religion",               "txt_fmradiohswidget_rad_info_religion_hs" ),
-    EUROPEAN_GENRE( RdsPhoneIn,             "txt_rad_info_phone_in",                "txt_rad_dblist_l1_mhz_val_phone_in",               "txt_fmradiohswidget_rad_info_phone_in_hs" ),
-    EUROPEAN_GENRE( RdsTravel,              "txt_rad_info_travel",                  "txt_rad_dblist_l1_mhz_val_travel",                 "txt_fmradiohswidget_rad_info_travel_hs" ),
-    EUROPEAN_GENRE( RdsLeisure,             "txt_rad_info_leisure",                 "txt_rad_dblist_l1_mhz_val_leisure",                "txt_fmradiohswidget_rad_info_leisure_hs" ),
-    EUROPEAN_GENRE( RdsJazzMusic,           "txt_rad_info_jazz_music",              "txt_rad_dblist_l1_mhz_val_jazz_music",             "txt_fmradiohswidget_rad_info_jazz_music_hs" ),
-    EUROPEAN_GENRE( RdsCountryMusic,        "txt_rad_info_country_music",           "txt_rad_dblist_l1_mhz_val_country_music",          "txt_fmradiohswidget_rad_info_country_music_hs" ),
-    EUROPEAN_GENRE( RdsNationalMusic,       "txt_rad_info_national_music",          "txt_rad_dblist_l1_mhz_val_national_music",         "txt_fmradiohswidget_rad_info_national_music_hs" ),
-    EUROPEAN_GENRE( RdsOldiesMusic,         "txt_rad_info_oldies_music",            "txt_rad_dblist_l1_mhz_val_oldies_music",           "txt_fmradiohswidget_rad_info_oldies_music_hs" ),
-    EUROPEAN_GENRE( RdsFolkMusic,           "txt_rad_info_folk_music",              "txt_rad_dblist_l1_mhz_val_folk_music",             "txt_fmradiohswidget_rad_info_folk_music_hs" ),
-    EUROPEAN_GENRE( RdsDocumentary,         "txt_rad_info_documentary",             "txt_rad_dblist_l1_mhz_val_documentary",            "txt_fmradiohswidget_rad_info_documentary_hs" ),
-    EUROPEAN_GENRE( RdsAlarmTest,           "txt_rad_info_alarm_test",              "txt_rad_dblist_l1_mhz_val_alarm_test",             "txt_fmradiohswidget_rad_info_alarm_test_hs" ),
-    EUROPEAN_GENRE( RdsAlarm,               "txt_rad_info_alarm",                   "txt_rad_dblist_l1_mhz_val_alarm",                  "txt_fmradiohswidget_rad_info_alarm_hs" )
-END_GENRE_MAP( EuropeanGenres )
-
-BEGIN_GENRE_MAP( AmericanGenres )
-                    // Genre code           // Text in Carousel                     // Text in Stations list                            // Text in Homescreen widget
-    AMERICAN_GENRE( RbdsNone,               "",                                     "",                                                 "" ),
-    AMERICAN_GENRE( RbdsNews,               "txt_rad_info_news",                    "txt_rad_dblist_l1_mhz_val_news",                   "txt_fmradiohswidget_rad_info_news_hs" ),
-    AMERICAN_GENRE( RbdsInformation,        "txt_rad_info_information",             "txt_rad_dblist_l1_mhz_val_information",            "txt_fmradiohswidget_rad_info_information_hs" ),
-    AMERICAN_GENRE( RbdsSports,             "txt_rad_info_sport",                   "txt_rad_dblist_l1_mhz_val_sport",                  "txt_fmradiohswidget_rad_info_sport_hs" ),
-    AMERICAN_GENRE( RbdsTalk,               "txt_rad_info_talk",                    "txt_rad_dblist_l1_mhz_val_talk",                   "txt_fmradiohswidget_rad_info_talk_hs" ),
-    AMERICAN_GENRE( RbdsRock,               "txt_rad_info_rock_music",              "txt_rad_dblist_l1_mhz_val_rock_music",             "txt_fmradiohswidget_rad_info_rock_music_hs" ),
-    AMERICAN_GENRE( RbdsClassicRock,        "txt_rad_info_classic_rock",            "txt_rad_dblist_l1_mhz_val_classic_rock",           "txt_fmradiohswidget_rad_info_classic_rock_hs" ),
-    AMERICAN_GENRE( RbdsAdultHits,          "txt_rad_info_adult_hits",              "txt_rad_dblist_l1_mhz_val_adult_hits",             "txt_fmradiohswidget_rad_info_adult_hits_hs" ),
-    AMERICAN_GENRE( RbdsSoftRock,           "txt_rad_info_soft_rock",               "txt_rad_dblist_l1_mhz_val_soft_rock",              "txt_fmradiohswidget_rad_info_soft_rock_hs" ),
-    AMERICAN_GENRE( RbdsTop40,              "txt_rad_info_top_40",                  "txt_rad_dblist_l1_mhz_val_top_40",                 "txt_fmradiohswidget_rad_info_top_40_hs" ),
-    AMERICAN_GENRE( RbdsCountry,            "txt_rad_info_country_music",           "txt_rad_dblist_l1_mhz_val_country_music",          "txt_fmradiohswidget_rad_info_country_music_hs" ),
-    AMERICAN_GENRE( RbdsOldies,             "txt_rad_info_oldies_music",            "txt_rad_dblist_l1_mhz_val_oldies_music",           "txt_fmradiohswidget_rad_info_oldies_music_hs" ),
-    AMERICAN_GENRE( RbdsSoft,               "txt_rad_info_soft",                    "txt_rad_dblist_l1_mhz_val_soft",                   "txt_fmradiohswidget_rad_info_soft_hs" ),
-    AMERICAN_GENRE( RbdsNostalgia,          "txt_rad_info_nostalgia",               "txt_rad_dblist_l1_mhz_val_nostalgia",              "txt_fmradiohswidget_rad_info_nostalgia_hs" ),
-    AMERICAN_GENRE( RbdsJazz,               "txt_rad_info_jazz_music",              "txt_rad_dblist_l1_mhz_val_jazz_music",             "txt_fmradiohswidget_rad_info_jazz_music_hs" ),
-    AMERICAN_GENRE( RbdsClassical,          "txt_rad_info_classical",               "txt_rad_dblist_l1_mhz_val_classical",              "txt_fmradiohswidget_rad_info_classical_hs" ),
-    AMERICAN_GENRE( RbdsRhythmAndBlues,     "txt_rad_info_rhythm_and_blues",        "txt_rad_dblist_l1_mhz_val_rhythm_and_blues",       "txt_fmradiohswidget_rad_info_rhythm_and_blues_hs" ),
-    AMERICAN_GENRE( RbdsSoftRhythmAndBlues, "txt_rad_info_soft_rhythm_and_blues",   "txt_rad_dblist_l1_mhz_val_soft_rhythm_and_blues",  "txt_fmradiohswidget_rad_info_soft_rhythm_and_blues_hs" ),
-    AMERICAN_GENRE( RbdsLanguage,           "txt_rad_info_language",                "txt_rad_dblist_l1_mhz_val_language",               "txt_fmradiohswidget_rad_info_language_hs" ),
-    AMERICAN_GENRE( RbdsReligiousMusic,     "txt_rad_info_religious_music",         "txt_rad_dblist_l1_mhz_val_religious_music",        "txt_fmradiohswidget_rad_info_religious_music_hs" ),
-    AMERICAN_GENRE( RbdsReligiousTalk,      "txt_rad_info_religious_talk",          "txt_rad_dblist_l1_mhz_val_religious_talk",         "txt_fmradiohswidget_rad_info_religious_talk_hs" ),
-    AMERICAN_GENRE( RbdsPersonality,        "txt_rad_info_personality",             "txt_rad_dblist_l1_mhz_val_personality",            "txt_fmradiohswidget_rad_info_personality_hs" ),
-    AMERICAN_GENRE( RbdsPublic,             "txt_rad_info_public",                  "txt_rad_dblist_l1_mhz_val_public",                 "txt_fmradiohswidget_rad_info_public_hs" ),
-    AMERICAN_GENRE( RbdsCollege,            "txt_rad_info_college",                 "txt_rad_dblist_l1_mhz_val_college",                "txt_fmradiohswidget_rad_info_college_hs" ),
-    AMERICAN_GENRE( RbdsUnassigned1,        "",                                     "",                                                 "" ),
-    AMERICAN_GENRE( RbdsUnassigned2,        "",                                     "",                                                 "" ),
-    AMERICAN_GENRE( RbdsUnassigned3,        "",                                     "",                                                 "" ),
-    AMERICAN_GENRE( RbdsUnassigned4,        "",                                     "",                                                 "" ),
-    AMERICAN_GENRE( RbdsUnassigned5,        "",                                     "",                                                 "" ),
-    AMERICAN_GENRE( RbdsWeather,            "txt_rad_info_weather",                 "txt_rad_dblist_l1_mhz_val_weather",                "txt_fmradiohswidget_rad_info_weather_hs" ),
-    AMERICAN_GENRE( RbdsEmergencyTest,      "txt_rad_info_alarm_test",              "txt_rad_dblist_l1_mhz_val_alarm_test",             "txt_fmradiohswidget_rad_info_alarm_test_hs" ),
-    AMERICAN_GENRE( RbdsEmergency,          "txt_rad_info_alarm",                   "txt_rad_dblist_l1_mhz_val_alarm",                  "txt_fmradiohswidget_rad_info_alarm_hs" ),
-END_GENRE_MAP( AmericanGenres )
-
-/*!
- * Function to find the localized text of the given frequency in the given region and target
- */
-static QString RadioGenreLocalizer::genreToString( RadioRegion::Region region, int genre, GenreTarget::Target target )
-{
-    const RadioGenreLocalizer::GenreMap* genreArray = region == RadioRegion::America ? AmericanGenres : EuropeanGenres;
-    const int genreCount = region == RadioRegion::America ? AmericanGenresCount : EuropeanGenresCount;
-
-    for( int i = 0; i < genreCount; ++i ) {
-        if ( genreArray[i].mGenreCode == genre ) {
-            if ( target == GenreTarget::Carousel ) {
-                return qtTrId( genreArray[i].mInCarousel );
-            } else if ( target == GenreTarget::StationsList ) {
-                return qtTrId( genreArray[i].mInStationsList );
-            } else if ( target == GenreTarget::HomeScreen ) {
-                return qtTrId( genreArray[i].mInHomeScreen );
-            }
-        }
-    }
-
-    return "";
-}
-
-#endif // RADIOGENRELOCALIZER_H
--- a/radioapp/radiouiengine/inc/radiohistorydatabase.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +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 RADIOHISTORYDATABASE_H
-#define RADIOHISTORYDATABASE_H
-
-// System includes
-#include <QScopedPointer>
-
-// User includes
-
-// Forward declarations
-class QSqlDatabase;
-class QSqlQuery;
-
-/*!
- *
- */
-class RadioHistoryDatabase
-{
-public:
-
-    RadioHistoryDatabase();
-    ~RadioHistoryDatabase();
-
-    void addItem( const QString& artist, const QString& title,
-                  const QString& stationName, uint frequency, bool fromRds );
-
-    void clearRecent();
-    void clearTagged();
-
-private:
-
-    bool connectToDatabase();
-
-    void commitTransaction( QSqlQuery& query );
-
-private: // data
-
-    QScopedPointer<QSqlDatabase>    mDatabase;
-
-};
-
-#endif // RADIOHISTORYDATABASE_H
--- a/radioapp/radiouiengine/inc/radiohistoryitem.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +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 RADIOHISTORYITEM_H
-#define RADIOHISTORYITEM_H
-
-// System includes
-#include <QSharedDataPointer>
-#include <QMetaType>
-
-// User includes
-#include "radiouiengineexport.h"
-
-// Forward declarations
-class RadioHistoryItemPrivate;
-
-/*!
- * Radio history item implements a song recognized from the radio broadcast
- */
-class UI_ENGINE_DLL_EXPORT RadioHistoryItem
-{
-public:
-
-    RadioHistoryItem();
-    RadioHistoryItem( const QString& artist, const QString& title );
-    RadioHistoryItem( const RadioHistoryItem& other );
-
-    ~RadioHistoryItem();
-
-    RadioHistoryItem& operator=( const RadioHistoryItem& other );
-
-    bool isValid() const;
-    void reset();
-
-    int id() const;
-
-    QString artist() const;
-    void setArtist( const QString& artist );
-
-    QString title() const;
-    void setTitle( const QString& title );
-
-    QString station() const;
-    void setStation( const QString& station );
-
-    uint frequency() const;
-    void setFrequency( uint frequency );
-
-    QString time() const;
-    void setCurrentTime();
-
-    bool isTagged() const;
-
-    bool isRecognizedByRds() const;
-
-private: // data
-
-    /*!
-     * Pointer to the implicitly shared private implementation
-     * Own.
-     */
-    QSharedDataPointer<RadioHistoryItemPrivate> mData;
-
-public:
-
-    /**
-     * Checks if the class is detached from implicitly shared data
-     * Required by many QT convenience functions for implicitly shared classes
-     */
-    bool isDetached() const;
-
-    typedef QSharedDataPointer<RadioHistoryItemPrivate> DataPtr;
-    inline DataPtr &data_ptr() { return mData; }
-
-};
-
-Q_DECLARE_TYPEINFO( RadioHistoryItem, Q_MOVABLE_TYPE );  // Can be moved around in memory by containers if necessary
-Q_DECLARE_SHARED( RadioHistoryItem )                     // Uses implicit sharing
-Q_DECLARE_METATYPE( RadioHistoryItem )                   // To be usable in a QVariant
-
-#endif // RADIOHISTORYITEM_H
--- a/radioapp/radiouiengine/inc/radiohistoryitem_p.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef RADIOHISTORYITEM_P_H
-#define RADIOHISTORYITEM_H
-
-// System includes
-#include <QSharedData>
-#include <QString>
-#include <QDateTime>
-
-// User includes
-
-// Forward declarations
-class QSqlRecord;
-
-// Constants
-namespace RadioHistoryValue
-{
-    enum Name
-    {
-        Id,
-        Artist,
-        Title,
-        Station,
-        Frequency,
-        Tagged,
-        FromRds,
-        Time
-    };
-}
-
-class RadioHistoryItemPrivate : public QSharedData
-{
-public:
-
-    RadioHistoryItemPrivate();
-    RadioHistoryItemPrivate( const RadioHistoryItemPrivate& other );
-    RadioHistoryItemPrivate( const QString& artist, const QString& title );
-
-    void init( const QString& artist, const QString& title );
-
-    void initFromRecord( const QSqlRecord& record );
-
-public: // data
-
-    int             mId;
-
-    QString         mArtist;
-
-    QString         mTitle;
-
-    QString         mStation;
-
-    QDateTime       mTime;
-
-    uint            mFrequency;
-
-    bool            mTagged;
-
-    bool            mFromRds;
-
-};
-
-#endif // RADIOHISTORYITEM_H
--- a/radioapp/radiouiengine/inc/radiohistorymodel.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +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 RADIOHISTORYMODEL_H
-#define RADIOHISTORYMODEL_H
-
-// System includes
-#include <QAbstractListModel>
-#include <QScopedPointer>
-
-// User includes
-#include "radiouiengineexport.h"
-#include "radiohistoryitem.h"
-
-// Forward declarations
-class RadioHistoryModelPrivate;
-class RadioUiEngine;
-class RadioStation;
-class QIcon;
-class RadioHistoryItem;
-
-class UI_ENGINE_DLL_EXPORT RadioHistoryModel : public QAbstractListModel
-{
-    Q_OBJECT
-    Q_DECLARE_PRIVATE_D( d_ptr.data(), RadioHistoryModel )
-    Q_DISABLE_COPY( RadioHistoryModel )
-
-    friend class RadioUiEngine;
-    friend class RadioUiEnginePrivate;
-    friend class RadioStationModelPrivate;
-
-    friend class RadioHistoryView;  // TEMPORARY TEST CODE, REMOVE
-
-public:
-
-    ~RadioHistoryModel();
-
-    enum HistoryRole
-    {
-        HistoryItemRole = Qt::UserRole + 100,
-        SetFavoriteRole
-    };
-
-// from base class QAbstractListModel
-
-    int rowCount( const QModelIndex& parent = QModelIndex() ) const;
-    QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const;
-
-// New functions
-
-    /*!
-     * Sets the icons to be used in the list
-     */
-    void setIcons( const QIcon& nonTaggedIcon, const QIcon& taggedIcon );
-
-    bool isCurrentSongRecognized() const;
-    void setShowDetails( bool showDetails );
-    void setShowTagged( bool showTagged );
-    void toggleTagging( const RadioHistoryItem& item, const int row );
-
-    RadioHistoryItem itemAtIndex( const QModelIndex& index ) const;
-
-    void removeAll( bool removeTagged );
-
-signals:
-
-    void itemAdded();
-    void currentSongReset();
-
-public slots:
-
-    void resetCurrentSong();
-
-private:
-
-    explicit RadioHistoryModel( RadioUiEngine& uiEngine );
-
-    void addItem( const QString& artist, const QString& title, const RadioStation& station );
-
-    void clearRadioTextPlus();
-    void addRadioTextPlus( int rtClass, const QString& rtItem, const RadioStation& station );
-
-    void reportChangedData( int start, int end = -1 );
-
-    void emitItemAdded();
-
-private: // data
-
-    /**
-     * Unmodifiable pointer to the private implementation
-     */
-    const QScopedPointer<RadioHistoryModelPrivate> d_ptr;
-
-};
-
-#endif // RADIOHISTORYMODEL_H
--- a/radioapp/radiouiengine/inc/radiohistorymodel_p.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef RADIOHISTORYMODEL_P_H
-#define RADIOHISTORYMODEL_P_H
-
-// System includes
-#include <QList>
-#include <QString>
-#include <QScopedPointer>
-#include <QIcon>
-#include <QSqlQuery>
-
-// User includes
-#include "radiohistoryitem.h"
-
-// Forward declarations
-class RadioHistoryModel;
-class RadioUiEngine;
-class RadioHistoryItem;
-class QSqlDatabase;
-class RadioStation;
-class QStringList;
-class QSqlQueryModel;
-
-class RadioHistoryModelPrivate
-{
-public:
-
-    explicit RadioHistoryModelPrivate( RadioHistoryModel* model, RadioUiEngine& uiEngine );
-
-    ~RadioHistoryModelPrivate();
-
-    bool connectToDatabase();
-
-    void addItem( const QString& artist, const QString& title, const RadioStation& station, bool fromRds = true );
-
-    int rowCount() const;
-    QVariant data( const int row, const int role ) const;
-
-    void removeAll( bool removeTagged );
-
-    enum ViewMode{ ShowAll, ShowTagged };
-    void setViewMode( ViewMode mode );
-
-    void toggleTagging( const RadioHistoryItem& item, const int row );
-
-    RadioHistoryItem itemAtIndex( const QModelIndex& index ) const;
-
-private:
-
-    void refreshModel();
-    QSqlQuery beginTransaction();
-    enum Operation{ NoOp, InsertRows, RemoveRows, ChangeData };
-    void commitTransaction( QSqlQuery& query, Operation operation, int start, int end = -1 );
-
-public: // data
-
-    /**
-     * Pointer to the public class
-     * Not own.
-     */
-    RadioHistoryModel*              q_ptr;
-
-    /**
-     * Reference to the ui engine
-     */
-    RadioUiEngine&                  mUiEngine;
-
-    QScopedPointer<QSqlDatabase>    mDatabase;
-
-    QScopedPointer<QSqlQueryModel>  mQueryModel;
-
-    QString                         mRtItemHolder;
-    int                             mRtItemClass;
-
-    bool                            mTopItemIsPlaying;
-
-    bool                            mShowDetails;
-
-    /**
-     * Non Tagged icon
-     */
-    QIcon                           mNonTaggedIcon;
-
-    /**
-     * Tagged icon
-     */
-    QIcon                           mTaggedIcon;
-
-    ViewMode                        mViewMode;
-
-};
-
-#endif // RADIOHISTORYMODEL_P_H
--- a/radioapp/radiouiengine/inc/radiomonitorservice.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +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 RADIOMONITORSERVICE_H
-#define RADIOMONITORSERVICE_H
-
-// System includes
-#include <xqserviceprovider.h>
-
-// User includes
-#include "radioservicedef.h"
-#include "radioenginewrapperobserver.h"
-
-// Forward declarations
-class RadioUiEnginePrivate;
-class RadioStation;
-class QTimer;
-
-class RadioMonitorService : public XQServiceProvider
-                          , public RadioEngineWrapperObserver
-{
-    Q_OBJECT
-
-public:
-
-    RadioMonitorService( RadioUiEnginePrivate& engine );
-    virtual ~RadioMonitorService();
-
-    void init();
-
-public slots:
-
-    void requestNotifications();    // Slot called by Qt Highway
-    void requestAllData();          // Slot called by Qt Highway
-
-private slots:
-
-    void notifyRadioStatus();
-    void notifyFavoriteCount();
-    void notifyStationChange( const RadioStation& station );
-    void sendNotifications();
-
-private:
-
-// from base class RadioEngineWrapperObserver
-
-    void tunedToFrequency( uint frequency, int reason );
-
-// New functions
-
-    RadioStatus::Status determineRadioStatus() const;
-
-    void checkIfCurrentStationIsFavorite();
-
-    QString trimHtmlTags( const QString& html );
-
-    void notify( const QVariant& notification );
-    void notifyList( const QVariantList& list );
-
-private: // data
-
-    RadioUiEnginePrivate&   mUiEngine;
-
-    QList<int>              mRequestIndexes;
-
-    RadioStatus::Status     mRadioStatus;
-
-    QVariantList            mNotificationList;
-
-    QTimer*                 mNotificationTimer;
-
-};
-
-#endif // RADIOMONITORSERVICE_H
--- a/radioapp/radiouiengine/inc/radioscannerengine.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef RADIOSCANNERENGINE_H
-#define RADIOSCANNERENGINE_H
-
-// System includes
-#include <QObject>
-#include <QScopedPointer>
-#include <QMap>
-
-// User includes
-#include "radiouiengineexport.h"
-
-// Forward declarations
-class RadioScannerEnginePrivate;
-class RadioUiEnginePrivate;
-class RadioStationHandlerIf;
-class RadioStation;
-
-// Constants
-
-// Class declaration
-class UI_ENGINE_DLL_EXPORT RadioScannerEngine : public QObject
-    {
-    Q_OBJECT
-    Q_DECLARE_PRIVATE_D( d_ptr.data(), RadioScannerEngine )
-    Q_DISABLE_COPY( RadioScannerEngine )
-
-    friend class RadioUiEngine;
-
-public:
-
-    explicit RadioScannerEngine( RadioUiEnginePrivate& uiEngine );
-    ~RadioScannerEngine();
-
-// New functions
-
-    /*!
-     * Starts the scanning from minimum frequency
-     */
-    void startScanning();
-
-    /*!
-     * Continues the scanning upwards from current frequency
-     */
-    void continueScanning();
-
-    /*!
-     * Checks if the scanning is ongoing
-     */
-    bool isScanning() const;
-
-    /*!
-     * Cancels the scanning process
-     */
-    void cancel();
-
-    /*!
-     * Adds a new station that was found
-     * @param frequency Frequency of the found station
-     */
-    void addScannedFrequency( const uint frequency );
-
-signals:
-
-    void stationFound( const RadioStation& station );
-
-private:
-
-    void emitStationFound( const RadioStation& station );
-
-private: // data
-
-    /**
-     * Unmodifiable pointer to the private implementation
-     */
-    const QScopedPointer<RadioScannerEnginePrivate> d_ptr;
-
-    };
-
-#endif // RADIOSCANNERENGINE_H
--- a/radioapp/radiouiengine/inc/radioscannerengine_p.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,80 +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 RADIOSCANNERENGINE_P_H_
-#define RADIOSCANNERENGINE_P_H_
-
-#include <QObject>
-#include <QMap>
-
-// User includes
-#include "radioenginewrapperobserver.h"
-
-// Forward declarations
-class RadioScannerEngine;
-class RadioUiEnginePrivate;
-class RadioStationHandlerIf;
-class RadioStation;
-class RadioEngineWrapper;
-
-// Constants
-
-// Class declaration
-class RadioScannerEnginePrivate : public RadioEngineWrapperObserver
-    {
-    Q_DECLARE_PUBLIC( RadioScannerEngine )
-    Q_DISABLE_COPY( RadioScannerEnginePrivate )
-
-public:
-
-    RadioScannerEnginePrivate( RadioScannerEngine* scanner, RadioUiEnginePrivate& uiEngine );
-    virtual ~RadioScannerEnginePrivate();
-
-private:
-
-// from base class RadioEngineWrapperObserver
-
-    void tunedToFrequency( uint frequency, int reason );
-
-// New functions
-
-    void addFrequencyAndReport( const uint frequency );
-
-private: // data
-
-    /**
-     * Pointer to the public class
-     * Not own.
-     */
-    RadioScannerEngine*     q_ptr;
-
-    RadioUiEnginePrivate&   mUiEngine;
-
-    /**
-     * Last scanned frequency. Used to know when the scanning has looped around the
-     * frequency band and it should stop
-     */
-    uint                    mLastFoundFrequency;
-
-    bool                    mMutedByScanner;
-
-    bool                    mIsScanning;
-
-    };
-
-
-#endif // RADIOSCANNERENGINE_P_H_
--- a/radioapp/radiouiengine/inc/radiostation.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,225 +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 RADIOSTATION_H_
-#define RADIOSTATION_H_
-
-// System includes
-#include <QObject>
-#include <QSharedDataPointer>
-#include <QString>
-#include <QMetaType>
-
-// User includes
-#include "radiouiengineexport.h"
-#include "radio_global.h"
-
-// Constants
-
-// Forward declarations
-class RadioStationPrivate;
-
-// Class declaration
-
-/*!
- * RadioStation is a data container that holds all information of a radio station.
- * It is implicitly shared to make it cheap to copy and pass around as a signal parameter.
- * It uses the "shared null" idiom to initialize empty instances quickly and efficiently.
- *
- * Note! It is derived from QObject even though architecturally it shouldn't be.
- * It is done only to satisfy the WINSCW build which doesn't export the destructor in UREL
- * build. This causes mismatching def files and annoying warnings. Deriving from QObject fixes this
- */
-class UI_ENGINE_DLL_EXPORT RadioStation : public QObject
-{
-    friend class RadioStationModel;
-    friend class RadioStationModelPrivate;
-    friend class TestRadioUiEngine;
-    friend class TestRadioPresetStorage;
-
-public:
-
-    /**
-     * Flags to indicate how the RadioStation has changed since last save or reset.
-     * Declared to use QFlags<> to ease flag usage and to enforce type safety
-     */
-    enum ChangeFlag
-    {
-         NoChange               = 0
-        ,PersistentDataChanged  = 1 << 0
-        ,NameChanged            = 1 << 1
-        ,FavoriteChanged        = 1 << 2
-        ,GenreChanged           = 1 << 3
-        ,UrlChanged             = 1 << 4
-        ,TypeChanged            = 1 << 5
-        ,PiCodeChanged          = 1 << 6
-        ,PsTypeChanged          = 1 << 7
-        ,RadioTextChanged       = 1 << 8
-        ,DynamicPsChanged       = 1 << 9
-    };
-    Q_DECLARE_FLAGS( Change, ChangeFlag )
-
-    /**
-     * Flags ot indicate station type.
-     * Declared to use QFlags<> to ease flag usage and to enforce type safety
-     */
-    enum TypeFlag
-    {
-       Favorite         = 1 << 0,
-       LocalStation     = 1 << 1,
-       PreDefined       = 1 << 2,
-       ManualStation    = 1 << 3
-    };
-    Q_DECLARE_FLAGS( Type, TypeFlag )
-
-    /**
-     * Flag to indiate whether or not station uses dynamic PS and if the check has been performed
-     * Declared to use QFlags<> to ease flag usage and to enforce type safety
-     */
-    enum PsTypeFlag
-    {
-        Unknown,
-        Dynamic,
-        Static
-    };
-    Q_DECLARE_FLAGS( PsType, PsTypeFlag )
-
-    /**
-     * Magical values used as preset indexes to signify certain conditions.
-     * NotFound means that a find function could not find a station
-     * Invalid means that the station instance has not been initialized
-     * SharedNull identifies the empty "null" station that every newly created station points to
-     */
-    enum PresetFlag { NotFound = -1, Invalid = -100, SharedNull = -200 };
-
-    /**
-     * Static convenience function to parse a frequency
-     */
-    static QString parseFrequency( uint frequency );
-
-    RadioStation();
-    RadioStation( const RadioStation& other );
-
-    ~RadioStation();
-
-    RadioStation& operator=( const RadioStation& other );
-
-private:
-
-    explicit RadioStation( int presetIndex, uint frequency );
-
-    void reset();
-    void setChangeFlags( Change flags );
-
-    // Setters for persistent data
-    void setPresetIndex( int presetIndex );
-    void setFrequency( uint frequency );
-    void setName( const QString& name );
-    void setGenre( const int genre );
-    void setUrl( const QString& url );
-    bool setPiCode( int piCode, RadioRegion::Region region );
-
-    // Setters for non-persistent data
-    void setPsType( PsType psType );
-    void setRadioText( const QString& radioText );
-    void setRadioTextPlus( const int rtPlusClass, const QString& rtPlusItem );
-    void setDynamicPsText( const QString& dynamicPsText );
-
-public: // Getters and setters
-
-    // Setters & Getters for persistent data
-
-    bool isValid() const;
-
-    QString name() const;
-    void setUserDefinedName( const QString& name );
-    bool isRenamed() const;
-
-    int genre() const;
-
-    QString frequencyString() const;
-    uint frequency() const;
-    int presetIndex() const;
-
-    void setFavorite( bool favorite );
-    bool isFavorite() const;
-
-    QString url() const;
-
-    int piCode() const;
-
-    void setType( RadioStation::Type type );
-    void unsetType( RadioStation::Type type );
-    bool isType( RadioStation::Type type ) const;
-
-    // Convenience checkers
-
-    inline bool hasPiCode() const       { return piCode() != -1; }
-    inline bool hasName() const         { return !name().isEmpty(); }
-    inline bool hasUrl() const          { return !url().isEmpty(); }
-    inline bool hasRadiotext() const    { return !radioText().isEmpty(); }
-    inline bool hasDynamicPs() const    { return !dynamicPsText().isEmpty(); }
-    inline bool hasGenre() const        { return genre() != -1; }
-
-    // Getters for non-persistent data
-
-    PsType psType() const;
-    QString radioText() const;
-    QString dynamicPsText() const;
-    Change changeFlags() const;
-    bool hasDataChanged( Change flags ) const;
-    bool hasChanged() const;
-    void resetChangeFlags();
-    bool hasSentRds() const;
-
-private:
-
-    // Methods for converting PI code into call sign
-    QString piCodeToCallSign( uint programmeIdentification );
-    QString iterateCallSign( int piBase, int programmeIdentification );
-    QString callSignString( uint programmeIdentification );
-    char callSignChar( uint decimalValue );
-
-private: // data
-
-    /**
-     * Pointer to the implicitly shared private implementation
-     * Own.
-     */
-    QSharedDataPointer<RadioStationPrivate> mData;
-
-public:
-
-    /**
-     * Checks if the class is detached from implicitly shared data
-     * Required by many QT convenience functions for implicitly shared classes
-     */
-    bool isDetached() const;
-
-    typedef QSharedDataPointer<RadioStationPrivate> DataPtr;
-    inline DataPtr& data_ptr() { return mData; }
-
-};
-
-Q_DECLARE_OPERATORS_FOR_FLAGS( RadioStation::Change )
-Q_DECLARE_OPERATORS_FOR_FLAGS( RadioStation::Type )
-
-Q_DECLARE_TYPEINFO( RadioStation, Q_MOVABLE_TYPE );  // Can be moved around in memory by containers if necessary
-Q_DECLARE_SHARED( RadioStation )                     // Uses implicit sharing
-Q_DECLARE_METATYPE( RadioStation )                   // To be usable in a QVariant
-
-#endif // RADIOSTATION_H_
--- a/radioapp/radiouiengine/inc/radiostation_p.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,190 +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 RADIOSTATIONINFO_P_H_
-#define RADIOSTATIONINFO_P_H_
-
-// System includes
-#include <QSharedData>
-#include <QTime>
-
-// User includes
-#include "radiostation.h"
-#include "radiostationif.h"
-
-// Class declaration
-class RadioStationPrivate : public QSharedData
-                          , public RadioStationIf
-{
-public:
-
-    /**
-     * Flags to indicate various on/off type information of the radio station
-     */
-    enum StationInfoFlag
-    {
-       RenamedByUser        = 1 << 0,
-       StationSendsRds      = 1 << 1,
-       CallSignCheckDone    = 1 << 2
-    };
-    Q_DECLARE_FLAGS( StationInfo, StationInfoFlag )
-
-    explicit RadioStationPrivate( int presetIndex = RadioStation::Invalid, uint frequency = 0 );
-    explicit RadioStationPrivate( const RadioStationPrivate& other );
-
-    virtual ~RadioStationPrivate();
-
-    void init( int presetIndex, uint frequency = 0 );
-
-// from base class RadioStationIf
-
-    int presetIndex() const;
-    void setPresetIndex( int presetIndex );
-    uint frequency() const;
-    void setFrequency( uint frequency );
-    QString name() const;
-    void setName( QString name );
-    bool isRenamedByUser() const;
-    void setRenamedByUser( bool renamed );
-    int genre() const;
-    void setGenre( int genre );
-    QString url() const;
-    void setUrl( QString url );
-    int piCode() const;
-    void setPiCode( int piCode );
-    bool isFavorite() const;
-    void setFavorite( bool favorite );
-    bool isLocalStation() const;
-    void setLocalStation( bool localStation );
-    bool hasStationSentRds() const;
-    void setStationHasSentRds( bool hasSentRds );
-
-// New functions
-
-    bool isCallSignCheckDone() const;
-    void setCallSignCheckDone( bool checkDone );
-
-public: // data
-
-    // ========================================================================
-    // Persistent data. Saved to Central repository
-    // ========================================================================
-
-    /**
-     * Station index in the Preset Utility.
-     * Negative values signify an invalid RadioStation that has not and will not be saved.
-     * Initialized to -100 by default to indicate and invalid station.
-     */
-    int                         mPresetIndex;
-
-    /**
-     * Station frequency. The most important bit of information about a radio station.
-     * Is checked to be non-null in the isValid() function
-     */
-    uint                        mFrequency;
-
-    /**
-     * Station name. Contains a name that is set in one of the following ways:
-     *  1) Received through RDS as the stations PS name and station does not use dynamic PS
-     *  2) Entered by the user. In this case the mRenamedByUser flag will be set and the name
-     *     cannot be changed until the user removes the renaming.
-     *  3) Callsign calculated from the PI code can be set as the station name if the station
-     *     does not send RDS information and the current region is America
-     */
-    QString                     mName;
-
-    /**
-     * Station genre received through RDS
-     */
-    int                         mGenre;
-
-    /**
-     * Station URL. Can be e.g. a web address to the radio stations homepage
-     */
-    QString                     mUrl;
-
-    /**
-     * Stations PI code. Only used in the America region to calculate the Callsign if station
-     * does not use RDS to broadcast PS name
-     */
-    int                         mPiCode;
-
-    /**
-     * Station type. Used by the application mainly to filter out certain stations depending
-     * on the users preference to see all locally audible stations or all favorite stations.
-     * Can have any combination of the following flags:
-     *  - Favorite      The station is a favorite of the user.
-     *  - LocalStation  The station was found in the last scan and should be audible in the current location
-     *  - Temporary     Special flag to mark one RadioStation instance that is used to store
-     *                  information of a manually tuned frequency that has not been saved by the user.
-     */
-    RadioStation::Type          mType;    // Station type, favorite or local station or neither
-
-    // ========================================================================
-    // Non-persistent data. Only kept in memory
-    // ========================================================================
-
-    /**
-     * Radio station PS name type. Some radio stations use the PS name broadcasting against the
-     * official RDS standard rules to broadcast advertisements. The ads are sent by changing the
-     * PS name in relatively rapid succession. The RDS standard specifies that a station should
-     * only use the PS name to broadcast a static station name.
-     * The FM Radio application attempts to determine if the station uses dynamic PS or not and
-     * stores the information here. Stations with a dynamic PS are treated differently in the UI and the
-     * name is never saved to Central Repository because it would only contain a part of an advertisement.
-     * Can have one of the following values:
-     *  - Unknown   Dynamic PS check has not been done so it is unknown if the station uses dynamic PS
-     *  - Dynamic   The check has been done and station has been found to use dynamic PS
-     *  - Static    The check has been done and the station has been found not to use dynamic PS
-     */
-    RadioStation::PsType        mPsType;
-
-    /**
-     * Stores the Radio Text received through RDS. Can be either normal Radio Text or Radio Text Plus
-     * where the tags have been parsed. Parsed Radio Text Plus is stored in HTML form, the normal Radio Text
-     * is stored as plain text.
-     */
-    QString                     mRadioText;
-
-    /**
-     * Holder for the ads sent by using dynamic PS. Holds one part of the ad at a time.
-     */
-    QString                     mDynamicPsText;
-
-    /**
-     * Internal book keeping used to determine which member variables have been changed since last save
-     * or reset. Used to decide which signals should be sent by the RadioStationModel when the station is saved.
-     */
-    RadioStation::Change        mChangeFlags;
-
-    /**
-     * Time of the last PS name change. Used to check if the station changes its PS name too often.
-     * In bad RDS coverage a station using dynamic PS might be incorrectly determined to use static PS.
-     * This is a corrective effort to change that decision if the name changes too often.
-     */
-    QTime                       mLastPsNameChangeTime;
-
-    /**
-     * Flags to indicate various on/off type information of the radio station
-     */
-    StationInfo                 mStationInfo;
-
-};
-
-Q_DECLARE_OPERATORS_FOR_FLAGS( RadioStationPrivate::StationInfo )
-
-#endif // RADIOSTATIONINFO_P_H_
--- a/radioapp/radiouiengine/inc/radiostationmodel.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,230 +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 RADIOSTATIONMODEL_H_
-#define RADIOSTATIONMODEL_H_
-
-// System includes
-#include <QAbstractListModel>
-#include <QScopedPointer>
-#include <QMap>
-
-// User includes
-#include "radio_global.h"
-#include "radiouiengineexport.h"
-#include "radiostation.h"
-
-// Forward declarations
-class RadioStationModelPrivate;
-class RadioPresetStorage;
-class RadioStationHandlerIf;
-class RadioEngineWrapper;
-class RadioStation;
-class RadioUiEnginePrivate;
-class QIcon;
-
-// Constants
-typedef QMap<uint,RadioStation> Stations;
-
-namespace FindCriteria
-{
-    enum Criteria
-    {
-        OnlySavedStations,
-        IncludeManualStation
-    };
-}
-
-// Class declaration
-class UI_ENGINE_DLL_EXPORT RadioStationModel : public QAbstractListModel
-{
-    Q_OBJECT
-    Q_DECLARE_PRIVATE_D( d_ptr.data(), RadioStationModel )
-    Q_DISABLE_COPY( RadioStationModel )
-
-public:
-
-    enum DetailFlag
-    {
-        Minimal     = 1 << 0,
-        ShowIcons   = 1 << 1,
-        ShowGenre   = 1 << 2
-    };
-    Q_DECLARE_FLAGS( Detail, DetailFlag )
-
-    explicit RadioStationModel( RadioUiEnginePrivate& uiEngine );
-
-    ~RadioStationModel();
-
-// from base class QAbstractListModel
-
-    Qt::ItemFlags flags ( const QModelIndex& index ) const;
-    int rowCount( const QModelIndex& parent = QModelIndex() ) const;
-    QVariant data( const QModelIndex& index, int role = Qt::DisplayRole ) const;
-    bool setData( const QModelIndex& index, const QVariant& value, int role = Qt::EditRole );
-
-// New functions
-
-    /*!
-     * Called by the engine to initialize the list with given amount of presets
-     */
-    void initialize( RadioPresetStorage* storage, RadioEngineWrapper* wrapper );
-
-    /*!
-     * Sets the icons to be used in the lists
-     */
-    void setIcons( const QIcon& favoriteIcon, const QIcon& nowPlayingIcon );
-
-    /*!
-     * Returns a reference to the station handler interface
-     */
-    RadioStationHandlerIf& stationHandlerIf();
-
-    /*!
-     * Returns a reference to the underlying QList so that it can be easily looped
-     */
-    const Stations& list() const;
-
-    /*!
-     * Returns the station at the given index.
-     * The station is returned by value, but it is cheap because it is implicitly shared
-     */
-    RadioStation stationAt( int index ) const;
-
-    /*!
-     * Finds a station by frequency
-     */
-    bool findFrequency( uint frequency, RadioStation& station, FindCriteria::Criteria criteria = FindCriteria::OnlySavedStations ) const;
-
-    /*!
-     * Convenience function to find a radio station.
-     * Internally uses findFrequency() and returns an invalid station if the given frequency is not found
-     */
-    RadioStation findStation( uint frequency, FindCriteria::Criteria criteria = FindCriteria::OnlySavedStations ) const;
-
-    /*!
-     * Functions to find stations by preset index
-     */
-    int findPresetIndex( int presetIndex );
-    int findPresetIndex( int presetIndex, RadioStation& station );
-
-    /*!
-     * Finds the closest station from the given frequency
-     */
-    RadioStation findClosest( const uint frequency, StationSkip::Mode mode );
-
-    /*!
-     * Checks if the model contains the given frequency
-     */
-    bool contains( const uint frequency ) const;
-
-    /*!
-     * Functions to remove stations
-     */
-    void removeByFrequency( uint frequency );
-    void removeByPresetIndex( int presetIndex );
-    void removeStation( const RadioStation& station );
-
-    /**
-     * Removes all stations
-     */
-    enum RemoveMode{ RemoveAll, RemoveLocalStations, RemoveFavorites  };
-    void removeAll( RemoveMode mode = RemoveAll );
-
-    /*!
-     * Functions to add and save stations
-     */
-    void addStation( const RadioStation& station );
-    void saveStation( RadioStation& station );
-
-    /*!
-     * Function to check the number of favorite stations
-     */
-    int favoriteCount();
-
-    /*!
-     * Convenience functions to change common settings
-     */
-    void setFavoriteByFrequency( uint frequency, bool favorite );
-    void setFavoriteByPreset( int presetIndex, bool favorite );
-    void renameStation( int presetIndex, const QString& name );
-    void setFavorites( const QModelIndexList& favorites );
-
-    /*!
-     * Functions to init and access the currently tuned station
-     */
-    RadioStation& currentStation();
-    const RadioStation& currentStation() const;
-
-    /*!
-     * Sets the model detail level
-     */
-    void setDetail( Detail level );
-
-    /*!
-     * Returns a list of radio stations in the given frequency range
-     */
-    QList<RadioStation> stationsInRange( uint minFrequency, uint maxFrequency );
-
-    /*!
-     * Returns the model index corresponding to the given frequency
-     */
-    int indexFromFrequency( uint frequency );
-
-signals:
-
-    void stationDataChanged( const RadioStation& station );
-    void radioTextReceived( const RadioStation& station );
-    void dynamicPsChanged( const RadioStation& station );
-    void favoriteChanged( const RadioStation& station );
-
-private slots:
-
-    /*!
-     * Timer timeout slot to indicate that the dynamic PS check has ended
-     */
-    void dynamicPsCheckEnded();
-
-private:
-
-// New functions
-
-    /*!
-     * Checks the given station and emits signals based on what member variables had been changed
-     * since the last save or reset.
-     */
-    void emitChangeSignals( const RadioStation& station, RadioStation::Change flags );
-
-    void emitDataChanged( const RadioStation& station );
-
-    /*!
-     * Finds an unused preset index
-     */
-    int findUnusedPresetIndex();
-
-private: // data
-
-    /**
-     * Unmodifiable pointer to the private implementation
-     */
-    const QScopedPointer<RadioStationModelPrivate> d_ptr;
-
-};
-
-Q_DECLARE_OPERATORS_FOR_FLAGS( RadioStationModel::Detail )
-
-#endif // RADIOSTATIONMODEL_H_
--- a/radioapp/radiouiengine/inc/radiostationmodel_p.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,141 +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 RADIOSTATIONMODEL_P_H_
-#define RADIOSTATIONMODEL_P_H_
-
-// System includes
-#include <QList>
-#include <QMap>
-#include <QScopedPointer>
-#include <QIcon>
-
-// User includes
-#include "radioenginewrapperobserver.h"
-#include "radiostationhandlerif.h"
-
-// Forward declarations
-class RadioUiEnginePrivate;
-class RadioPresetStorage;
-class RadioEngineWrapper;
-class QTimer;
-
-// Class declaration
-class RadioStationModelPrivate : public RadioStationHandlerIf
-                               , public RadioEngineWrapperObserver
-{
-    Q_DECLARE_PUBLIC( RadioStationModel )
-    Q_DISABLE_COPY( RadioStationModelPrivate )
-
-public:
-
-    explicit RadioStationModelPrivate( RadioStationModel* model, RadioUiEnginePrivate& uiEngine );
-
-    virtual ~RadioStationModelPrivate();
-
-private:
-
-// from base class RadioStationHandlerIf
-
-    uint currentFrequency() const;
-    int currentPresetIndex() const;
-    void setCurrentStation( uint frequency );
-    bool containsFrequency( uint frequency );
-    bool containsPresetIndex( int presetIndex );
-    void startDynamicPsCheck();
-    void addScannedFrequency( uint frequency );
-    void setCurrentPsName( uint frequency, const QString& name );
-    void setCurrentRadioText( uint frequency, const QString& radioText );
-    void setCurrentRadioTextPlus( uint frequency, int rtClass, const QString& rtItem );
-    void setCurrentPiCode( uint frequency, int piCode );
-    void setCurrentGenre( uint frequency, int genre );
-
-// from base class RadioEngineWrapperObserver
-
-    void tunedToFrequency( uint frequency, int reason );
-
-// New functions
-
-    void doSaveStation( RadioStation& station, bool persistentSave = true );
-
-    QList<RadioStation> favorites() const;
-
-private: // data
-
-    /**
-     * Pointer to the public class
-     * Not own.
-     */
-    RadioStationModel*          q_ptr;
-
-    /**
-     * Reference to the ui engine
-     */
-    RadioUiEnginePrivate&       mUiEngine;
-
-    /**
-     * Pointer to the preset storage
-     */
-    RadioPresetStorage*         mPresetStorage;
-
-    /**
-     * Pointer to the radio engine wrapper
-     */
-    RadioEngineWrapper*         mWrapper;
-
-    /**
-     * List of station items
-     */
-    Stations                    mStations;
-
-    /**
-     * Station used to store information of manually tuned frequencies
-     */
-    RadioStation                mManualStation;
-
-    /**
-     * Pointer to the current station
-     * Not own.
-     */
-    RadioStation*               mCurrentStation;
-
-    /**
-     * Dynamic PS timer
-     * Own.
-     */
-    QScopedPointer<QTimer>      mDynamicPsTimer;
-
-    /**
-     * Level of detail shown in Qt::DisplayRole and Qt::DecorationRole roles
-     */
-    RadioStationModel::Detail   mDetailLevel;
-
-    /**
-     * Pointer to favorite icon.
-     * Not own.
-     */
-    QIcon                       mFavoriteIcon;
-
-    /**
-     * Pointer to the now playing marker icon
-     * Not own.
-     */
-    QIcon                       mNowPlayingIcon;
-
-};
-
-#endif // RADIOSTATIONMODEL_P_H_
--- a/radioapp/radiouiengine/inc/radiouiengine.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,187 +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 RADIOUIENGINE_H_
-#define RADIOUIENGINE_H_
-
-// System includes
-#include <QObject>
-#include <QString>
-#include <QScopedPointer>
-#include <QSharedPointer>
-
-// User includes
-#include "radiouiengineexport.h"
-#include "radio_global.h"
-
-// Forward declarations
-class RadioUiEnginePrivate;
-class RadioStationModel;
-class RadioSettingsIf;
-class RadioStation;
-class RadioHistoryModel;
-class RadioHistoryItem;
-class RadioScannerEngine;
-class RadioMonitorService;
-
-typedef QSharedPointer<RadioScannerEngine> RadioScannerEnginePtr;
-
-// Constants
-const uint DEFAULT_MIN_FREQUENCY = 87500000;
-
-class UI_ENGINE_DLL_EXPORT RadioUiEngine : public QObject
-{
-    Q_OBJECT
-    Q_DECLARE_PRIVATE_D( d_ptr.data(), RadioUiEngine )
-    Q_DISABLE_COPY( RadioUiEngine )
-
-    friend class RadioScannerEngine;
-
-public: // Static functions that are used before the ui engine is created
-
-    /*!
-     * Gets the last tuned frequency from central repository
-     */
-    static uint lastTunedFrequency( uint defaultFrequency = DEFAULT_MIN_FREQUENCY );
-
-    /*!
-     * Gets the last used volume level
-     */
-    static int lastVolume();
-
-    /*!
-     * Launches the radio server process
-     */
-    static void launchRadioServer();
-
-public:
-
-    RadioUiEngine( QObject* parent = 0 );
-    ~RadioUiEngine();
-
-    bool isInitialized() const;
-
-    bool init();
-
-    bool isFirstTimeStart();
-    void setFirstTimeStartPerformed( bool firstTimeStartPerformed );
-
-    void setPowerOn();
-    void setPowerOff( int delay = 0 );
-    bool isPoweringOff() const;
-
-    /**
-     * Getters for things owned by the engine
-     */
-    RadioSettingsIf& settings();
-    RadioStationModel& stationModel();
-    RadioHistoryModel& historyModel();
-    RadioScannerEnginePtr createScannerEngine();
-    RadioScannerEngine* scannerEngine();
-
-    bool isRadioOn() const;
-    bool isScanning() const;
-    bool isMuted() const;
-    bool isAntennaAttached() const;
-    bool isUsingLoudspeaker() const;
-
-    RadioRegion::Region region() const;
-    uint currentFrequency() const;
-    uint minFrequency() const;
-    uint maxFrequency() const;
-    uint frequencyStepSize() const;
-
-    void setMute( bool muted );
-
-    QList<RadioStation> stationsInRange( uint minFrequency, uint maxFrequency );
-
-    QString genreToString( int genre, GenreTarget::Target target );
-
-    bool isSongRecognitionAppAvailable();
-
-    void addRecognizedSong( const QString& artist, const QString& title, const RadioStation& station );
-
-    uint skipStation( StationSkip::Mode mode, uint startFrequency = 0, const int reason = TuneReason::Skip );
-
-    enum MusicStore{ OviStore, OtherStore };
-    void openMusicStore( const RadioHistoryItem& item, MusicStore store = OviStore );
-
-    void launchBrowser( const QString& url );
-
-    void setManualSeekMode( bool manualSeek );
-    bool isInManualSeekMode() const;
-
-    /**
-     * Tunes the radio engine to given frequency
-     */
-    void setFrequency( uint frequency, const int reason = TuneReason::Unspecified );
-
-signals:
-
-    void tunedToFrequency( uint frequency, int commandSender );
-    void seekingStarted( int direction );
-    void radioStatusChanged( bool radioIsOn );
-
-    void rdsAvailabilityChanged( bool available );
-
-    void volumeChanged( int volume );
-    void muteChanged( bool muted );
-
-    void audioRouteChanged( bool loudspeaker );
-    void antennaStatusChanged( bool connected );
-
-    void powerOffRequested();
-
-public slots:
-
-    /*!
-     * volume update command slot for the engine
-     */
-    void setVolume( int volume );
-    void toggleMute();
-    void toggleAudioRoute();
-
-    void seekStation( int seekDirection );
-
-    void launchSongRecognition();
-
-private:
-
-    /**
-     * functions used only by the private class to get signals emitted
-     */
-    void emitTunedToFrequency( uint frequency, int commandSender );
-    void emitSeekingStarted( Seek::Direction direction );
-    void emitRadioStatusChanged( bool radioIsOn );
-    void emitRdsAvailabilityChanged( bool available );
-    void emitVolumeChanged( int volume );
-    void emitMuteChanged( bool muted );
-    void emitAudioRouteChanged( bool loudspeaker );
-    void emitAntennaStatusChanged( bool connected );
-
-private: // data
-
-    /**
-     * Unmodifiable pointer to the private implementation
-     */
-    const QScopedPointer<RadioUiEnginePrivate> d_ptr;
-
-};
-
-
-#endif // RADIOUIENGINE_H_
--- a/radioapp/radiouiengine/inc/radiouiengine_p.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef RADIOUIENGINE_P_H_
-#define RADIOUIENGINE_P_H_
-
-// System includes
-#include <QScopedPointer>
-#include <QSharedPointer>
-
-// User includes
-#include "radio_global.h"
-#include "radioenginewrapperobserver.h"
-
-// Forward declarations
-class RadioUiEngine;
-class RadioEngineWrapper;
-class RadioStationModel;
-class RadioHistoryModel;
-class RadioPresetStorage;
-class RadioControlService;
-class RadioMonitorService;
-class RadioScannerEngine;
-class QTimer;
-
-class RadioUiEnginePrivate : public RadioEngineWrapperObserver
-{
-    Q_DECLARE_PUBLIC( RadioUiEngine )
-    Q_DISABLE_COPY( RadioUiEnginePrivate )
-
-public:
-
-    RadioUiEnginePrivate( RadioUiEngine* engine );
-    virtual ~RadioUiEnginePrivate();
-
-    RadioUiEngine& api();
-
-    bool init();
-
-    void cancelSeeking();
-
-    RadioEngineWrapper& wrapper();
-
-private:
-
-// from base class RadioEngineWrapperObserver
-
-    void tunedToFrequency( uint frequency, int reason );
-    void radioStatusChanged( bool radioIsOn );
-    void rdsAvailabilityChanged( bool available );
-    void increaseVolume();
-    void decreaseVolume();
-    void volumeChanged( int volume );
-    void muteChanged( bool muted );
-    void audioRouteChanged( bool loudspeaker );
-    void antennaStatusChanged( bool connected );
-    void skipPrevious();
-    void skipNext();
-
-// New functions
-
-    /*!
-     * Tunes to next or previous station
-     */
-    uint skip( StationSkip::Mode mode, uint startFrequency = 0, const int reason = TuneReason::Skip );
-
-private: // data
-
-    /**
-     * Pointer to the public class
-     * Not own.
-     */
-    RadioUiEngine*                          q_ptr;
-
-    QScopedPointer<RadioEngineWrapper>      mEngineWrapper;
-
-    QScopedPointer<RadioPresetStorage>      mPresetStorage;
-
-    QScopedPointer<RadioStationModel>       mStationModel;
-
-    QScopedPointer<RadioHistoryModel>       mHistoryModel;
-
-    QScopedPointer<RadioControlService>     mControlService;
-
-    QScopedPointer<RadioMonitorService>     mMonitorService;
-
-    QWeakPointer<RadioScannerEngine>        mScannerEngine;
-
-    /**
-     * Power off timer
-     * Owned by public class by setting parent
-     */
-    QTimer*                                 mPowerOffTimer;
-
-};
-
-#endif // RADIOUIENGINE_P_H_
--- a/radioapp/radiouiengine/inc/radiouiengineexport.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef RADIO_UI_ENGINE_EXPORT_H_
-#define RADIO_UI_ENGINE_EXPORT_H_
-
-// System includes
-#include <QtGlobal>
-
-#ifdef BUILD_UI_ENGINE_DLL
-    #define UI_ENGINE_DLL_EXPORT Q_DECL_EXPORT
-#else
-    #define UI_ENGINE_DLL_EXPORT Q_DECL_IMPORT
-#endif
-
-#endif // RADIO_UI_ENGINE_EXPORT_H_
--- a/radioapp/radiouiengine/radiouiengine.pro	Tue Aug 31 15:15:02 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:
-#
-
-TMP_DIR_NAME = uiengine
-include(../buildflags.pri)
-
-TEMPLATE    = lib
-TARGET      = fmradiouiengine
-CONFIG      += dll
-DEFINES     += BUILD_UI_ENGINE_DLL
-
-symbian:TARGET.UID3 = 0x2002EADA
-
-# UI engine does not depend on Orbit
-QT          = core gui network sql
-CONFIG      -= hb
-
-INCLUDEPATH += inc
-INCLUDEPATH += ../radiopresetstorage/inc
-INCLUDEPATH += ../radioenginewrapper/inc
-INCLUDEPATH += ../../common
-
-LIBS += -lfmradiopresetstorage
-LIBS += -lfmradioenginewrapper
-
-symbian:LIBS += -lxqservice
-symbian:LIBS += -lxqserviceutil
-symbian:LIBS += -lxqsettingsmanager
-
-DEPENDPATH += $$INCLUDEPATH src
-
-# Input
-HEADERS += radiouiengineexport.h
-HEADERS += radiostation.h
-HEADERS += radiostationmodel.h
-HEADERS += radiouiengine.h
-HEADERS += radiohistoryitem.h
-HEADERS += radiohistorydatabase.h
-HEADERS += radiohistorymodel.h
-HEADERS += radioscannerengine.h
-HEADERS += radioservicedef.h
-HEADERS += radionotificationdata.h
-HEADERS += radiogenrelocalizer.h
-HEADERS += radiocontrolservice.h
-HEADERS += radiomonitorservice.h
-
-INTERNAL_HEADERS += radiostation_p.h
-INTERNAL_HEADERS += radiohistoryitem_p.h
-INTERNAL_HEADERS += radiohistorymodel_p.h
-INTERNAL_HEADERS += radiouiengine_p.h
-INTERNAL_HEADERS += radiostationmodel_p.h
-INTERNAL_HEADERS += radioscannerengine_p.h
-
-win32:HEADERS += $$INTERNAL_HEADERS
-
-SOURCES += radiostation.cpp
-SOURCES += radiostation_p.cpp
-SOURCES += radiostationmodel.cpp
-SOURCES += radiostationmodel_p.cpp
-SOURCES += radiouiengine.cpp
-SOURCES += radiouiengine_p.cpp
-SOURCES += radiohistoryitem.cpp
-SOURCES += radiohistoryitem_p.cpp
-SOURCES += radiohistorydatabase.cpp
-SOURCES += radiohistorymodel.cpp
-SOURCES += radiohistorymodel_p.cpp
-SOURCES += radioscannerengine.cpp
-SOURCES += radioscannerengine_p.cpp
-SOURCES += radiocontrolservice.cpp
-SOURCES += radiomonitorservice.cpp
--- a/radioapp/radiouiengine/src/radiocontrolservice.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +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:
-*
-*/
-
-// System includes
-#include <xqserviceutil.h>
-
-// User includes
-#include "radiocontrolservice.h"
-#include "radiouiengine.h"
-#include "radioservicedef.h"
-
-// Constants
-const int SERVICE_POWEROFF_DELAY = 5000;
-
-/*!
- *
- */
-RadioControlService::RadioControlService( RadioUiEngine& engine ) :
-    XQServiceProvider( RADIO_SERVICE +"."+ RADIO_CONTROL_SERVICE, &engine ),
-    mUiEngine( engine )
-{
-    publishAll();
-}
-
-/*!
- *
- */
-RadioControlService::~RadioControlService()
-{
-}
-
-/*!
- * Public slot
- */
-void RadioControlService::command( int commandId )
-{
-    //TODO: Uncomment when vendor id can be read from the client
-//    if ( requestInfo().clientVendorId() != NOKIA_VENDORID ) {
-//        return;
-//    }
-
-    switch ( commandId )
-    {
-        case RadioServiceCommand::PowerOn:
-            mUiEngine.setPowerOn();
-            break;
-
-        case RadioServiceCommand::PowerOff:
-            mUiEngine.setPowerOff( SERVICE_POWEROFF_DELAY );
-            break;
-
-        case RadioServiceCommand::Previous:
-            mUiEngine.skipStation( StationSkip::PreviousFavorite, 0, TuneReason::SkipFromWidget );
-            break;
-
-        case RadioServiceCommand::Next:
-            mUiEngine.skipStation( StationSkip::NextFavorite, 0, TuneReason::SkipFromWidget );
-            break;
-
-        case RadioServiceCommand::SeekUp:
-            mUiEngine.seekStation( Seek::Up );
-            break;
-
-        case RadioServiceCommand::SeekDown:
-            mUiEngine.seekStation( Seek::Down );
-            break;
-
-        case RadioServiceCommand::Foreground:
-            XQServiceUtil::toBackground( false );
-            break;
-
-        case RadioServiceCommand::Background:
-            XQServiceUtil::toBackground( true );
-            break;
-
-        case RadioServiceCommand::Mute:
-            mUiEngine.setMute( true );
-            break;
-
-        case RadioServiceCommand::UnMute:
-            mUiEngine.setMute( false );
-            break;
-
-        default:
-            break;
-    }
-}
--- a/radioapp/radiouiengine/src/radiohistorydatabase.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,188 +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:
-*
-*/
-
-// System includes
-#include <QSqlDatabase>
-#include <QSqlQuery>
-#include <QSqlError>
-#include <QStringList>
-#include <QFile>
-#include <QDateTime>
-#include <QVariant>
-//#include <QSqlRecord>
-
-// User includes
-#include "radiohistorydatabase.h"
-#include "radiologger.h"
-
-static const QLatin1String DATABASE_NAME    ( "radioplayhistory.db" );
-static const QLatin1String DATABASE_DRIVER  ( "QSQLITE" );
-static const QLatin1String HISTORY_TABLE    ( "history" );
-static const QLatin1String SQL_CREATE_TABLE ( "CREATE TABLE history ("
-                                                "id INTEGER PRIMARY KEY AUTOINCREMENT, "
-                                                "artist TEXT NOT NULL, "
-                                                "title TEXT NOT NULL, "
-                                                "station TEXT NOT NULL, "
-                                                "frequency INTEGER NOT NULL, "
-                                                "tagged INTEGER NOT NULL DEFAULT 0, "
-                                                "fromRds INTEGER NOT NULL DEFAULT 1, "
-                                                "time INTEGER NOT NULL)" );
-
-static const QLatin1String SQL_ADD_ITEM     ( "INSERT INTO history (artist,title,station,frequency,fromRds,time) "
-                                                "VALUES ( ?,?,?,?,?,? )" );
-
-static const QLatin1String SQL_SELECT_ALL   ( "SELECT * FROM history ORDER BY id DESC" );
-static const QLatin1String SQL_SELECT_TAGGED( "SELECT * FROM history WHERE tagged=1" );// ORDER BY id DESC";
-
-static const QLatin1String SQL_DELETE_ALL   ( "DELETE FROM history" );
-static const QLatin1String SQL_DELETE_RECENT( "DELETE FROM history WHERE tagged=0" );
-//static const QLatin1String SQL_DELETE_TAGGED    = "DELETE FROM history WHERE tagged=1";
-static const QLatin1String SQL_CLEAR_TAGS   ( "UPDATE history SET tagged = 0 WHERE tagged = 1" );
-
-//static static const QLatin1String SQL_FIND_ITEM_BY_ID( "SELECT * FROM history WHERE id = ?" );
-static const QLatin1String SQL_TOGGLE_TAG   ( "UPDATE history SET tagged = ? WHERE id = ?" );
-
-#ifdef LOGGING_ENABLED
-#   define GET_ERR( param ) GETSTRING( param.lastError().text() )
-#   define GET_ERR_PTR( param ) GETSTRING( param->lastError().text() )
-#endif // LOGGING_ENABLED
-
-/*!
- *
- */
-RadioHistoryDatabase::RadioHistoryDatabase()
-{
-    connectToDatabase();
-}
-
-/*!
- *
- */
-RadioHistoryDatabase::~RadioHistoryDatabase()
-{
-    if ( mDatabase && mDatabase->isOpen() ) {
-        mDatabase->close();
-    }
-}
-
-/*!
- *
- */
-void RadioHistoryDatabase::addItem( const QString& artist,
-                                    const QString& title,
-                                    const QString& stationName,
-                                    uint frequency,
-                                    bool fromRds )
-{
-    LOG_FORMAT( "RadioHistoryModelPrivate::addItem. Artist: %s, Title: %s", GETSTRING( artist ), GETSTRING( title ) );
-
-    QSqlQuery query( *mDatabase );
-    mDatabase->transaction();
-
-    query.prepare( SQL_ADD_ITEM );
-    query.addBindValue( artist );
-    query.addBindValue( title );
-    query.addBindValue( stationName );
-    query.addBindValue( static_cast<int>( frequency / 1000 ) );
-    query.addBindValue( fromRds );
-    query.addBindValue( QDateTime::currentDateTime().toTime_t() );
-
-    commitTransaction( query );
-}
-
-/*!
- *
- */
-void RadioHistoryDatabase::clearRecent()
-{
-    QSqlQuery query( *mDatabase );
-    mDatabase->transaction();
-
-    query.prepare( SQL_CLEAR_TAGS );
-
-    commitTransaction( query );
-}
-
-/*!
- *
- */
-void RadioHistoryDatabase::clearTagged()
-{
-    QSqlQuery query( *mDatabase );
-    mDatabase->transaction();
-
-    query.prepare( SQL_DELETE_ALL );
-
-    commitTransaction( query );
-}
-
-/*!
- *
- */
-bool RadioHistoryDatabase::connectToDatabase()
-{
-    LOG_METHOD;
-    QSqlDatabase db = QSqlDatabase::addDatabase( DATABASE_DRIVER );
-    if ( db.isValid() ) {
-        mDatabase.reset( new QSqlDatabase( db ) );
-        mDatabase->setDatabaseName( DATABASE_NAME );
-
-        if ( !mDatabase->open() ) {
-            LOG_FORMAT( "Failed to open database! error = %s", GET_ERR_PTR( mDatabase ) );
-            mDatabase.reset();
-            return false;
-        }
-
-        // Create the table if it does not exist
-        if ( !mDatabase->tables().contains( HISTORY_TABLE ) ) {
-            LOG( "RadioHistoryModelPrivate::connectToDatabase: Creating database tables." );
-            QSqlQuery query;
-            if ( !query.exec( SQL_CREATE_TABLE ) ) {
-                LOG_FORMAT( "Database creation failed! error = %s", GET_ERR( query ) );
-                mDatabase->close();
-                mDatabase.reset();
-                return false;
-            }
-        }
-    } else {
-        LOG_FORMAT( "Invalid database! error = %s", GET_ERR( db ) );
-        return false;
-    }
-
-    return true;
-}
-
-/*!
- *
- */
-void RadioHistoryDatabase::commitTransaction( QSqlQuery& query )
-{
-    LOG_METHOD;
-
-    bool success = false;
-    Q_UNUSED( success );
-    if ( query.exec() ) {
-
-        success = mDatabase->commit();
-        LOG_ASSERT( success, LOG_FORMAT( "Commit failed! err: %s", GET_ERR_PTR( mDatabase ) ) );
-
-    } else {
-        LOG_FORMAT( "RadioHistoryModelPrivate::commitTransaction FAILED, rolling back: error = %s", GET_ERR( query ) );
-        success = mDatabase->rollback();
-        LOG_ASSERT( success, LOG_FORMAT( "Rollback failed! err: %s", GET_ERR_PTR( mDatabase ) ) );
-    }
-}
--- a/radioapp/radiouiengine/src/radiohistoryitem.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,203 +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:
-*
-*/
-
-// User includes
-#include "radiohistoryitem.h"
-#include "radiohistoryitem_p.h"
-
-/**
- * Static shared data instance that is used by all default-constructed RadioStation instances
- */
-Q_GLOBAL_STATIC( RadioHistoryItemPrivate, shared_null )
-
-
-/*!
- *
- */
-RadioHistoryItem::RadioHistoryItem() :
-    mData( shared_null() )
-{
-    mData->ref.ref();
-}
-
-/*!
- *
- */
-RadioHistoryItem::RadioHistoryItem( const QString& artist, const QString& title ) :
-    mData( new RadioHistoryItemPrivate( artist, title ) )
-{
-}
-
-/*!
- *
- */
-RadioHistoryItem::RadioHistoryItem( const RadioHistoryItem& other ) :
-    mData( other.mData )
-{
-}
-
-/*!
- *
- */
-RadioHistoryItem::~RadioHistoryItem()
-{
-}
-
-/*!
- *
- */
-RadioHistoryItem& RadioHistoryItem::operator=( const RadioHistoryItem& other )
-{
-    mData = other.mData;
-    return *this;
-}
-
-/*!
- *
- */
-bool RadioHistoryItem::isValid() const
-{
-    return id() != 0 && !title().isEmpty();
-}
-
-/*!
- *
- */
-void RadioHistoryItem::reset()
-{
-    mData = shared_null();
-}
-
-/*!
- *
- */
-int RadioHistoryItem::id() const
-{
-    return mData->mId;
-}
-
-/*!
- *
- */
-QString RadioHistoryItem::artist() const
-{
-    return mData->mArtist;
-}
-
-/*!
- *
- */
-void RadioHistoryItem::setArtist( const QString& artist )
-{
-    if ( artist.compare( mData->mArtist ) != 0 ) {
-        mData->mArtist = artist;
-    }
-}
-
-/*!
- *
- */
-QString RadioHistoryItem::title() const
-{
-    return mData->mTitle;
-}
-
-/*!
- *
- */
-void RadioHistoryItem::setTitle( const QString& title )
-{
-    if ( title.compare( mData->mTitle ) != 0 ) {
-        mData->mTitle = title;
-    }
-}
-
-/*!
- *
- */
-QString RadioHistoryItem::station() const
-{
-    return mData->mStation;
-}
-
-/*!
- *
- */
-void RadioHistoryItem::setStation( const QString& station )
-{
-    if ( station.compare( mData->mStation ) != 0 ) {
-        mData->mStation = station;
-    }
-}
-
-/*!
- *
- */
-uint RadioHistoryItem::frequency() const
-{
-    return mData->mFrequency;
-}
-
-/*!
- *
- */
-void RadioHistoryItem::setFrequency( uint frequency )
-{
-    if ( frequency != mData->mFrequency ) {
-        mData->mFrequency = frequency;
-    }
-}
-
-/*!
- *
- */
-QString RadioHistoryItem::time() const
-{
-    return mData->mTime.toString();
-}
-
-/*!
- *
- */
-void RadioHistoryItem::setCurrentTime()
-{
-    mData->mTime = QDateTime::currentDateTime();
-}
-
-/*!
- *
- */
-bool RadioHistoryItem::isTagged() const
-{
-    return mData->mTagged;
-}
-
-/*!
- *
- */
-bool RadioHistoryItem::isRecognizedByRds() const
-{
-    return mData->mFromRds;
-}
-
-/*!
- *
- */
-bool RadioHistoryItem::isDetached() const
-{
-    return mData->ref == 1;
-}
--- a/radioapp/radiouiengine/src/radiohistoryitem_p.cpp	Tue Aug 31 15:15:02 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:
-*
-*/
-
-// System includes
-#include <QSqlRecord>
-#include <QVariant>
-
-// User includes
-#include "radiohistoryitem.h"
-#include "radiohistoryitem_p.h"
-
-/*!
- *
- */
-RadioHistoryItemPrivate::RadioHistoryItemPrivate()
-{
-    init( "", "" );
-}
-
-/*!
- *
- */
-RadioHistoryItemPrivate::RadioHistoryItemPrivate( const RadioHistoryItemPrivate& other ) :
-    QSharedData( other ),
-    mId( other.mId ),
-    mArtist( other.mArtist ),
-    mTitle( other.mTitle ),
-    mFrequency( other.mFrequency ),
-    mTagged( other.mTagged ),
-    mFromRds( other.mFromRds )
-{
-}
-
-/*!
- *
- */
-RadioHistoryItemPrivate::RadioHistoryItemPrivate( const QString& artist,
-                                                  const QString& title )
-{
-    init( artist, title );
-}
-
-/*!
- *
- */
-void RadioHistoryItemPrivate::init( const QString& artist, const QString& title )
-{
-    mId = -1;
-    mArtist = artist;
-    mTitle = title;
-    mFrequency = 0;
-    mTagged = false;
-    mFromRds = true;
-}
-
-/*!
- *
- */
-void RadioHistoryItemPrivate::initFromRecord( const QSqlRecord& record )
-{
-    mId = record.value( RadioHistoryValue::Id ).toInt();
-    mArtist = record.value( RadioHistoryValue::Artist ).toString();
-    mTitle = record.value( RadioHistoryValue::Title ).toString();
-    mFrequency = record.value( RadioHistoryValue::Frequency ).toUInt() * 1000;
-    mStation = record.value( RadioHistoryValue::Station ).toString();
-    mTagged = record.value( RadioHistoryValue::Tagged ).toBool();
-    mFromRds = record.value( RadioHistoryValue::FromRds ).toBool();
-    mTime = record.value( RadioHistoryValue::Time ).toDateTime();
-}
--- a/radioapp/radiouiengine/src/radiohistorymodel.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,225 +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:
-*
-*/
-
-// System includes
-#include <QStringList>
-
-// User includes
-#include "radiohistorymodel.h"
-#include "radiohistorymodel_p.h"
-#include "radiouiengine.h"
-#include "radiohistoryitem.h"
-#include "radiostation.h"
-#include "radiouiengine.h"
-#include "radio_global.h"
-#include "radiologger.h"
-
-/*!
- *
- */
-RadioHistoryModel::RadioHistoryModel( RadioUiEngine& uiEngine ) :
-    QAbstractListModel( &uiEngine ),
-    d_ptr( new RadioHistoryModelPrivate( this, uiEngine ) )
-{
-    Radio::connect( &uiEngine,  SIGNAL(tunedToFrequency(uint,int)),
-                    this,       SLOT(resetCurrentSong()) );
-    Radio::connect( &uiEngine,  SIGNAL(seekingStarted(int)),
-                    this,       SLOT(resetCurrentSong()) );
-
-    Q_D( RadioHistoryModel );
-    d->connectToDatabase();
-}
-
-/*!
- *
- */
-RadioHistoryModel::~RadioHistoryModel()
-{
-}
-
-/*!
- * \reimp
- */
-int RadioHistoryModel::rowCount( const QModelIndex& parent ) const
-{
-    Q_UNUSED( parent );
-    Q_D( const RadioHistoryModel );
-    return d->rowCount();
-}
-
-/*!
- * \reimp
- */
-QVariant RadioHistoryModel::data( const QModelIndex& index, int role ) const
-{
-    if ( !index.isValid() ) {
-        return QVariant();
-    }
-
-    Q_D( const RadioHistoryModel );
-    return d->data( index.row(), role );
-}
-
-/*!
- * Public slot
- */
-void RadioHistoryModel::resetCurrentSong()
-{
-    Q_D( RadioHistoryModel );
-    d->mTopItemIsPlaying = false;
-    emit currentSongReset();
-}
-
-/*!
- * Sets the icons to be used in the list
- */
-void RadioHistoryModel::setIcons( const QIcon& nonTaggedIcon, const QIcon& taggedIcon )
-{
-    Q_D( RadioHistoryModel );
-    d->mNonTaggedIcon = nonTaggedIcon;
-    d->mTaggedIcon = taggedIcon;
-}
-
-/*!
- *
- */
-bool RadioHistoryModel::isCurrentSongRecognized() const
-{
-    Q_D( const RadioHistoryModel );
-    return d->mTopItemIsPlaying;
-}
-
-/*!
- *
- */
-void RadioHistoryModel::setShowDetails( bool showDetails )
-{
-    Q_D( RadioHistoryModel );
-    d->mShowDetails = showDetails;
-    reset();
-}
-
-/*!
- *
- */
-void RadioHistoryModel::setShowTagged( bool showTagged )
-{
-    Q_D( RadioHistoryModel );
-    d->setViewMode( showTagged ? RadioHistoryModelPrivate::ShowTagged : RadioHistoryModelPrivate::ShowAll );
-    reset();
-}
-
-/*!
- *
- */
-void RadioHistoryModel::toggleTagging( const RadioHistoryItem& item, const int row )
-{
-    Q_D( RadioHistoryModel );
-    d->toggleTagging( item, row );
-}
-
-/*!
- *
- */
-RadioHistoryItem RadioHistoryModel::itemAtIndex( const QModelIndex& index ) const
-{
-    Q_D( const RadioHistoryModel );
-    return d->itemAtIndex( index );
-}
-
-/*!
- *
- */
-void RadioHistoryModel::removeAll( bool removeTagged )
-{
-    Q_D( RadioHistoryModel );
-    d->removeAll( removeTagged );
-}
-
-/*!
- *
- */
-void RadioHistoryModel::addItem( const QString& artist, const QString& title, const RadioStation& station )
-{
-    Q_D( RadioHistoryModel );
-    d->addItem( artist, title, station );
-}
-
-/*!
- *
- */
-void RadioHistoryModel::clearRadioTextPlus()
-{
-    Q_D( RadioHistoryModel );
-    d->mRtItemHolder = "";
-    resetCurrentSong();
-}
-
-/*!
- *
- */
-void RadioHistoryModel::addRadioTextPlus( int rtClass, const QString& rtItem, const RadioStation& station )
-{
-    if ( rtClass == RtPlus::Dummy || rtClass == RtPlus::Artist || rtClass == RtPlus::Title ) {
-        Q_D( RadioHistoryModel );
-        if ( d->mRtItemClass == -1 ) {
-            d->mRtItemClass = rtClass;
-            d->mRtItemHolder = rtItem;
-        } else {
-            // Received: Artist - Title
-            if ( d->mRtItemClass == RtPlus::Artist && rtClass == RtPlus::Title ) {
-                addItem( d->mRtItemHolder, rtItem, station );
-
-            // Received: Title - Artist
-            } else if ( rtClass == RtPlus::Artist && d->mRtItemClass == RtPlus::Title ) {
-                addItem( rtItem, d->mRtItemHolder, station );
-
-            // Received: Dummy - Title
-            } else if ( d->mRtItemClass == RtPlus::Dummy && rtClass == RtPlus::Title ) {
-                addItem( "", rtItem, station );
-
-            // Received: Title - Dummy
-            } else if ( rtClass == RtPlus::Dummy && d->mRtItemClass == RtPlus::Title ) {
-                addItem( "", d->mRtItemHolder, station );
-            }
-
-            d->mRtItemHolder = "";
-            d->mRtItemClass = -1;
-        }
-    }
-}
-
-/*!
- *
- */
-void RadioHistoryModel::reportChangedData( int start, int end )
-{
-    if ( end == -1 ) {
-        end = start;
-    }
-    const QModelIndex startIndex = index( start, 0, QModelIndex() );
-    const QModelIndex endIndex = index( end, 0, QModelIndex() );
-    emit dataChanged( startIndex, endIndex );
-}
-
-/*!
- *
- */
-void RadioHistoryModel::emitItemAdded()
-{
-    emit itemAdded();
-}
--- a/radioapp/radiouiengine/src/radiohistorymodel_p.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,358 +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:
-*
-*/
-
-// System includes
-#include <QSqlDatabase>
-#include <QFile>
-#include <QDateTime>
-#include <QVariant>
-#include <QStringList>
-#include <QSqlError>
-#include <QSqlQueryModel>
-#include <QSqlRecord>
-
-// User includes
-#include "radiohistorymodel_p.h"
-#include "radiohistorymodel.h"
-#include "radiohistoryitem.h"
-#include "radiohistoryitem_p.h"
-#include "radiostation.h"
-#include "radiologger.h"
-
-static const QLatin1String DATABASE_NAME    ( "radioplayhistory.db" );
-static const QLatin1String DATABASE_DRIVER  ( "QSQLITE" );
-static const QLatin1String HISTORY_TABLE    ( "history" );
-static const QLatin1String SQL_CREATE_TABLE ( "CREATE TABLE history ("
-                                                "id INTEGER PRIMARY KEY AUTOINCREMENT, "
-                                                "artist TEXT NOT NULL, "
-                                                "title TEXT NOT NULL, "
-                                                "station TEXT NOT NULL, "
-                                                "frequency INTEGER NOT NULL, "
-                                                "tagged INTEGER NOT NULL DEFAULT 0, "
-                                                "fromRds INTEGER NOT NULL DEFAULT 1, "
-                                                "time INTEGER NOT NULL)" );
-
-static const QLatin1String SQL_ADD_ITEM     ( "INSERT INTO history (artist,title,station,frequency,fromRds,time) "
-                                                "VALUES ( ?,?,?,?,?,? )" );
-
-static const QLatin1String SQL_SELECT_ALL   ( "SELECT * FROM history ORDER BY id DESC" );
-static const QLatin1String SQL_SELECT_TAGGED( "SELECT * FROM history WHERE tagged=1" );// ORDER BY id DESC";
-
-static const QLatin1String SQL_DELETE_ALL   ( "DELETE FROM history" );
-static const QLatin1String SQL_DELETE_RECENT( "DELETE FROM history WHERE tagged=0" );
-//static const QLatin1String SQL_DELETE_TAGGED    = "DELETE FROM history WHERE tagged=1";
-static const QLatin1String SQL_CLEAR_TAGS   ( "UPDATE history SET tagged = 0 WHERE tagged = 1" );
-
-//static static const QLatin1String SQL_FIND_ITEM_BY_ID( "SELECT * FROM history WHERE id = ?" );
-static const QLatin1String SQL_TOGGLE_TAG   ( "UPDATE history SET tagged = ? WHERE id = ?" );
-
-#ifdef LOGGING_ENABLED
-#   define GET_ERR( param ) GETSTRING( param.lastError().text() )
-#   define GET_ERR_PTR( param ) GETSTRING( param->lastError().text() )
-#endif // LOGGING_ENABLED
-
-/*!
- * Static utility function to parse a frequency
- */
-static  QString parseFrequency( const uint frequency )
-{
-    QString loc = qtTrId( "txt_rad_dblist_val_l1_mhz" );
-    return loc.arg( RadioStation::parseFrequency( frequency ) );
-}
-
-/*!
- *
- */
-RadioHistoryModelPrivate::RadioHistoryModelPrivate( RadioHistoryModel* model,
-                                                    RadioUiEngine& uiEngine ) :
-    q_ptr( model ),
-    mUiEngine( uiEngine ),
-    mRtItemClass( -1 ),
-    mTopItemIsPlaying( false ),
-    mShowDetails( true ),
-    mViewMode( ShowAll )
-{
-}
-
-/*!
- *
- */
-RadioHistoryModelPrivate::~RadioHistoryModelPrivate()
-{
-    if ( mDatabase && mDatabase->isOpen() ) {
-        mDatabase->close();
-    }
-}
-
-/*!
- *
- */
-bool RadioHistoryModelPrivate::connectToDatabase()
-{
-    LOG_METHOD;
-    QSqlDatabase db = QSqlDatabase::addDatabase( DATABASE_DRIVER );
-    if ( db.isValid() ) {
-        mDatabase.reset( new QSqlDatabase( db ) );
-        mDatabase->setDatabaseName( DATABASE_NAME );
-
-        if ( !mDatabase->open() ) {
-            LOG_FORMAT( "Failed to open database! error = %s", GET_ERR_PTR( mDatabase ) );
-            mDatabase.reset();
-            return false;
-        }
-
-        // Create the table if it does not exist
-        if ( !mDatabase->tables().contains( HISTORY_TABLE ) ) {
-            LOG( "RadioHistoryModelPrivate::connectToDatabase: Creating database tables." );
-            QSqlQuery query;
-            if ( !query.exec( SQL_CREATE_TABLE ) ) {
-                LOG_FORMAT( "Database creation failed! error = %s", GET_ERR( query ) );
-                mDatabase->close();
-                mDatabase.reset();
-                return false;
-            }
-        }
-    } else {
-        LOG_FORMAT( "Invalid database! error = %s", GET_ERR( db ) );
-        return false;
-    }
-
-    mQueryModel.reset( new QSqlQueryModel() );
-    setViewMode( ShowAll );
-
-    return mQueryModel->lastError().type() == QSqlError::NoError;
-}
-
-/*!
- *
- */
-void RadioHistoryModelPrivate::addItem( const QString& artist,
-                                        const QString& title,
-                                        const RadioStation& station,
-                                        bool fromRds )
-{
-    LOG_FORMAT( "RadioHistoryModelPrivate::addItem. Artist: %s, Title: %s", GETSTRING( artist ), GETSTRING( title ) );
-
-    if ( !mQueryModel ) {
-        return;
-    }
-
-    mTopItemIsPlaying = true;
-
-    QSqlQuery query = beginTransaction();
-
-    query.prepare( SQL_ADD_ITEM );
-    query.addBindValue( artist );
-    query.addBindValue( title );
-    query.addBindValue( station.name() );
-    query.addBindValue( static_cast<int>( station.frequency() / 1000 ) );
-    query.addBindValue( fromRds );
-    query.addBindValue( QDateTime::currentDateTime().toTime_t() );
-
-    commitTransaction( query, InsertRows, 0 );
-}
-
-/*!
- *
- */
-int RadioHistoryModelPrivate::rowCount() const
-{
-    if ( !mQueryModel ) {
-        return 0;
-    }
-    return mQueryModel->rowCount();
-}
-
-/*!
- *
- */
-QVariant RadioHistoryModelPrivate::data( const int row, const int role ) const
-{
-    if ( mQueryModel->lastError().type() == QSqlError::NoError ) {
-
-        QSqlRecord record = mQueryModel->record( row );
-        if ( role == Qt::DisplayRole ) {
-
-            const QString artist = record.value( RadioHistoryValue::Artist ).toString();
-            const QString title = record.value( RadioHistoryValue::Title ).toString();
-            const QString station = record.value( RadioHistoryValue::Station ).toString();
-            const uint frequency = record.value( RadioHistoryValue::Frequency ).toUInt() * 1000;
-
-            QStringList list;
-            if ( mShowDetails ) {
-                QString formatter = qtTrId( "txt_rad_dblist_1_2" );
-                LOG_FORMAT( "---formatter--- %s", GETSTRING( formatter ) );
-                formatter = "%1 - %2";  // TODO!
-
-                const QString firstRow = QString( formatter ).arg( artist ).arg( title );
-                LOG_FORMAT( "---firstRow--- %s", GETSTRING( firstRow ) );
-                list.append( firstRow );
-
-                const uint timeInSecs = record.value( RadioHistoryValue::Time ).toUInt();
-                QDateTime dateTime;
-                dateTime.setTime_t( timeInSecs );
-
-                QString time = dateTime.toString( Qt::SystemLocaleShortDate );
-                LOG_FORMAT( "---time--- %s", GETSTRING( time ) );
-
-                QString name = !station.isEmpty() ? station : parseFrequency( frequency );
-                LOG_FORMAT( "---name--- %s", GETSTRING( name ) );
-                const QString secondRow = QString( formatter ).arg( time ).arg( name );
-                LOG_FORMAT( "---secondRow--- %s", GETSTRING( secondRow ) );
-
-                list.append( secondRow );
-            } else {
-                list.append( artist );
-                list.append( title );
-            }
-
-            return list;
-        } else if ( role == Qt::DecorationRole ) {
-            QVariantList list;
-            const bool tagged = record.value( RadioHistoryValue::Tagged ).toBool();
-            if ( tagged ) {
-                list.append( mTaggedIcon );
-            } else {
-                list.append( mNonTaggedIcon );
-            }
-            return list;
-        }
-    }
-
-    return QVariant();
-}
-
-/*!
- *
- */
-void RadioHistoryModelPrivate::removeAll( bool removeTagged )
-{
-    if ( !mQueryModel ) {
-        return;
-    }
-
-    QSqlQuery query = beginTransaction();
-
-    query.prepare( removeTagged ? SQL_CLEAR_TAGS : SQL_DELETE_ALL );
-
-    // Commented out because rowsRemoved() seems to crash HbListView
-//    commitTransaction( query, RemoveRows, 0, rowCount() - 1 );
-
-    commitTransaction( query, NoOp, 0 );
-    q_ptr->reset();
-}
-
-/*!
- *
- */
-void RadioHistoryModelPrivate::setViewMode( ViewMode mode )
-{
-    if ( !mQueryModel ) {
-        return;
-    }
-
-    mViewMode = mode;
-    mQueryModel->setQuery( mode == ShowTagged ? SQL_SELECT_TAGGED : SQL_SELECT_ALL, *mDatabase );
-}
-
-/*!
- *
- */
-void RadioHistoryModelPrivate::toggleTagging( const RadioHistoryItem& item, const int row )
-{
-    QSqlQuery updateQuery = beginTransaction();
-
-    updateQuery.prepare( SQL_TOGGLE_TAG );
-    updateQuery.addBindValue( item.isTagged() ? 0 : 1 );
-    updateQuery.addBindValue( item.id() );
-
-    Operation operation = ChangeData;
-    if ( mViewMode == ShowTagged && item.isTagged() ) {
-        operation = RemoveRows;
-    }
-    commitTransaction( updateQuery, operation, row );
-}
-
-/*!
- *
- */
-RadioHistoryItem RadioHistoryModelPrivate::itemAtIndex( const QModelIndex& index ) const
-{
-    LOG_METHOD;
-    RadioHistoryItem item;
-    QSqlRecord record = mQueryModel->record( index.row() );
-    item.data_ptr()->initFromRecord( record );
-    return item;
-}
-
-/*!
- *
- */
-void RadioHistoryModelPrivate::refreshModel()
-{
-    setViewMode( mViewMode );
-}
-
-/*!
- *
- */
-QSqlQuery RadioHistoryModelPrivate::beginTransaction()
-{
-    LOG_METHOD;
-    QSqlQuery newQuery( *mDatabase );
-    mDatabase->transaction();
-    return newQuery;
-}
-
-/*!
- *
- */
-void RadioHistoryModelPrivate::commitTransaction( QSqlQuery& query, Operation operation, int start, int end )
-{
-    LOG_METHOD;
-    if ( end == -1 ) {
-        end = start;
-    }
-
-    bool success = false;
-    Q_UNUSED( success );
-    if ( query.exec() ) {
-        if ( operation == InsertRows ) {
-            q_ptr->beginInsertRows( QModelIndex(), start, end );
-        } else if ( operation == RemoveRows ) {
-            q_ptr->beginRemoveRows( QModelIndex(), start, end );
-        }
-
-        success = mDatabase->commit();
-        LOG_ASSERT( success, LOG_FORMAT( "Commit failed! err: %s", GET_ERR_PTR( mDatabase ) ) );
-
-        refreshModel();
-
-        if ( operation == InsertRows ) {
-            q_ptr->endInsertRows();
-            q_ptr->emitItemAdded();
-        } else if ( operation == RemoveRows ) {
-            q_ptr->endRemoveRows();
-        } else if ( operation == ChangeData ) {
-            q_ptr->reportChangedData( start );
-        }
-    } else {
-        LOG_FORMAT( "RadioHistoryModelPrivate::commitTransaction FAILED, rolling back: error = %s", GET_ERR( query ) );
-        success = mDatabase->rollback();
-        LOG_ASSERT( success, LOG_FORMAT( "Rollback failed! err: %s", GET_ERR_PTR( mDatabase ) ) );
-    }
-}
--- a/radioapp/radiouiengine/src/radiomonitorservice.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,323 +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:
-*
-*/
-
-// System includes
-#include <QTimer>
-#include <QRegExp>
-
-// User includes
-#include "radiomonitorservice.h"
-#include "radiouiengine.h"
-#include "radiouiengine_p.h"
-#include "radiostationmodel.h"
-#include "radioenginewrapper.h"
-#include "radioscannerengine.h"
-#include "radiostation.h"
-#include "radioservicedef.h"
-#include "radionotificationdata.h"
-#include "radiologger.h"
-
-// Constants
-const int NOTIFICATION_DELAY = 200;
-
-#define RUN_NOTIFY( type, data ) \
-    do { \
-        QVariant variant; \
-        variant.setValue( RadioNotificationData( RadioServiceNotification::type, data ) ); \
-        notify( variant ); \
-    } while ( 0 )
-
-/*!
- *
- */
-RadioMonitorService::RadioMonitorService( RadioUiEnginePrivate& engine ) :
-    XQServiceProvider( RADIO_SERVICE +"."+ RADIO_MONITOR_SERVICE, &engine.api() ),
-    mUiEngine( engine ),
-    mRadioStatus( RadioStatus::UnSpecified ),
-    mNotificationTimer( new QTimer( this ) )
-{
-    mNotificationTimer->setSingleShot( true );
-    mNotificationTimer->setInterval( NOTIFICATION_DELAY );
-    Radio::connect( mNotificationTimer, SIGNAL(timeout()),
-                    this,               SLOT(sendNotifications()) );
-
-    publishAll();
-}
-
-/*!
- *
- */
-RadioMonitorService::~RadioMonitorService()
-{
-}
-
-/*!
- *
- */
-void RadioMonitorService::init()
-{
-    RadioStationModel* stationModel = &mUiEngine.api().stationModel();
-    Radio::connect( stationModel,   SIGNAL(rowsRemoved(QModelIndex,int,int)),
-                    this,           SLOT(notifyFavoriteCount()) );
-    Radio::connect( stationModel,   SIGNAL(favoriteChanged(RadioStation)),
-                    this,           SLOT(notifyFavoriteCount()) );
-    Radio::connect( stationModel,   SIGNAL(stationDataChanged(RadioStation)),
-                    this,           SLOT(notifyStationChange(RadioStation)) );
-    Radio::connect( stationModel,   SIGNAL(radioTextReceived(RadioStation)),
-                    this,           SLOT(notifyStationChange(RadioStation)) );
-
-    RadioUiEngine* uiEngine = &mUiEngine.api();
-    Radio::connect( uiEngine,       SIGNAL(seekingStarted(int)),
-                    this,           SLOT(notifyRadioStatus()) );
-    Radio::connect( uiEngine,       SIGNAL(muteChanged(bool)),
-                    this,           SLOT(notifyRadioStatus()) );
-    Radio::connect( uiEngine,       SIGNAL(antennaStatusChanged(bool)),
-                    this,           SLOT(notifyRadioStatus()) );
-    Radio::connect( uiEngine,       SIGNAL(powerOffRequested()),
-                    this,           SLOT(notifyRadioStatus()) );
-
-    mUiEngine.wrapper().addObserver( this );
-
-    notifyRadioStatus();
-}
-
-/*!
- * Public slot
- *
- */
-void RadioMonitorService::requestNotifications()
-{
-    //TODO: Uncomment when vendor id can be read from the client
-//    if ( requestInfo().clientVendorId() == NOKIA_VENDORID ) {
-        mRequestIndexes.append( setCurrentRequestAsync() );
-//    }
-}
-
-/*!
- * Public slot
- *
- */
-void RadioMonitorService::requestAllData()
-{
-    RadioStationModel& stationModel = mUiEngine.api().stationModel();
-    const RadioStation station = stationModel.currentStation();
-
-    QVariantList notificationList;
-    QVariant notification;
-
-    RadioStatus::Status radioStatus = determineRadioStatus();
-    notification.setValue( RadioNotificationData( RadioServiceNotification::RadioStatus, radioStatus ) );
-    notificationList.append( notification );
-
-    notification.setValue( RadioNotificationData( RadioServiceNotification::FavoriteCount, stationModel.favoriteCount() ) );
-    notificationList.append( notification );
-
-    notification.setValue( RadioNotificationData( RadioServiceNotification::Frequency, RadioStation::parseFrequency( station.frequency() ) ) );
-    notificationList.append( notification );
-
-    if ( !station.name().isEmpty() ) {
-        notification.setValue( RadioNotificationData( RadioServiceNotification::Name, station.name() ) );
-        notificationList.append( notification );
-    }
-
-    if ( station.genre() > 0 ) {
-        notification.setValue( RadioNotificationData( RadioServiceNotification::Genre,
-                        mUiEngine.api().genreToString( station.genre(), GenreTarget::HomeScreen ) ) );
-        notificationList.append( notification );
-    }
-
-    if ( !station.radioText().isEmpty() ) {
-        const QString trimmedRadioText = trimHtmlTags( station.radioText() );
-        notification.setValue( RadioNotificationData( RadioServiceNotification::RadioText, trimmedRadioText ) );
-        notificationList.append( notification );
-    }
-
-    if ( !station.dynamicPsText().isEmpty() ) {
-        notification.setValue( RadioNotificationData( RadioServiceNotification::DynamicPS, station.dynamicPsText() ) );
-        notificationList.append( notification );
-    }
-
-    checkIfCurrentStationIsFavorite();
-
-    completeRequest( setCurrentRequestAsync(), notificationList );
-}
-
-/*!
- * Private slot
- */
-void RadioMonitorService::notifyRadioStatus()
-{
-    RadioStatus::Status radioStatus = determineRadioStatus();
-
-    if ( radioStatus != mRadioStatus ) {
-        if ( radioStatus == RadioStatus::Seeking ) {
-            if ( RadioScannerEngine* scannerEngine = mUiEngine.api().scannerEngine() ) {
-                Radio::connect( scannerEngine,  SIGNAL(destroyed()),
-                                this,           SLOT(notifyRadioStatus()) );
-            }
-        }
-
-        mRadioStatus = radioStatus;
-        RUN_NOTIFY( RadioStatus, radioStatus );
-    }
-}
-
-/*!
- * Private slot
- *
- */
-void RadioMonitorService::notifyFavoriteCount()
-{
-    const int favoriteCount = mUiEngine.api().stationModel().favoriteCount();
-    RUN_NOTIFY( FavoriteCount, favoriteCount );
-
-    if ( favoriteCount == 1 ) {
-        checkIfCurrentStationIsFavorite();
-    }
-}
-
-/*!
- * Private slot
- *
- */
-void RadioMonitorService::notifyStationChange( const RadioStation& station )
-{
-    RadioUiEngine& uiEngine = mUiEngine.api();
-    if ( uiEngine.isScanning() ) {
-        return;
-    }
-
-    QVariantList list;
-    QVariant notification;
-
-    if ( station.hasDataChanged( RadioStation::GenreChanged ) ) {
-        const QString genre = uiEngine.genreToString( station.genre(), GenreTarget::HomeScreen );
-        notification.setValue( RadioNotificationData( RadioServiceNotification::Genre, genre ) );
-        list.append( notification );
-    }
-
-    if ( station.hasDataChanged( RadioStation::DynamicPsChanged ) ) {
-        notification.setValue( RadioNotificationData( RadioServiceNotification::DynamicPS, station.dynamicPsText() ) );
-        list.append( notification );
-    }
-
-    if ( station.hasDataChanged( RadioStation::NameChanged ) ) {
-        notification.setValue( RadioNotificationData( RadioServiceNotification::Name, station.name() ) );
-        list.append( notification );
-    }
-
-    if ( station.hasDataChanged( RadioStation::RadioTextChanged ) ) {
-        const QString trimmedRadioText = trimHtmlTags( station.radioText() );
-        notification.setValue( RadioNotificationData( RadioServiceNotification::RadioText, trimmedRadioText ) );
-        list.append( notification );
-    }
-
-    notifyList( list );
-}
-
-/*!
- * Private slot
- *
- */
-void RadioMonitorService::sendNotifications()
-{
-    notifyList( mNotificationList );
-    mNotificationList.clear();
-}
-
-/*!
- * \reimp
- */
-void RadioMonitorService::tunedToFrequency( uint frequency, int reason )
-{
-    Q_UNUSED( reason );
-    if ( !mUiEngine.api().isScanning() ) {
-        RUN_NOTIFY( Frequency, RadioStation::parseFrequency( frequency ) );
-        RadioStation station;
-        if ( mUiEngine.api().stationModel().findFrequency( frequency, station ) && !station.name().isEmpty() ) {
-            RUN_NOTIFY( Name, station.name() );
-        }
-
-        const int favoriteCount = mUiEngine.api().stationModel().favoriteCount();
-        if ( favoriteCount == 1 ) {
-            checkIfCurrentStationIsFavorite();
-        }
-    }
-}
-
-/*!
- *
- */
-RadioStatus::Status RadioMonitorService::determineRadioStatus() const
-{
-    RadioUiEngine& uiEngine = mUiEngine.api();
-    if ( uiEngine.isPoweringOff() ) {
-        return RadioStatus::PoweringOff;
-    } else if ( uiEngine.isScanning() ) {
-        return RadioStatus::Seeking;
-    } else if ( !uiEngine.isAntennaAttached() ) {
-        return RadioStatus::NoAntenna;
-    } else if ( uiEngine.isMuted() ) {
-        return RadioStatus::Muted;
-    }
-
-    return RadioStatus::Playing;
-}
-
-/*!
- *
- */
-void RadioMonitorService::checkIfCurrentStationIsFavorite()
-{
-    const bool currentIsFavorite = mUiEngine.api().stationModel().currentStation().isFavorite();
-    RUN_NOTIFY( CurrentIsFavorite, currentIsFavorite );
-}
-
-/*!
- *
- */
-QString RadioMonitorService::trimHtmlTags( const QString& html )
-{
-    QString trimmed = html;
-    QRegExp rex( "<.+>" );
-    rex.setMinimal( true );
-    trimmed.remove( rex );
-    return trimmed;
-}
-
-/*!
- *
- */
-void RadioMonitorService::notify( const QVariant& notification )
-{
-    mNotificationTimer->stop();
-    mNotificationList.append( notification );
-    mNotificationTimer->start();
-}
-
-/*!
- *
- */
-void RadioMonitorService::notifyList( const QVariantList& list )
-{
-    if ( mRequestIndexes.count() > 0 && list.count() > 0 ) {
-        foreach ( int requestIndex, mRequestIndexes ) {
-            completeRequest( requestIndex, list );
-        }
-        mRequestIndexes.clear();
-    }
-}
--- a/radioapp/radiouiengine/src/radioscannerengine.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +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:
-*
-*/
-
-// System includes
-#include <QTimer>
-
-// User includes
-#include "radioscannerengine.h"
-#include "radioscannerengine_p.h"
-#include "radiouiengine.h"
-#include "radiouiengine_p.h"
-#include "radioenginewrapper.h"
-#include "radiostationhandlerif.h"
-#include "radiostationmodel.h"
-#include "radiostation.h"
-#include "radiologger.h"
-
-/*!
- *
- */
-RadioScannerEngine::RadioScannerEngine( RadioUiEnginePrivate& uiEngine ) :
-    QObject( &uiEngine.api() ),
-    d_ptr( new RadioScannerEnginePrivate( this, uiEngine ) )
-{
-}
-
-/*!
- *
- */
-RadioScannerEngine::~RadioScannerEngine()
-{
-    cancel();
-}
-
-/*!
- * Starts the scanning from minimum frequency
- */
-void RadioScannerEngine::startScanning()
-{
-    Q_D( RadioScannerEngine );
-    d->mUiEngine.cancelSeeking();
-
-//    d->mUiEngine.wrapper().setRdsEnabled( false );
-
-    d->mIsScanning = true;
-
-    if ( !d->mUiEngine.api().isMuted() ) {
-        d->mUiEngine.api().setMute( true );
-        d->mMutedByScanner = true;
-    }
-
-    d->mUiEngine.api().emitSeekingStarted( Seek::Up );
-
-    d->mUiEngine.api().stationModel().removeAll( RadioStationModel::RemoveLocalStations );
-    d->mLastFoundFrequency = d->mUiEngine.api().minFrequency();
-
-    if ( d->mUiEngine.wrapper().currentFrequency() == d->mLastFoundFrequency ) {
-        // Engine was already at the minimun frequency so start scanning
-        d->mUiEngine.wrapper().startSeeking( Seek::Up, TuneReason::StationScan );
-    } else {
-        // Engine must be initialized to minimum frequency before scanning can start
-        d->mUiEngine.wrapper().setFrequency( d->mLastFoundFrequency, TuneReason::StationScanInitialization );
-    }
-}
-
-/*!
- * Continues the scanning upwards from current frequency
- */
-void RadioScannerEngine::continueScanning()
-{
-    Q_D( RadioScannerEngine );
-    d->mUiEngine.wrapper().startSeeking( Seek::Up, TuneReason::StationScan );
-}
-
-/*!
- * Checks if the scanning is ongoing
- */
-bool RadioScannerEngine::isScanning() const
-{
-    Q_D( const RadioScannerEngine );
-    return d->mIsScanning;
-}
-
-/*!
- * Cancels the scanning process
- */
-void RadioScannerEngine::cancel()
-{
-    Q_D( RadioScannerEngine );
-    if ( isScanning() ) {
-        d->mIsScanning = false;
-        d->mUiEngine.cancelSeeking();
-    }
-
-    if ( d->mMutedByScanner ) {
-        d->mUiEngine.api().setMute( false );
-        d->mMutedByScanner = false;
-    }
-
-//    d->mUiEngine.wrapper().setRdsEnabled( true );
-}
-
-/*!
- * Adds a new station that was found
- */
-void RadioScannerEngine::addScannedFrequency( const uint frequency )
-{
-    Q_D( RadioScannerEngine );
-    if ( frequency > d->mLastFoundFrequency ) {
-        // Station has been found normally
-        d->mLastFoundFrequency = frequency;
-        d->addFrequencyAndReport( frequency );
-    } else if ( frequency == d->mUiEngine.api().minFrequency() ) {
-        // Special case. A station has been found in the mininmum frequency
-        d->addFrequencyAndReport( frequency );
-    } else {
-        // Seeking looped around the frequency band. Send invalid station as indicator that the scanning should stop
-        emit stationFound( RadioStation() );
-    }
-}
-
-/*!
- *
- */
-void RadioScannerEngine::emitStationFound( const RadioStation& station )
-{
-    emit stationFound( station );
-}
--- a/radioapp/radiouiengine/src/radioscannerengine_p.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,100 +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:
-*
-*/
-
-// User includes
-#include "radioscannerengine_p.h"
-#include "radioscannerengine.h"
-#include "radiouiengine_p.h"
-#include "radiouiengine.h"
-#include "radiostationhandlerif.h"
-#include "radioenginewrapper.h"
-#include "radiostation.h"
-#include "radiostationmodel.h"
-
-/*!
- *
- * @param scanner
- * @param uiEngine
- */
-RadioScannerEnginePrivate::RadioScannerEnginePrivate( RadioScannerEngine* scanner, RadioUiEnginePrivate& uiEngine ) :
-    q_ptr( scanner ),
-    mUiEngine( uiEngine ),
-    mLastFoundFrequency( 0 ),
-    mMutedByScanner( false ),
-    mIsScanning( false )
-{
-    mUiEngine.wrapper().addObserver( this );
-}
-
-/*!
- *
- */
-RadioScannerEnginePrivate::~RadioScannerEnginePrivate()
-{
-    mUiEngine.wrapper().removeObserver( this );
-}
-
-/*!
- * \reimp
- */
-void RadioScannerEnginePrivate::tunedToFrequency( uint frequency, int reason )
-{
-    if ( !mIsScanning ) {
-        return;
-    }
-
-    Q_Q( RadioScannerEngine );
-    if ( reason == TuneReason::StationScanInitialization ) {
-        mUiEngine.wrapper().startSeeking( Seek::Up, TuneReason::StationScan );
-    } else if ( reason == TuneReason::StationScan ) {
-        if ( frequency == mLastFoundFrequency ) {
-            // Stop scanning
-            q->emitStationFound( RadioStation() );
-        } else if ( frequency > mLastFoundFrequency ) {
-            // Station has been found normally
-            mLastFoundFrequency = frequency;
-            addFrequencyAndReport( frequency );
-        } else if ( frequency == mUiEngine.api().minFrequency() ) {
-            // Special case. A station has been found in the mininmum frequency
-            addFrequencyAndReport( frequency );
-        } else {
-            // Seeking looped around the frequency band. Send invalid station as indicator that the scanning should stop
-            q->emitStationFound( RadioStation() );
-        }
-    } else {
-        q->emitStationFound( RadioStation() );
-    }
-}
-
-/*!
- *
- */
-void RadioScannerEnginePrivate::addFrequencyAndReport( const uint frequency )
-{
-    RadioStationModel& stationModel = mUiEngine.api().stationModel();
-    stationModel.stationHandlerIf().addScannedFrequency( frequency );
-
-    // Return value of findFrequency() is intentionally ignored. The station was just added
-    // to the model in the previous line so it should be found and if it isn't then an
-    // empty station is sent with the signal and scanner will stop the scanning process.
-    RadioStation station;
-    stationModel.findFrequency( frequency, station );
-
-    Q_Q( RadioScannerEngine );
-    q->emitStationFound( station );
-}
-
--- a/radioapp/radiouiengine/src/radiostation.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,662 +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:
-*
-*/
-
-// System includes
-#include <QTime>
-
-// User includes
-#include "radiostation.h"
-#include "radiostation_p.h"
-#include "radiologger.h"
-#include "radio_global.h"
-
-// Constants
-const QLatin1String HTML_TAG_START( "<font color='cyan'><u>" );
-const QLatin1String HTML_TAG_END( "</u></font>" );
-
-const uint LAST_CALLSIGN_CHAR_CODE = 25;
-const uint THREE_LETTER_CALLSIGN_COUNT = 72;
-const uint KXXX_CALLSIGN_PI_FIRST = 0x1000;
-const uint WXXX_CALLSIGN_PI_FIRST = 0x54A8;
-const uint WXXX_CALLSIGN_PI_LAST = 0x994F;
-const uint XXX_CALLSIGN_PI_FIRST = 0x9950;
-const uint XXX_CALLSIGN_PI_LAST = 0x99B9;
-
-const char* CALLSIGN_TABLE[THREE_LETTER_CALLSIGN_COUNT] =
-   {"KBW", "KCY", "KDB", "KDF", "KEX", "KFH","KFI","KGA","KGB",
-    "KGO", "KGU", "KGW", "KGY", "KHQ", "KID", "KIT", "KJR", "KLO",
-    "KLZ", "KMA", "KMJ", "KNX", "KOA", "KOB", "KOY", "KPQ", "KQV",
-    "KSD", "KSL", "KUJ", "KUT", "KVI", "KWG", "KXL", "KXO", "KYW",
-    "WBT", "WBZ", "WDZ", "WEW", "WGH", "WGL", "WGN", "WGR", "WGY",
-    "WHA", "WHB", "WHK", "WHO", "WHP", "WIL", "WIP", "WIS", "WJR",
-    "WJW", "WJZ", "WKY", "WLS", "WLW", "WMC", "WMT", "WOC", "WOI",
-    "WOL", "WOR", "WOW", "WRC", "WRR", "WSB", "WSM", "WWJ", "WWL"};
-
-const uint PI_CODE_TABLE[THREE_LETTER_CALLSIGN_COUNT] =
-   {0x99A5, 0x99A6, 0x9990, 0x99A7, 0x9950, 0x9951, 0x9952, 0x9953,
-    0x9991, 0x9954, 0x9955, 0x9956, 0x9957, 0x99AA, 0x9958, 0x9959,
-    0x995A, 0x995B, 0x995C, 0x995D, 0x995E, 0x995F, 0x9960, 0x99AB,
-    0x9992, 0x9993, 0x9964, 0x9994, 0x9965, 0x9966, 0x9995, 0x9967,
-    0x9968, 0x9996, 0x9997, 0x996B, 0x9999, 0x996D, 0x996E, 0x996F,
-    0x999A, 0x9971, 0x9972, 0x9973, 0x999B, 0x9975, 0x9976, 0x9977,
-    0x9978, 0x999C, 0x999D, 0x997A, 0x99B3, 0x997B, 0x99B4, 0x99B5,
-    0x997C, 0x997D, 0x997E, 0x999E, 0x999F, 0x9981, 0x99A0, 0x9983,
-    0x9984, 0x99A1, 0x99B9, 0x99A2, 0x99A3, 0x99A4, 0x9988, 0x9989};
-
-const uint DISABLE_LOCAL_AREA_COVERAGE_MASK = 0x0800;
-
-const int PS_NAME_CHANGE_THRESHOLD_SECONDS = 10;
-
-// Macros to help protect shared null and manual station instances to help debugging
-// Enabled in emulator or win32 builds by default
-#if defined __WINS__ || defined BUILD_WIN32
-#   define PROTECT_SHAREDNULL_AND_MANUALSTATION
-#endif
-
-#ifdef PROTECT_SHAREDNULL_AND_MANUALSTATION
-#   define ASSERT_SHARED_NULL_IS_INTACT \
-        Q_ASSERT_X( mData->mPresetIndex != SharedNull, "RadioStation", "Shared null modified illegally!" );
-#   define ASSERT_MANUAL_STATION \
-        Q_ASSERT_X( mData->mPresetIndex != ManualStation, "RadioStation", "Illegally modifying manual station" );
-#else
-#   define ASSERT_SHARED_NULL_IS_INTACT
-#   define ASSERT_MANUAL_STATION
-#endif // PROTECT_SHAREDNULL_AND_MANUALSTATION
-
-/**
- * Static shared data instance that is used by all default-constructed RadioStation instances
- */
-static RadioStationPrivate shared_null( RadioStation::SharedNull, 0 );
-
-/*!
- *
- */
-QString RadioStation::parseFrequency( uint frequency )
-{
-    QString freqString;
-    freqString.sprintf( "%.1f", qreal( frequency ) / FREQUENCY_MULTIPLIER );
-    return freqString;
-}
-
-/*!
- *
- */
-RadioStation::RadioStation() :
-    mData( &shared_null )
-{
-}
-
-/*!
- *
- */
-RadioStation::RadioStation( const RadioStation& other ) :
-    mData( other.mData )
-{
-}
-
-/*!
- *
- */
-RadioStation::RadioStation( int presetIndex, uint frequency ) :
-    mData( new RadioStationPrivate( presetIndex, frequency ) )
-{
-}
-
-/*!
- *
- */
-RadioStation::~RadioStation()
-{
-}
-
-/*!
- *
- */
-RadioStation& RadioStation::operator=( const RadioStation& other )
-{
-    mData = other.mData;
-    return *this;
-}
-
-/*!
- *
- */
-void RadioStation::reset()
-{
-    mData = &shared_null;
-    ASSERT_SHARED_NULL_IS_INTACT
-}
-
-/*!
- *
- */
-void RadioStation::setChangeFlags( RadioStation::Change flags )
-{
-    if ( mData->mChangeFlags != flags ) {
-        mData->mChangeFlags = flags;
-    }
-}
-
-/*!
- *
- */
-void RadioStation::setPresetIndex( int presetIndex )
-{
-    if ( mData->mPresetIndex != presetIndex ) {
-        ASSERT_MANUAL_STATION
-        mData->mPresetIndex = presetIndex;
-        mData->mChangeFlags |= RadioStation::PersistentDataChanged;
-    }
-}
-
-/*!
- *
- */
-void RadioStation::setFrequency( uint frequency )
-{
-    if ( mData->mFrequency != frequency ) {
-        mData->mFrequency = frequency;
-        mData->mChangeFlags |= RadioStation::PersistentDataChanged;
-        ASSERT_SHARED_NULL_IS_INTACT
-    }
-}
-
-/*!
- * Sets the preset name
- */
-void RadioStation::setName( const QString& name )
-{
-    // Name emptiness is checked because this name setter is used by incoming RDS PS name
-    // and empty names should be ignored
-    if ( !name.isEmpty() && !mData->isRenamedByUser() && mData->mName.compare( name ) != 0 ) {
-        mData->mName = name.trimmed();
-        mData->mChangeFlags |= RadioStation::PersistentDataChanged | RadioStation::NameChanged;
-        mData->setStationHasSentRds( true );
-
-        // Save the time when PS name changed and if the last change was too close to the current time
-        // change the PS type to dynamic if it has already been incorrectly determined to be static.
-        QTime previousChange = mData->mLastPsNameChangeTime;
-        mData->mLastPsNameChangeTime = QTime::currentTime();
-        if ( previousChange.isValid() && mData->mPsType == RadioStation::Static &&
-             previousChange.secsTo( mData->mLastPsNameChangeTime ) < PS_NAME_CHANGE_THRESHOLD_SECONDS ) {
-            LOG( "Station changed PS name too often. PS type changed to Dynamic" );
-            mData->mPsType = RadioStation::Dynamic;
-            mData->mDynamicPsText = mData->mName;
-            mData->mName = "";
-            mData->mChangeFlags |= RadioStation::PsTypeChanged | RadioStation::DynamicPsChanged;
-            mData->setCallSignCheckDone( false );
-        }
-
-        //TODO: This is a temporary thing to see some URL. Remove this
-        if ( !mData->mName.isEmpty() ) {
-            QString url = mData->mName.toLower().remove( " " );
-            mData->mUrl = "http://www." + url + ".fi";
-        } else {
-            mData->mUrl = "";
-        }
-        mData->mChangeFlags |= RadioStation::UrlChanged;
-        ASSERT_SHARED_NULL_IS_INTACT
-    }
-}
-
-/*!
- *
- */
-void RadioStation::setGenre( const int genre )
-{
-    if ( mData->mGenre != genre ) {
-        mData->mGenre = genre;
-        mData->mChangeFlags |= RadioStation::PersistentDataChanged | RadioStation::GenreChanged;
-
-        // Note that setStationHasSentRds() is not set when genre or pi code arrives.
-
-        ASSERT_SHARED_NULL_IS_INTACT
-    }
-}
-
-/*!
- *
- */
-void RadioStation::setUrl( const QString& url )
-{
-    if ( mData->mUrl.compare( url ) != 0 ) {
-        mData->mUrl = url;
-        mData->mChangeFlags |= RadioStation::PersistentDataChanged | RadioStation::UrlChanged;
-        mData->setStationHasSentRds( true );
-        ASSERT_SHARED_NULL_IS_INTACT
-    }
-}
-
-/*!
- * Sets the PI code
- * @return true if code was changed, false if not
- */
-bool RadioStation::setPiCode( int piCode, RadioRegion::Region region )
-{
-    LOG_FORMAT( "RadioStation::setPiCode new PI: %d", piCode );
-    // toggling local area coverage bit code must not be interpreted as new PI code
-    if ( region != RadioRegion::America ) {
-        piCode &= ~DISABLE_LOCAL_AREA_COVERAGE_MASK;
-    }
-
-    LOG_FORMAT( "stored PI: %d", mData->mPiCode );
-    LOG_FORMAT( "call sign check done: %d", mData->isCallSignCheckDone() );
-    //prevent executing the below code when unnessesary
-    if ( mData->mPiCode != piCode || !mData->isCallSignCheckDone() ) {
-        mData->mPiCode = piCode;
-        mData->mChangeFlags |= RadioStation::PersistentDataChanged | RadioStation::PiCodeChanged;
-        // Note that setStationHasSentRds() is not set when genre or pi code arrives.
-
-        // call sign not calculated for clear channel stations
-		//TODO: Remove magic numbers
-        if ( ( (mData->mPiCode & 0xF000 ) >> 12 ) == 0x1 ) {
-            LOG( "Clear channel station" );
-            mData->setCallSignCheckDone( true );
-        } else if ( region == RadioRegion::America && mData->mName.isEmpty() && !isRenamed() ) {
-            LOG( "Calculate call sign" );
-            mData->mName = piCodeToCallSign( mData->mPiCode );
-            mData->mChangeFlags |= RadioStation::NameChanged;
-        }
-
-        if ( mData->mChangeFlags.testFlag( RadioStation::PsTypeChanged ) ) {
-            LOG( "Call sign check done" );
-            mData->setCallSignCheckDone( true );
-        }
-
-        ASSERT_SHARED_NULL_IS_INTACT
-        return true;
-    }
-    return false;
-}
-
-/*!
- *
- */
-void RadioStation::setPsType( PsType psType )
-{
-    if ( mData->mPsType != psType ) {
-        mData->mPsType = psType;
-        mData->mChangeFlags |= RadioStation::PsTypeChanged;
-        ASSERT_SHARED_NULL_IS_INTACT
-    }
-}
-
-/*!
- *
- */
-void RadioStation::setRadioText( const QString& radioText )
-{
-    if ( mData->mRadioText.compare( radioText ) != 0 ) {
-        mData->mRadioText = radioText.isEmpty() ? "" : radioText.trimmed();
-        mData->mChangeFlags |= RadioStation::RadioTextChanged;
-        mData->setStationHasSentRds( true );
-        ASSERT_SHARED_NULL_IS_INTACT
-    }
-}
-
-/*!
- *
- */
-void RadioStation::setRadioTextPlus( const int rtPlusClass, const QString& rtPlusItem )
-{
-    if ( !mData->mRadioText.isEmpty() &&
-         !rtPlusItem.isEmpty() &&
-         ( rtPlusClass == RtPlus::Artist || rtPlusClass == RtPlus::Title || rtPlusClass == RtPlus::Homepage) )
-    {
-        // Url is saved to its own variable and it is not highlighted from the radiotext
-        if ( rtPlusClass == RtPlus::Homepage ) {
-            setUrl( rtPlusItem );
-            return;
-        }
-
-        const QString replacement = HTML_TAG_START + rtPlusItem + HTML_TAG_END;
-
-        mData->mRadioText.replace( rtPlusItem, replacement );
-        mData->mChangeFlags |= RadioStation::RadioTextChanged;
-    }
-}
-
-/*!
- *
- */
-void RadioStation::setDynamicPsText( const QString& dynamicPsText )
-{
-    if ( mData->mDynamicPsText.compare( dynamicPsText ) != 0 ) {
-        mData->mDynamicPsText = dynamicPsText;
-        mData->mChangeFlags |= RadioStation::DynamicPsChanged;
-        ASSERT_SHARED_NULL_IS_INTACT
-    }
-}
-
-/*!
- *
- */
-bool RadioStation::isValid() const
-{
-    return mData->mFrequency > 0 && ( isType( ManualStation ) || mData->mPresetIndex >= 0 );
-}
-
-/*!
- *
- */
-QString RadioStation::name() const
-{
-    return mData->mName.isEmpty() ? "" : mData->mName;
-}
-
-/*!
- *
- */
-void RadioStation::setUserDefinedName( const QString& name )
-{
-    // We don't check for name emptiness because this setter is used also to remove the renaming
-    // of a station by setting an empty name
-    if ( mData->mName.compare( name ) != 0 ) {
-        mData->mName = name;
-        mData->setRenamedByUser( !name.isEmpty() );
-        mData->mChangeFlags |= RadioStation::PersistentDataChanged | RadioStation::NameChanged;
-    }
-}
-
-/*!
- *
- */
-bool RadioStation::isRenamed() const
-{
-    return mData->isRenamedByUser();
-}
-
-/*!
- *
- */
-int RadioStation::genre() const
-{
-    return mData->mGenre;
-}
-
-/*!
- *
- */
-QString RadioStation::frequencyString() const
-{
-    return parseFrequency( mData->mFrequency );
-}
-
-/*!
- *
- */
-uint RadioStation::frequency() const
-{
-    return mData->mFrequency;
-}
-
-/*!
- *
- */
-int RadioStation::presetIndex() const
-{
-    return mData->mPresetIndex;
-}
-
-/*!
- *
- */
-void RadioStation::setFavorite( bool favorite )
-{
-    if ( isFavorite() != favorite ) {
-        favorite ? setType( RadioStation::Favorite ) : unsetType( RadioStation::Favorite );
-        mData->mChangeFlags |= RadioStation::PersistentDataChanged | RadioStation::FavoriteChanged;
-        ASSERT_SHARED_NULL_IS_INTACT
-    }
-}
-
-/*!
- *
- */
-bool RadioStation::isFavorite() const
-{
-    return mData->mType.testFlag( RadioStation::Favorite );
-}
-
-/*!
- *
- */
-QString RadioStation::url() const
-{
-    return mData->mUrl;
-}
-
-/*!
- *
- */
-int RadioStation::piCode() const
-{
-    return mData->mPiCode;
-}
-
-/*!
- *
- */
-void RadioStation::setType( RadioStation::Type type )
-{
-    if ( !isType( type ) ) {
-
-        // Check if favorite-status changed
-        if ( mData->mType.testFlag( RadioStation::Favorite ) != type.testFlag( RadioStation::Favorite ) ) {
-            mData->mChangeFlags |= RadioStation::FavoriteChanged;
-        }
-
-        mData->mType |= type;
-        mData->mChangeFlags |= RadioStation::PersistentDataChanged | RadioStation::TypeChanged;
-        ASSERT_SHARED_NULL_IS_INTACT
-    }
-}
-
-/*!
- *
- */
-void RadioStation::unsetType( RadioStation::Type type )
-{
-    if ( isType( type ) ) {
-
-        // Check if favorite-status changed
-        if ( mData->mType.testFlag( RadioStation::Favorite ) != type.testFlag( RadioStation::Favorite ) ) {
-            mData->mChangeFlags |= RadioStation::FavoriteChanged;
-        }
-
-        mData->mType &= ~type;
-        mData->mChangeFlags |= RadioStation::PersistentDataChanged | RadioStation::TypeChanged;
-        ASSERT_SHARED_NULL_IS_INTACT
-    }
-}
-
-/*!
- *
- */
-bool RadioStation::isType( RadioStation::Type type ) const
-{
-    return ( mData->mType & type ) == type;
-}
-
-/*!
- *
- */
-RadioStation::PsType RadioStation::psType() const
-{
-    return mData->mPsType;
-}
-
-/*!
- *
- */
-QString RadioStation::radioText() const
-{
-    return mData->mRadioText;
-}
-
-/*!
- *
- */
-QString RadioStation::dynamicPsText() const
-{
-    return mData->mDynamicPsText;
-}
-
-/*!
- *
- */
-RadioStation::Change RadioStation::changeFlags() const
-{
-    return mData->mChangeFlags;
-}
-
-/*!
- *
- */
-bool RadioStation::hasDataChanged( RadioStation::Change flags ) const
-{
-    return ( mData->mChangeFlags & flags ) == flags;
-}
-
-/*!
- *
- */
-bool RadioStation::hasChanged() const
-{
-    return mData->mChangeFlags != RadioStation::NoChange;
-}
-
-/*!
- *
- */
-void RadioStation::resetChangeFlags()
-{
-    if ( mData->mChangeFlags != RadioStation::NoChange ) {
-        mData->mChangeFlags = RadioStation::NoChange;
-    }
-}
-
-/*!
- *
- */
-bool RadioStation::hasSentRds() const
-{
-    return mData->hasStationSentRds();
-}
-
-/*!
- *
- */
- QString RadioStation::piCodeToCallSign( uint programmeIdentification )
- {
-    QString callSign;
-
-    LOG_FORMAT( "RadioStation::piCodeToCallSign PI: %d", programmeIdentification );
-    // call signs beginning with 'K'
-    if ( ( programmeIdentification>=KXXX_CALLSIGN_PI_FIRST ) && ( programmeIdentification < WXXX_CALLSIGN_PI_FIRST ) ) {
-        callSign += "K";
-        callSign += iterateCallSign( KXXX_CALLSIGN_PI_FIRST, programmeIdentification );
-    }
-    // call signs beginning with 'W'
-    else if ( ( programmeIdentification >= WXXX_CALLSIGN_PI_FIRST ) && ( programmeIdentification <= WXXX_CALLSIGN_PI_LAST ) ) {
-        callSign += "W";
-        callSign += iterateCallSign( WXXX_CALLSIGN_PI_FIRST, programmeIdentification );
-    }
-    // 3 letter only call signs
-    else if ( ( programmeIdentification >= XXX_CALLSIGN_PI_FIRST ) && ( programmeIdentification <= XXX_CALLSIGN_PI_LAST ) ) {
-        callSign += callSignString( programmeIdentification );
-    } else {
-        LOG( "RadioStation::piCodeToCallSign - Unhandled else" );
-    }
-
-    LOG_FORMAT( "RadioStation::piCodeToCallSign, call sign: %s", GETSTRING(callSign) );
-
-    return callSign;
-}
-
-/*!
- *
- */
-QString RadioStation::iterateCallSign( int piBase, int programmeIdentification )
-{
-    QString callSign;
-    LOG_FORMAT( "RadioStation::iterateCallSign base: %d", piBase );
-
-    int sum = 0;
-    int i = 0;
-    while( sum < programmeIdentification ) {
-        ++i;
-        sum = piBase + i * 676 + 0 + 0;
-    }
-    callSign += callSignChar( i - 1 );
-
-    int tmpSum( sum - 676 );
-    sum -= 676;
-    i = 0;
-    while( sum <= programmeIdentification ) {
-        ++i;
-        sum = tmpSum + 0 + i * 26 + 0;
-    }
-    callSign += callSignChar( i - 1 );
-
-    tmpSum = sum - 26;
-    sum -= 26;
-    i = 0;
-    while( sum <= programmeIdentification ) {
-        ++i;
-        sum = tmpSum + 0 + 0 + i;
-    }
-    callSign += callSignChar( i - 1 );
-
-    return callSign;
-    }
-
-/*!
- *
- */
-QString RadioStation::callSignString( uint programmeIdentification )
-{
-    for ( uint i = 0; i < THREE_LETTER_CALLSIGN_COUNT; ++i ) {
-        if( PI_CODE_TABLE[i] == programmeIdentification ) {
-            return CALLSIGN_TABLE[i];
-        }
-    }
-
-    LOG_FORMAT( "RadioStation::callSignString, Not found PI: %d", programmeIdentification );
-
-    return QString( "????" );
-}
-
-/*!
- *
- */
-char RadioStation::callSignChar( uint decimalValue )
-{
-    LOG_FORMAT( "RadioStation::callSignChar A+: %d", decimalValue );
-    if ( decimalValue <= LAST_CALLSIGN_CHAR_CODE ) {
-        return static_cast<char>( 'A' + decimalValue );
-    }
-    return '?';
-}
-
-/**
- * Checks if the class is detached from implicitly shared data
- */
-bool RadioStation::isDetached() const
-{
-    return mData->ref == 1;
-}
--- a/radioapp/radiouiengine/src/radiostation_p.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,269 +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:
-*
-*/
-
-// System includes
-
-// User includes
-#include "radiostation_p.h"
-
-/**
- * Convenience macro to set and unset flag values
- */
-#define SET_FLAG_VALUE(member,flag,value) \
-    if ( value ) { \
-        member |= flag; \
-    } else { \
-        member &= ~flag; \
-    }
-
-/*!
- *
- */
-RadioStationPrivate::RadioStationPrivate( int presetIndex, uint frequency )
-{
-    init( presetIndex, frequency );
-
-    if ( presetIndex == RadioStation::SharedNull ) {
-        ref = 2;
-    }
-}
-
-/*!
- *
- */
-RadioStationPrivate::RadioStationPrivate( const RadioStationPrivate& other ) :
-    QSharedData( other ),
-    mPresetIndex( other.mPresetIndex ),
-    mFrequency( other.mFrequency ),
-    mName( other.mName ),
-    mGenre( other.mGenre ),
-    mUrl( other.mUrl ),
-    mPiCode( other.mPiCode ),
-    mType( other.mType ),
-    mPsType( other.mPsType ),
-    mRadioText( other.mRadioText ),
-    mDynamicPsText( other.mDynamicPsText ),
-    mChangeFlags( other.mChangeFlags ),
-    mLastPsNameChangeTime( other.mLastPsNameChangeTime )
-{
-    setRenamedByUser( other.isRenamedByUser() );
-    setCallSignCheckDone( other.isCallSignCheckDone() );
-    setStationHasSentRds( other.hasStationSentRds() );
-
-    // Protect the shared null preset index to make debugging easier
-    if ( mPresetIndex == RadioStation::SharedNull ) {
-        mPresetIndex = RadioStation::Invalid;
-    }
-}
-
-/*!
- *
- */
-RadioStationPrivate::~RadioStationPrivate()
-{
-}
-
-/*!
- *
- */
-void RadioStationPrivate::init( int presetIndex, uint frequency )
-{
-    mPresetIndex    = presetIndex;
-    mFrequency      = frequency;
-    mGenre          = -1;
-    mPiCode         = -1;
-    mType           = 0;
-    mPsType         = RadioStation::Unknown;
-    mChangeFlags    = RadioStation::NoChange;
-    mStationInfo    = 0;
-}
-
-/*!
- * \reimp
- */
-int RadioStationPrivate::presetIndex() const
-{
-    return mPresetIndex;
-}
-
-/*!
- * \reimp
- */
-void RadioStationPrivate::setPresetIndex( int presetIndex )
-{
-    mPresetIndex = presetIndex;
-}
-
-/*!
- * \reimp
- */
-uint RadioStationPrivate::frequency() const
-{
-    return mFrequency;
-}
-
-/*!
- * \reimp
- */
-void RadioStationPrivate::setFrequency( uint frequency )
-{
-    mFrequency = frequency;
-}
-
-/*!
- * \reimp
- */
-QString RadioStationPrivate::name() const
-{
-    return mName;
-}
-
-/*!
- * \reimp
- */
-void RadioStationPrivate::setName( QString name )
-{
-    mName = name;
-}
-
-/*!
- * \reimp
- */
-bool RadioStationPrivate::isRenamedByUser() const
-{
-    return mStationInfo.testFlag( RenamedByUser );
-}
-
-/*!
- * \reimp
- */
-void RadioStationPrivate::setRenamedByUser( bool renamed )
-{
-    SET_FLAG_VALUE( mStationInfo, RenamedByUser, renamed );
-}
-
-/*!
- * \reimp
- */
-int RadioStationPrivate::genre() const
-{
-    return mGenre;
-}
-
-/*!
- * \reimp
- */
-void RadioStationPrivate::setGenre( int genre )
-{
-    mGenre = genre;
-}
-
-/*!
- * \reimp
- */
-QString RadioStationPrivate::url() const
-{
-    return mUrl;
-}
-
-/*!
- * \reimp
- */
-void RadioStationPrivate::setUrl( QString url )
-{
-    mUrl = url;
-}
-
-/*!
- * \reimp
- */
-int RadioStationPrivate::piCode() const
-{
-    return mPiCode;
-}
-
-/*!
- * \reimp
- */
-void RadioStationPrivate::setPiCode( int piCode )
-{
-    mPiCode = piCode;
-}
-
-/*!
- * \reimp
- */
-bool RadioStationPrivate::isFavorite() const
-{
-    return mType.testFlag( RadioStation::Favorite );
-}
-
-/*!
- * \reimp
- */
-void RadioStationPrivate::setFavorite( bool favorite )
-{
-    SET_FLAG_VALUE( mType, RadioStation::Favorite, favorite );
-}
-
-/*!
- * \reimp
- */
-bool RadioStationPrivate::isLocalStation() const
-{
-    return mType.testFlag( RadioStation::LocalStation );
-}
-
-/*!
- * \reimp
- */
-void RadioStationPrivate::setLocalStation( bool localStation )
-{
-    SET_FLAG_VALUE( mType, RadioStation::LocalStation, localStation );
-}
-
-/*!
- * \reimp
- */
-bool RadioStationPrivate::hasStationSentRds() const
-{
-    return mStationInfo.testFlag( StationSendsRds );
-}
-
-/*!
- * \reimp
- */
-void RadioStationPrivate::setStationHasSentRds( bool hasSentRds )
-{
-    SET_FLAG_VALUE( mStationInfo, StationSendsRds, hasSentRds );
-}
-
-/*!
- *
- */
-bool RadioStationPrivate::isCallSignCheckDone() const
-{
-    return mStationInfo.testFlag( CallSignCheckDone );
-}
-
-/*!
- *
- */
-void RadioStationPrivate::setCallSignCheckDone( bool checkDone )
-{
-    SET_FLAG_VALUE( mStationInfo, CallSignCheckDone, checkDone );
-}
--- a/radioapp/radiouiengine/src/radiostationmodel.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,753 +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:
-*
-*/
-
-// System includes
-#include <QStringList>
-
-// User includes
-#include "radiostationmodel.h"
-#include "radiostationmodel_p.h"
-#include "radiopresetstorage.h"
-#include "radioenginewrapper.h"
-#include "radiouiengine.h"
-#include "radiouiengine_p.h"
-#include "radiostation.h"
-#include "radiostation_p.h"
-#include "radiologger.h"
-
-/*!
- *
- */
-static QString parseLine( const RadioStation& station )
-{
-    QString line = "";
-    const QString parsedFrequency = qtTrId( "txt_rad_dblist_l1_mhz" ).arg( RadioStation::parseFrequency( station.frequency() ) );
-    line.append( parsedFrequency );
-
-    QString name = station.name();
-    if ( !name.isEmpty() )
-    {
-        line.append( " - " );
-        line.append( name.trimmed() );
-    }
-
-    LOG_FORMAT( "RadioStationModel: Returning line %s", GETSTRING(line) );
-    return line;
-}
-
-/*!
- *
- */
-RadioStationModel::RadioStationModel( RadioUiEnginePrivate& uiEngine ) :
-    QAbstractListModel( &uiEngine.api() ),
-    d_ptr( new RadioStationModelPrivate( this, uiEngine ) )
-{
-}
-
-/*!
- *
- */
-RadioStationModel::~RadioStationModel()
-{
-}
-
-/*!
- *
- */
-Qt::ItemFlags RadioStationModel::flags ( const QModelIndex& index ) const
-{
-    Qt::ItemFlags flags = QAbstractListModel::flags( index );
-    flags |= Qt::ItemIsEditable;
-    return flags;
-}
-
-/*!
- *
- */
-int RadioStationModel::rowCount( const QModelIndex& parent ) const
-{
-    Q_UNUSED( parent );
-    Q_D( const RadioStationModel );
-    const int count = d->mStations.keys().count();
-    return count;
-}
-
-/*!
- * Checks the given station and emits signals based on what member variables had been changed
- */
-QVariant RadioStationModel::data( const QModelIndex& index, int role ) const
-{
-    if ( !index.isValid() ) {
-        return QVariant();
-    }
-
-    Q_D( const RadioStationModel );
-    if ( role == Qt::DisplayRole ) {
-        RadioStation station = stationAt( index.row() );
-        QString firstLine = parseLine( station );
-        if ( d->mDetailLevel.testFlag( RadioStationModel::ShowGenre ) ) {
-            QStringList list;
-            list.append( firstLine );
-            QString genre = " "; // Empty space so that the listbox generates the second row
-            if ( station.genre() != -1 ) {
-                genre = d->mUiEngine.api().genreToString( station.genre(), GenreTarget::StationsList );
-            }
-            list.append( genre );
-
-            return list;
-        }
-
-        return firstLine;
-    } else if ( role == RadioRole::RadioStationRole ) {
-        QVariant variant;
-        variant.setValue( stationAt( index.row() ) );
-        return variant;
-    } else if ( role == Qt::DecorationRole &&
-                d->mDetailLevel.testFlag( RadioStationModel::ShowIcons ) ) {
-        RadioStation station = stationAt( index.row() );
-        QVariantList list;
-        if ( station.isFavorite() && !d->mFavoriteIcon.isNull() ) {
-            list.append( d->mFavoriteIcon );
-        } else {
-            list.append( QIcon() );
-        }
-        if ( currentStation().frequency() == station.frequency() && !d->mNowPlayingIcon.isNull() ) {
-            list.append( d->mNowPlayingIcon );
-        }
-        return list;
-    } else if ( role == RadioRole::IsFavoriteRole ) {
-        QVariant variant;
-        variant.setValue( stationAt( index.row() ).isFavorite() );
-        return variant;
-    }
-
-    return QVariant();
-}
-
-/*!
- * Checks the given station and emits signals based on what member variables had been changed
- */
-bool RadioStationModel::setData( const QModelIndex& index, const QVariant& value, int role )
-{
-    Q_UNUSED( index );
-
-    if ( role == RadioRole::ToggleFavoriteRole ) {
-        const uint frequency = value.toUInt();
-        RadioStation station;
-        if ( findFrequency( frequency, station ) ) {
-            setFavoriteByPreset( station.presetIndex(), !station.isFavorite() );
-        } else {
-            setFavoriteByFrequency( frequency, true );
-        }
-
-        return true;
-    }
-
-    return false;
-}
-
-/*!
- * Called by the engine to initialize the list with given amount of presets
- */
-void RadioStationModel::initialize( RadioPresetStorage* storage, RadioEngineWrapper* wrapper )
-{
-    Q_D( RadioStationModel );
-    d->mPresetStorage = storage;
-    d->mWrapper = wrapper;
-
-    int index = d->mPresetStorage->firstPreset();
-    LOG_FORMAT( "RadioStationModel::initialize: presetCount: %d, firstIndex: %d",
-                                            d->mPresetStorage->presetCount(), index );
-
-    while ( index >= 0 ) {
-        RadioStation station;
-
-        RadioStationIf* stationInterface = static_cast<RadioStationIf*>( station.data_ptr() );
-        if ( d->mPresetStorage->readPreset( index, *stationInterface ) ) {
-            if ( station.isValid() && d->mWrapper->isFrequencyValid( station.frequency() ) ) {
-
-#ifdef INIT_STATIONS_WITH_DUMMY_RT
-                station.setGenre( GenreEurope::RdsChildrensProgrammes );
-                if ( index % 3 == 0 ) {
-                    station.setName( "Radio Rock" );
-                    station.setRadioText( "Now playing: <font color='cyan'>The Presidents of the United States of America</font> - <font color='cyan'>Dune Buggy and diipa daapa jhkjhui erjlkej rewjtl</font>" );
-                } else if ( index % 2 == 0 ) {
-                    station.setName( "Radio Rock" );
-                } else {
-                    station.setDynamicPsText( "DYN PS" );
-                }
-#endif // INIT_STATIONS_WITH_DUMMY_RT
-
-                // Check if the station seems to send RDS or not.
-                // Note that radiotext is not checked because it is not saved to cenrep
-                // TODO: Consider saving this state flag to cenrep
-                if ( ( station.hasName() && !station.isRenamed() ) || station.hasUrl() ) {
-                    static_cast<RadioStationIf*>( station.data_ptr() )->setStationHasSentRds( true );
-                }
-
-                d->mStations.insert( station.frequency(), station );
-            } else {
-                LOG( "RadioStationModel::initialize: Invalid station!" );
-                LOG_FORMAT( "Invalid station freq: %d", station.frequency() );
-            }
-        }
-
-        index = d->mPresetStorage->nextPreset( index );
-    }
-
-    d->setCurrentStation( d->mWrapper->currentFrequency() );
-
-    wrapper->addObserver( d );
-}
-
-/*!
- * Sets the icons to be used in the lists
- */
-void RadioStationModel::setIcons( const QIcon& favoriteIcon, const QIcon& nowPlayingIcon )
-{
-    Q_D( RadioStationModel );
-    d->mFavoriteIcon = favoriteIcon;
-    d->mNowPlayingIcon = nowPlayingIcon;
-}
-
-/*!
- * Returns a reference to the station handler interface
- */
-RadioStationHandlerIf& RadioStationModel::stationHandlerIf()
-{
-    Q_D( RadioStationModel );
-    return *d;
-}
-
-/*!
- * Returns a reference to the underlying QList so that it can be easily looped
- */
-const Stations& RadioStationModel::list() const
-{
-    Q_D( const RadioStationModel );
-    return d->mStations;
-}
-
-/*!
- * Returns the station at the given index.
- */
-RadioStation RadioStationModel::stationAt( int index ) const
-{
-    // Get the value from the keys list instead of directly accessing the values list
-    // because QMap may have added a default-constructed value to the values list
-    Q_D( const RadioStationModel );
-    if ( index >= 0 && index < d->mStations.keys().count() ) {
-        uint frequency = d->mStations.keys().at( index );
-        return d->mStations.value( frequency );
-    }
-    return RadioStation();
-}
-
-/*!
- * Finds a station by frequency
- */
-bool RadioStationModel::findFrequency( uint frequency, RadioStation& station, FindCriteria::Criteria criteria ) const
-{
-    Q_D( const RadioStationModel );
-
-    if ( criteria == FindCriteria::IncludeManualStation && d->mCurrentStation->frequency() == frequency ) {
-        station = *d->mCurrentStation;
-        return true;
-    }
-
-    if ( d->mStations.contains( frequency ) ) {
-        station = d->mStations.value( frequency );
-        return true;
-    }
-    return false;
-}
-
-/*!
- * Convenience function to find a radio station.
- */
-RadioStation RadioStationModel::findStation( uint frequency, FindCriteria::Criteria criteria ) const
-{
-    RadioStation station;
-    findFrequency( frequency, station, criteria ); // Return value ignored
-    return station;
-}
-
-/*!
- * Finds a station by preset index
- */
-int RadioStationModel::findPresetIndex( int presetIndex )
-{
-    Q_D( RadioStationModel );
-    int index = 0;
-    foreach( const RadioStation& tempStation, d->mStations ) {
-        if ( tempStation.presetIndex() == presetIndex ) {
-            return index;
-        }
-        ++index;
-    }
-
-    return RadioStation::NotFound;
-}
-
-/*!
- * Finds a station by preset index
- */
-int RadioStationModel::findPresetIndex( int presetIndex, RadioStation& station )
-{
-    Q_D( RadioStationModel );
-    const int index = findPresetIndex( presetIndex );
-    if ( index != RadioStation::NotFound ) {
-        station = d->mStations.values().at( index );
-    }
-    return index;
-}
-
-/*!
- * Finds the closest station from the given frequency
- */
-RadioStation RadioStationModel::findClosest( const uint frequency, StationSkip::Mode mode )
-{
-    Q_D( RadioStationModel );
-    const bool findFavorite = mode == StationSkip::PreviousFavorite || mode == StationSkip::NextFavorite;
-    const bool findNext = mode == StationSkip::Next || mode == StationSkip::NextFavorite;
-    QList<RadioStation> list = findFavorite ? d->favorites() : d->mStations.values();
-
-    if ( list.isEmpty() ) {
-        return RadioStation();
-    }
-
-    // Find the previous and next station from current frequency
-    RadioStation previous;
-    RadioStation next;
-    foreach( const RadioStation& station, list ) {
-        const uint testFreq = station.frequency();
-        if ( testFreq == frequency ) {
-            continue;
-        }
-
-        if ( testFreq > frequency ) {
-            next = station;
-            break;
-        }
-        previous = station;
-    }
-
-    // Check if we need to loop around
-    if ( findNext && !next.isValid() ) {
-        next = list.first();
-    } else if ( !findNext && !previous.isValid() ) {
-        previous = list.last();
-    }
-
-    return findNext ? next : previous;
-}
-
-/*!
- * Checks if the model contains the given frequency
- */
-bool RadioStationModel::contains( const uint frequency ) const
-{
-    RadioStation unused;
-    return findFrequency( frequency, unused );
-}
-
-/*!
- * Removes a station by frequency
- */
-void RadioStationModel::removeByFrequency( uint frequency )
-{
-    RadioStation station;
-    if ( findFrequency( frequency, station ) ) {
-        removeStation( station );
-    }
-}
-
-/*!
- * Removes a station by preset index
- */
-void RadioStationModel::removeByPresetIndex( int presetIndex )
-{
-    RadioStation station;
-    const int index = findPresetIndex( presetIndex, station );
-    if ( index >= 0 ) {
-        removeStation( station );
-    }
-}
-
-/*!
- * Removes the given station
- */
-void RadioStationModel::removeStation( const RadioStation& station )
-{
-    Q_D( RadioStationModel );
-    const uint frequency = station.frequency();
-    if ( d->mStations.contains( frequency ) ) {
-
-        // If we are removing the current station, copy its data to the current station pointer
-        // to keep all of the received RDS data still available. They will be discarded when
-        // the user tunes to another frequency, but they are available if the user decides to add it back.
-        if ( d->mCurrentStation->frequency() == frequency ) {
-            *d->mCurrentStation = station;
-        }
-
-        // Copy the station to a temporary variable that can be used as signal parameter
-        RadioStation tempStation = station;
-
-        const int row = indexFromFrequency( tempStation.frequency() );
-        beginRemoveRows( QModelIndex(), row, row );
-
-        d->mPresetStorage->deletePreset( tempStation.presetIndex() );
-        d->mStations.remove( frequency );
-
-        d->mCurrentStation = NULL;
-        d->setCurrentStation( d->mWrapper->currentFrequency() );
-
-        endRemoveRows();
-    }
-}
-
-/*!
- * Public slot
- * Removes all stations
- */
-void RadioStationModel::removeAll( RemoveMode mode )
-{
-    Q_D( RadioStationModel );
-    if ( d->mStations.count() == 0 ) {
-        return;
-    }
-
-    if ( mode == RemoveAll ) {
-        beginRemoveRows( QModelIndex(), 0, rowCount() - 1 );
-
-        // Preset utility deletes all presets with index -1
-        bool success = d->mPresetStorage->deletePreset( -1 );
-        Q_UNUSED( success );
-        RADIO_ASSERT( success, "FMRadio", "Failed to remove station" );
-
-        d->mStations.clear();
-        d->mCurrentStation = NULL;
-        d->setCurrentStation( d->mWrapper->currentFrequency() );
-
-        endRemoveRows();
-    } else {
-        foreach( const RadioStation& station, d->mStations ) {
-
-            if ( mode == RemoveLocalStations ) {
-                if ( station.isType( RadioStation::LocalStation ) && !station.isFavorite() ) {
-                    removeStation( station );
-                }
-            } else {
-                if ( station.isFavorite() ) {
-                    RadioStation newStation( station );
-                    newStation.setFavorite( false );
-                    saveStation( newStation );
-                }
-            }
-        }
-    }
-}
-
-/*!
- * Adds a new station to the list
- */
-void RadioStationModel::addStation( const RadioStation& station )
-{
-    Q_D( RadioStationModel );
-    const int newIndex = findUnusedPresetIndex();
-    LOG_FORMAT( "RadioStationModel::addStation: Adding station to index %d", newIndex );
-
-    RadioStation newStation = station;
-    newStation.setPresetIndex( newIndex );
-    newStation.unsetType( RadioStation::ManualStation );
-
-    // We have to call beginInsertRows() BEFORE the addition is actually done so we must figure out where
-    // the new station will go in the sorted frequency order
-    int row = 0;
-    const int count = rowCount();
-    if ( count > 1 ) {
-        Stations::const_iterator iter = d->mStations.upperBound( newStation.frequency() );
-        if ( d->mStations.contains( iter.key() ) ) {
-            row = d->mStations.keys().indexOf( iter.key() );
-        } else {
-            row = count;
-        }
-    } else if ( count == 1 ) {
-        uint existingFreq = d->mStations.keys().first();
-        if ( station.frequency() > existingFreq ) {
-            row = 1;
-        }
-    }
-
-    beginInsertRows( QModelIndex(), row, row );
-
-    d->doSaveStation( newStation );
-
-    d->setCurrentStation( d->mWrapper->currentFrequency() );
-
-    endInsertRows();
-
-    // Not all UI components listen to rowsInserted() signal so emit the favorite signal
-    if ( newStation.isFavorite() ) {
-        emit favoriteChanged( *d->mCurrentStation );
-    }
-}
-
-/*!
- * Saves the given station. It is expected to already exist in the list
- */
-void RadioStationModel::saveStation( RadioStation& station )
-{
-    Q_D( RadioStationModel );
-    const bool stationHasChanged = station.hasChanged();
-    RadioStation::Change changeFlags = station.changeFlags();
-    station.resetChangeFlags();
-
-    if ( station.isType( RadioStation::ManualStation ) ) {
-
-        d->mManualStation = station;
-        emitChangeSignals( station, changeFlags );
-
-    } else if ( station.isValid() && stationHasChanged && d->mStations.contains( station.frequency() )) {
-
-        d->doSaveStation( station, changeFlags.testFlag( RadioStation::PersistentDataChanged ) );
-        d->setCurrentStation( d->mWrapper->currentFrequency() );
-
-        emitChangeSignals( station, changeFlags );
-    }
-}
-
-/*!
- * Finds number of favorite stations
- */
-int RadioStationModel::favoriteCount()
-{
-    Q_D( const RadioStationModel );
-    return d->favorites().count();
-}
-
-/*!
- * Changes the favorite status of a station by its frequency. If the station does
- * not yet exist, it is added.
- */
-void RadioStationModel::setFavoriteByFrequency( uint frequency, bool favorite )
-{
-    Q_D( RadioStationModel );
-    if ( d->mWrapper->isFrequencyValid( frequency ) ) {
-        LOG_FORMAT( "RadioStationModel::setFavoriteByFrequency, frequency: %d", frequency );
-        RadioStation station;
-        if ( findFrequency( frequency, station ) ) { // Update existing preset
-            if ( station.isFavorite() != favorite ) {
-                station.setFavorite( favorite );
-                saveStation( station );
-            }
-        } else if ( favorite ) {                    // Add new preset if setting as favorite
-            RadioStation newStation;
-            if ( d->mCurrentStation->frequency() == frequency ) {
-                newStation = *d->mCurrentStation;
-            } else {
-                LOG( "CurrentStation frequency mismatch!" );
-                newStation.setFrequency( frequency );
-            }
-
-            newStation.setType( RadioStation::LocalStation | RadioStation::Favorite );
-
-            // Emit the signals only after adding the preset and reinitializing the current station
-            // because the UI will probably query the current station in its slots that get called.
-            addStation( newStation );
-        }
-    }
-}
-
-/*!
- * Changes the favorite status of a station by its preset index
- */
-void RadioStationModel::setFavoriteByPreset( int presetIndex, bool favorite )
-{
-    LOG_FORMAT( "RadioStationModel::setFavoriteByPreset, presetIndex: %d", presetIndex );
-    RadioStation station;
-    if ( findPresetIndex( presetIndex, station ) != RadioStation::NotFound ) {
-        station.setFavorite( favorite );
-        saveStation( station );
-    }
-}
-
-/*!
- * Renames a station by its preset index
- */
-void RadioStationModel::renameStation( int presetIndex, const QString& name )
-{
-    LOG_FORMAT( "RadioStationModel::renameStation, presetIndex: %d, name: %s", presetIndex, GETSTRING(name) );
-    RadioStation station;
-    if ( findPresetIndex( presetIndex, station ) != RadioStation::NotFound ) {
-        station.setUserDefinedName( name );
-        saveStation( station );
-    }
-}
-
-/*!
- *
- */
-void RadioStationModel::setFavorites( const QModelIndexList& favorites )
-{
-    foreach ( const QModelIndex& index, favorites ) {
-        RadioStation station = stationAt( index.row() );
-        RADIO_ASSERT( station.isValid() , "RadioStationModel::setFavorites", "invalid RadioStation");
-        setFavoriteByPreset( station.presetIndex(), true );
-    }
-}
-
-/*!
- * Returns the currently tuned station
- */
-RadioStation& RadioStationModel::currentStation()
-{
-    Q_D( RadioStationModel );
-    return *d->mCurrentStation;
-}
-
-/*!
- * Returns the currently tuned station
- */
-const RadioStation& RadioStationModel::currentStation() const
-{
-    Q_D( const RadioStationModel );
-    return *d->mCurrentStation;
-}
-
-/*!
- * Sets the model detail level
- */
-void RadioStationModel::setDetail( Detail level )
-{
-    Q_D( RadioStationModel );
-    d->mDetailLevel = level;
-}
-
-/*!
- * Returns a list of radio stations in the given frequency range
- */
-QList<RadioStation> RadioStationModel::stationsInRange( uint minFrequency, uint maxFrequency )
-{
-    Q_D( RadioStationModel );
-    QList<RadioStation> stations;
-    foreach( const RadioStation& station, d->mStations ) {
-        if ( station.frequency() >= minFrequency && station.frequency() <= maxFrequency ) {
-            stations.append( station );
-        }
-    }
-
-    return stations;
-}
-
-/*!
- * Returns the model index corresponding to the given frequency
- */
-int RadioStationModel::indexFromFrequency( uint frequency )
-{
-    RadioStation station;
-    if ( findFrequency( frequency, station ) ) {
-        return findPresetIndex( station.presetIndex() );
-    }
-    return -1;
-}
-
-/*!
- * Private slot
- * Timer timeout slot to indicate that the dynamic PS check has ended
- */
-void RadioStationModel::dynamicPsCheckEnded()
-{
-    Q_D( RadioStationModel );
-    LOG_TIMESTAMP( "Finished dynamic PS check." );
-    if ( d->mCurrentStation->psType() != RadioStation::Dynamic && !d->mCurrentStation->dynamicPsText().isEmpty() )
-    {
-        d->mCurrentStation->setPsType( RadioStation::Static );
-        d->mCurrentStation->setName( d->mCurrentStation->dynamicPsText() );
-        d->mCurrentStation->setDynamicPsText( "" );
-        saveStation( *d->mCurrentStation );
-    }
-}
-
-/*!
- * Checks the given station and emits signals based on what member variables had been changed
- */
-void RadioStationModel::emitChangeSignals( const RadioStation& station, RadioStation::Change flags )
-{
-    if ( flags.testFlag( RadioStation::NameChanged ) ||
-         flags.testFlag( RadioStation::GenreChanged ) ||
-         flags.testFlag( RadioStation::UrlChanged ) ||
-         flags.testFlag( RadioStation::TypeChanged ) ||
-         flags.testFlag( RadioStation::PiCodeChanged ) ) {
-
-        // Create a temporary RadioStation for the duration of the signal-slot processing
-        // The receivers can ask the station what data has changed and update accordingly
-        RadioStation tempStation( station );
-        tempStation.setChangeFlags( flags );
-        emit stationDataChanged( tempStation );
-
-        emitDataChanged( tempStation );
-    }
-
-    if ( flags.testFlag( RadioStation::RadioTextChanged ) ) {
-        emit radioTextReceived( station );
-        emitDataChanged( station );
-    }
-
-    if ( flags.testFlag( RadioStation::DynamicPsChanged ) ) {
-        emit dynamicPsChanged( station );
-        emitDataChanged( station );
-    }
-
-    if ( flags.testFlag( RadioStation::FavoriteChanged ) && station.isValid() ) {
-        emit favoriteChanged( station );
-        emitDataChanged( station );
-    }
-}
-
-/*!
- *
- */
-void RadioStationModel::emitDataChanged( const RadioStation& station )
-{
-    const int row = findPresetIndex( station.presetIndex() );
-    QModelIndex top = index( row, 0, QModelIndex() );
-    QModelIndex bottom = index( row, 0, QModelIndex() );
-    emit dataChanged( top, bottom );
-}
-
-/*!
- * Finds an unused preset index
- */
-int RadioStationModel::findUnusedPresetIndex()
-{
-    Q_D( RadioStationModel );
-    QList<int> indexes;
-    foreach( const RadioStation& station, d->mStations ) {
-        if ( station.isValid() ) {
-            indexes.append( station.presetIndex() );
-        }
-    }
-
-    int index = 0;
-    for ( ; indexes.contains( index ); ++index ) {
-        // Nothing to do here
-    }
-
-    LOG_FORMAT( "RadioStationModel::findUnusedPresetIndex, index: %d", index );
-    return index;
-}
--- a/radioapp/radiouiengine/src/radiostationmodel_p.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,332 +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:
-*
-*/
-
-// System includes
-#include <QTimer>
-
-// User includes
-#include "radiostationmodel.h"
-#include "radiostationmodel_p.h"
-#include "radiologger.h"
-#include "radiopresetstorage.h"
-#include "radioenginewrapper.h"
-#include "radiouiengine.h"
-#include "radiouiengine_p.h"
-#include "radiostation.h"
-#include "radiostation_p.h"
-#include "radiohistorymodel.h"
-
-// Constants
-/**
- * Timeout period for checking if station is sending dynamic PS in milliseconds
- */
-const int DYNAMIC_PS_CHECK_TIMEOUT = 10 * 1000;
-
-/*!
- *
- */
-RadioStationModelPrivate::RadioStationModelPrivate( RadioStationModel* model,
-                                                    RadioUiEnginePrivate& uiEngine ) :
-    q_ptr( model ),
-    mUiEngine( uiEngine ),
-    mCurrentStation( &mManualStation ),
-    mDynamicPsTimer( new QTimer() )
-{
-    mManualStation.setType( RadioStation::ManualStation );
-    Radio::connect( mDynamicPsTimer.data(), SIGNAL(timeout()),
-                    q_ptr,                  SLOT(dynamicPsCheckEnded()) );
-    mDynamicPsTimer->setInterval( DYNAMIC_PS_CHECK_TIMEOUT );
-    mDynamicPsTimer->setSingleShot( true );
-}
-
-/*!
- *
- */
-RadioStationModelPrivate::~RadioStationModelPrivate()
-{
-    // Destructor needs to be defined. See explanation from RadioEngineWrapperPrivate destructor.
-}
-
-/*!
- * \reimp
- */
-uint RadioStationModelPrivate::currentFrequency() const
-{
-    return mCurrentStation->frequency();
-}
-
-/*!
- * \reimp
- */
-int RadioStationModelPrivate::currentPresetIndex() const
-{
-    return mCurrentStation->presetIndex();
-}
-
-/*!
- * Sets the currently tuned frequency. Meant to be set by the engine wrapper
- */
-void RadioStationModelPrivate::setCurrentStation( uint frequency )
-{
-    LOG_METHOD;
-    RadioStation* oldStation = mCurrentStation;
-    if ( mStations.contains( frequency ) ) {
-        // We have to be careful to check that key exists before using operator[]
-        // with QMap since it will insert a default-constructed value if it doesn't exist yet.
-        mCurrentStation = &mStations[ frequency ];
-    } else {
-        mManualStation.reset();
-        mManualStation.setType( RadioStation::ManualStation );
-        mManualStation.setFrequency( frequency );
-        mCurrentStation = &mManualStation;
-    }
-
-    Q_Q( RadioStationModel );
-    if ( oldStation && oldStation->isValid() ) {
-        q->emitDataChanged( *oldStation );
-        q->emitDataChanged( *mCurrentStation );
-    }
-}
-
-/*!
- * \reimp
- * Sets the genre to the currently tuned station
- */
-void RadioStationModelPrivate::setCurrentGenre( uint frequency, int genre )
-{
-    Q_Q( RadioStationModel );
-    RadioStation station = q->findStation( frequency, FindCriteria::IncludeManualStation );
-    if ( !station.isValid() ) {
-        LOG( "Unable to find current station. Ignoring RDS" );
-        return;
-    }
-    station.setGenre( genre );
-    q->saveStation( station );
-}
-
-/*!
- * \reimp
- *
- */
-void RadioStationModelPrivate::tunedToFrequency( uint frequency, int reason )
-{
-    if ( reason == TuneReason::Seek ) {
-        addScannedFrequency( frequency );
-    }
-
-    setCurrentStation( frequency );
-    startDynamicPsCheck();
-}
-
-/*!
- * \reimp
- * Checks if the given frequency exists in the list
- */
-bool RadioStationModelPrivate::containsFrequency( uint frequency )
-{
-    return mStations.contains( frequency );
-}
-
-/*!
- * \reimp
- * Checks if the given preset index exists in the list
- */
-bool RadioStationModelPrivate::containsPresetIndex( int presetIndex )
-{
-    Q_Q( RadioStationModel );
-    return q->findPresetIndex( presetIndex ) != RadioStation::NotFound;
-}
-
-/*!
- * \reimp
- * Starts the dynamic PS check
- */
-void RadioStationModelPrivate::startDynamicPsCheck()
-{
-    // Start the Dynamic PS check if the station has no name and ps type is not known
-    // During the dynamic PS check the RadioStation's dynamicPs variable is used to store the
-    // received PS name even though at this point it isn't known if it is dynamic or not.
-    mDynamicPsTimer->stop();
-    if ( mCurrentStation->psType() == RadioStation::Unknown ) {
-        mCurrentStation->setDynamicPsText( "" );
-        mDynamicPsTimer->start();
-    }
-}
-
-/*!
- * \reimp
- *
- */
-void RadioStationModelPrivate::addScannedFrequency( uint frequency )
-{
-    Q_Q( RadioStationModel );
-    RadioStation station;
-    if ( q->findFrequency( frequency, station ) ) {
-        station.setType( RadioStation::LocalStation );
-        q->saveStation( station );
-    } else {
-        station.setType( RadioStation::LocalStation );
-        station.setFrequency( frequency );
-        q->addStation( station );
-    }
-}
-
-/*!
- * \reimp
- * Sets the PS name to the currently tuned station
- */
-void RadioStationModelPrivate::setCurrentPsName( uint frequency, const QString& name )
-{
-    Q_Q( RadioStationModel );
-    LOG_FORMAT( "void RadioStationModelPrivate::setCurrentPsName: %s", GETSTRING( name ) );
-    RadioStation station = q->findStation( frequency, FindCriteria::IncludeManualStation );
-    if ( !station.isValid() ) {
-        LOG( "Unable to find current station. Ignoring RDS" );
-        return;
-    }
-
-    if ( station.psType() == RadioStation::Static ) {
-
-        if ( name.compare( station.name() ) != 0 && !station.isRenamed() ) {
-            station.setName( name );
-            q->saveStation( station );
-        }
-
-    } else {
-
-        if ( mDynamicPsTimer->isActive() ) {    // Dynamic PS check is ongoing
-            LOG( "Dynamic Ps check ongoing" );
-
-            if ( !station.dynamicPsText().isEmpty() &&
-                    name.compare( station.dynamicPsText(), Qt::CaseInsensitive ) != 0  ) {
-                LOG( "Dynamic Ps check - Second PS name arrived and is different. PS is dynamic" );
-                station.setPsType( RadioStation::Dynamic ); // Station is sending Dynamic PS
-                mDynamicPsTimer->stop();
-
-                // Cleanup the station name if region is not America
-                if ( !station.name().isEmpty()
-                     && !station.isRenamed()
-                     && mWrapper->region() != RadioRegion::America )
-                {
-                    LOG( "Station name cleanup" );
-                    station.setName( "" );
-                }
-            }
-
-            // Received PS name is published to the UI as dynamic PS while the check is ongoing
-            // even though at this stage we don't know if it is dynamic or not.
-
-            station.setDynamicPsText( name );
-            q->saveStation( station );
-
-        } else {
-
-            if ( station.psType() == RadioStation::Dynamic ) {
-                LOG( "Station uses Dynamic Ps" );
-            } else {
-                LOG( "Station PS type unknown" );
-            }
-
-            station.setDynamicPsText( name );
-            q->saveStation( station );
-        }
-    }
-}
-
-/*!
- * \reimp
- * Sets the radio text to the currently tuned station
- */
-void RadioStationModelPrivate::setCurrentRadioText( uint frequency, const QString& radioText )
-{
-    Q_Q( RadioStationModel );
-    RadioStation station = q->findStation( frequency, FindCriteria::IncludeManualStation );
-    if ( !station.isValid() ) {
-        LOG( "Unable to find current station. Ignoring RDS" );
-        return;
-    }
-    station.setRadioText( radioText );
-    q->saveStation( station );
-    mUiEngine.api().historyModel().clearRadioTextPlus();
-}
-
-/*!
- * \reimp
- * Sets the radio text plus to the currently tuned station
- */
-void RadioStationModelPrivate::setCurrentRadioTextPlus( uint frequency, int rtClass, const QString& rtItem )
-{
-    Q_Q( RadioStationModel );
-    RadioStation station = q->findStation( frequency, FindCriteria::IncludeManualStation );
-    if ( !station.isValid() ) {
-        LOG( "Unable to find current station. Ignoring RDS" );
-        return;
-    }
-    station.setRadioTextPlus( rtClass, rtItem );
-    q->saveStation( station );
-    mUiEngine.api().historyModel().addRadioTextPlus( rtClass, rtItem, station );
-}
-
-/*!
- * \reimp
- * Sets the PI code to the currently tuned station
- */
-void RadioStationModelPrivate::setCurrentPiCode( uint frequency, int piCode )
-{
-    Q_Q( RadioStationModel );
-    RadioStation station = q->findStation( frequency, FindCriteria::IncludeManualStation );
-    if ( !station.isValid() ) {
-        LOG( "Unable to find current station. Ignoring RDS" );
-        return;
-    }
-#ifdef SHOW_CALLSIGN_IN_ANY_REGION
-    RadioRegion::Region region = RadioRegion::America;
-#else
-    RadioRegion::Region region =  mWrapper->region();
-#endif
-
-    station.setPiCode( piCode, region );
-    q->saveStation( station );
-}
-
-/*!
- *
- */
-void RadioStationModelPrivate::doSaveStation( RadioStation& station, bool persistentSave )
-{
-    mStations.insert( station.frequency(), station );
-
-    if ( persistentSave ) {
-        const bool success = mPresetStorage->savePreset( *station.data_ptr() );
-        RADIO_ASSERT( success, "RadioStationModelPrivate::saveStation", "Failed to add station" );
-        Q_UNUSED( success );
-    }
-}
-
-/*!
- *
- */
-QList<RadioStation> RadioStationModelPrivate::favorites() const
-{
-    QList<RadioStation> favoriteList;
-    foreach( const RadioStation& tempStation, mStations ) {
-        if ( tempStation.isFavorite() ) {
-            favoriteList.append( tempStation );
-        }
-    }
-    return favoriteList;
-}
--- a/radioapp/radiouiengine/src/radiouiengine.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,596 +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:
-*
-*/
-
-// System includes
-#include <QScopedPointer>
-#include <QProcess>
-#include <QFile>
-#include <QTimer>
-#include <QDesktopServices>
-#include <QUrl>
-
-#ifdef BUILD_WIN32
-#   include <QSettings>
-#else
-#   include <XQSettingsManager>
-#endif // WIN32_BUILD
-
-// User includes
-#include "radiouiengine.h"
-#include "radiouiengine_p.h"
-#include "radioenginewrapper.h"
-#include "radiostationmodel.h"
-#include "radiohistorymodel.h"
-#include "radiohistoryitem.h"
-#include "radiosettings.h"
-#include "radioscannerengine.h"
-#include "radiogenrelocalizer.h"
-#include "radiologger.h"
-
-// Constants
-const uint RADIO_CENREP_UID = 0x2002FF52;
-const uint RADIO_CENREP_FREQUENCY_KEY = 0x207;
-const uint RADIO_CENREP_HEADSET_VOLUME = 0x200;
-
-const QLatin1String OVI_STORE_URL( "http://www.music.nokia.co.uk/Touch/Search.aspx?artistsearch=#artist#&titlesearch=#title#" );
-const QLatin1String OTHER_STORE_URL( "http://www.amazon.com/gp/search/ref=sr_adv_m_digital/?search-alias=digital-music&field-author=#artist#&field-title=#title#" );
-const QLatin1String OTHER_STORE_ARTIST_TAG( "#artist#" );
-const QLatin1String OTHER_STORE_TITLE_TAG( "#title#" );
-const char WHITESPACE = ' ';
-const char WHITESPACE_REPLACEMENT = '+';
-
-// Constants used when launching radio server
-const QLatin1String RADIO_SERVER_NAME( "radioserver.exe" );
-const QLatin1String RADIO_RANGE_USEURO( "useuro" );
-const QLatin1String RADIO_RANGE_JAPAN( "japan" );
-
-// ====== STATIC FUNCTIONS ========
-
-/*!
- * Gets the last tuned frequency from central repository
- */
-uint RadioUiEngine::lastTunedFrequency( uint defaultFrequency )
-{
-    uint frequency = defaultFrequency;
-
-#ifdef BUILD_WIN32
-    QScopedPointer<QSettings> settings( new QSettings( "Nokia", "QtFmRadio" ) );
-    frequency = settings->value( "CurrentFreq", DEFAULT_MIN_FREQUENCY ).toUInt();
-    if ( frequency == 0 ) {
-        frequency = defaultFrequency;
-    }
-#else
-    QScopedPointer<XQSettingsManager> settings( new XQSettingsManager() );
-    XQSettingsKey key( XQSettingsKey::TargetCentralRepository, RADIO_CENREP_UID, RADIO_CENREP_FREQUENCY_KEY );
-    frequency = settings->readItemValue( key, XQSettingsManager::TypeInt ).toUInt();
-    if ( frequency == 0 ) {
-        frequency = defaultFrequency;
-    }
-#endif
-
-    return frequency;
-}
-
-/*!
- * Gets the last used volume level
- */
-int RadioUiEngine::lastVolume()
-{
-    int volume = DEFAULT_VOLUME_LEVEL;
-
-#ifndef BUILD_WIN32
-    QScopedPointer<XQSettingsManager> settings( new XQSettingsManager() );
-    XQSettingsKey key( XQSettingsKey::TargetCentralRepository, RADIO_CENREP_UID, RADIO_CENREP_HEADSET_VOLUME );
-    volume = settings->readItemValue( key, XQSettingsManager::TypeInt ).toInt();
-    if ( volume == 0 ) {
-        volume = DEFAULT_VOLUME_LEVEL;
-    }
-#endif
-
-    return volume;
-}
-
-/*!
- * Launches the radio server process
- */
-void RadioUiEngine::launchRadioServer()
-{
-    QStringList args;
-    args << RADIO_RANGE_USEURO; //TODO: Determine current region
-    args << QString::number( lastTunedFrequency( 0 ) );
-    args << QString::number( lastVolume() );
-
-    QProcess serverProcess;
-    bool success = serverProcess.startDetached( RADIO_SERVER_NAME, args );
-    LOG_ASSERT( success, LOG( "Failed to start radio server!" ) );
-}
-
-// ====== MEMBER FUNCTIONS ========
-
-/*!
- *
- */
-RadioUiEngine::RadioUiEngine( QObject* parent ) :
-    QObject( parent ),
-    d_ptr( new RadioUiEnginePrivate( this ) )
-{
-}
-
-/*!
- *
- */
-RadioUiEngine::~RadioUiEngine()
-{
-}
-
-/*!
- *
- */
-bool RadioUiEngine::isInitialized() const
-{
-    Q_D( const RadioUiEngine );
-    return !d->mEngineWrapper.isNull();
-}
-
-/*!
- *
- */
-bool RadioUiEngine::init()
-{
-    Q_D( RadioUiEngine );
-    return d->init();
-}
-
-/*!
- *
- */
-bool RadioUiEngine::isFirstTimeStart()
-{
-    Q_D( RadioUiEngine );
-    return d->mEngineWrapper->settings().isFirstTimeStart();
-}
-
-/*!
- *
- */
-void RadioUiEngine::setFirstTimeStartPerformed( bool firstTimeStartPerformed )
-{
-    Q_D( RadioUiEngine );
-    d->mEngineWrapper->settings().setFirstTimeStartPerformed( firstTimeStartPerformed );
-}
-
-/*!
- *
- */
-void RadioUiEngine::setPowerOn()
-{
-    setMute( false );
-
-    Q_D( RadioUiEngine );
-    if ( d->mPowerOffTimer ) {
-        d->mPowerOffTimer->stop();
-        d->mPowerOffTimer->deleteLater();
-        d->mPowerOffTimer = NULL;
-    }
-}
-
-/*!
- *
- */
-void RadioUiEngine::setPowerOff( int delay )
-{
-    Q_D( RadioUiEngine );
-    d->mEngineWrapper->setMute( true, false );
-
-    if ( delay > 0 ) {
-        if ( !d->mPowerOffTimer ) {
-            d->mPowerOffTimer = new QTimer( this );
-            Radio::connect( d->mPowerOffTimer,  SIGNAL(timeout()),
-                            this,               SIGNAL(powerOffRequested()) );
-        }
-
-        d->mPowerOffTimer->start( delay );
-    } else {
-        emit powerOffRequested();
-    }
-}
-
-/*!
- *
- */
-bool RadioUiEngine::isPoweringOff() const
-{
-    Q_D( const RadioUiEngine );
-    return d->mPowerOffTimer && d->mPowerOffTimer->isActive();
-}
-
-/*!
- * Returns the settings handler owned by the engine
- */
-RadioSettingsIf& RadioUiEngine::settings()
-{
-    Q_D( RadioUiEngine );
-    return d->mEngineWrapper->settings();
-}
-
-/*!
- * Returns the station model
- */
-RadioStationModel& RadioUiEngine::stationModel()
-{
-    Q_D( RadioUiEngine );
-    return *d->mStationModel;
-}
-
-/*!
- * Returns the history model
- */
-RadioHistoryModel& RadioUiEngine::historyModel()
-{
-    Q_D( RadioUiEngine );
-    return *d->mHistoryModel;
-}
-
-/*!
- * Creates a scanner engine and returns a pointer to it
- * The returned pointer is wrapped inside a QScopedPointer to ensure this won't
- * leak memory. The returned engine will be deleted even if the caller ignored
- * the return value.
- */
-RadioScannerEnginePtr RadioUiEngine::createScannerEngine()
-{
-    Q_D( RadioUiEngine );
-#if defined BUILD_WIN32 || defined __WINS__
-    Q_ASSERT_X( !d->mScannerEngine, "RadioUiEngine::createScannerEngine", "Previous scanner instance not freed" );
-#endif
-
-    RadioScannerEnginePtr enginePtr( new RadioScannerEngine( *d ) );
-    d->mScannerEngine = enginePtr;
-
-    return enginePtr;
-}
-
-/*!
- *
- */
-RadioScannerEngine* RadioUiEngine::scannerEngine()
-{
-    Q_D( RadioUiEngine );
-    return d->mScannerEngine.data();
-}
-
-/*!
- *
- */
-bool RadioUiEngine::isRadioOn() const
-{
-    Q_D( const RadioUiEngine );
-    return d->mEngineWrapper->isRadioOn();
-}
-
-/*!
- *
- */
-bool RadioUiEngine::isScanning() const
-{
-    Q_D( const RadioUiEngine );
-    if ( d->mScannerEngine ) {
-        return d->mScannerEngine.data()->isScanning();
-    }
-    return false;
-}
-
-/*!
- *
- */
-bool RadioUiEngine::isMuted() const
-{
-    Q_D( const RadioUiEngine );
-    return d->mEngineWrapper->isMuted();
-}
-
-/*!
- *
- */
-bool RadioUiEngine::isAntennaAttached() const
-{
-    Q_D( const RadioUiEngine );
-    return d->mEngineWrapper->isAntennaAttached();
-}
-
-/*!
- *
- */
-bool RadioUiEngine::isUsingLoudspeaker() const
-{
-    Q_D( const RadioUiEngine );
-    return d->mEngineWrapper->isUsingLoudspeaker();
-}
-
-/*!
- * Returns the selected radio region
- */
-RadioRegion::Region RadioUiEngine::region() const
-{
-    Q_D( const RadioUiEngine );
-    return d->mEngineWrapper->region();
-}
-
-/*!
- * Returns the currently tuned frequency
- */
-uint RadioUiEngine::currentFrequency() const
-{
-    Q_D( const RadioUiEngine );
-    return d->mEngineWrapper->currentFrequency();
-}
-
-/*!
- * Returns the minimum frequency
- */
-uint RadioUiEngine::minFrequency() const
-{
-    Q_D( const RadioUiEngine );
-    return d->mEngineWrapper->minFrequency();
-}
-
-/*!
- * Returns the maximum frequency
- */
-uint RadioUiEngine::maxFrequency() const
-{
-    Q_D( const RadioUiEngine );
-    return d->mEngineWrapper->maxFrequency();
-}
-
-/*!
- * Returns the frequency step size from the selected region
- */
-uint RadioUiEngine::frequencyStepSize() const
-{
-    Q_D( const RadioUiEngine );
-    return d->mEngineWrapper->frequencyStepSize();
-}
-
-/*!
- * Sets the mute status
- */
-void RadioUiEngine::setMute( bool muted )
-{
-    Q_D( RadioUiEngine );
-    d->mEngineWrapper->setMute( muted );
-}
-
-/*!
- *
- */
-QList<RadioStation> RadioUiEngine::stationsInRange( uint minFrequency, uint maxFrequency )
-{
-    Q_D( RadioUiEngine );
-    return d->mStationModel->stationsInRange( minFrequency, maxFrequency );
-}
-
-/*!
- *
- */
-QString RadioUiEngine::genreToString( int genre, GenreTarget::Target target )
-{
-    return RadioGenreLocalizer::genreToString( region(), genre, target );
-}
-
-/*!
- *
- */
-bool RadioUiEngine::isSongRecognitionAppAvailable()
-{
-    //TODO: Implement Shazam support
-    return false;
-}
-
-/*!
- *
- */
-void RadioUiEngine::addRecognizedSong( const QString& artist, const QString& title, const RadioStation& station )
-{
-    Q_D( RadioUiEngine );
-    d->mHistoryModel->addItem( artist, title, station );
-}
-
-/*!
- *
- */
-uint RadioUiEngine::skipStation( StationSkip::Mode mode, uint startFrequency, const int reason )
-{
-    Q_D( RadioUiEngine );
-    return d->skip( mode, startFrequency, reason );
-}
-
-/*!
- *
- */
-void RadioUiEngine::openMusicStore( const RadioHistoryItem& item, MusicStore store )
-{
-    QString artist = item.artist();
-    artist.replace( WHITESPACE, WHITESPACE_REPLACEMENT );
-    QString title = item.title();
-    title.replace( WHITESPACE, WHITESPACE_REPLACEMENT );
-
-    QString url = store == OviStore ? OVI_STORE_URL : OTHER_STORE_URL;
-    url.replace( OTHER_STORE_ARTIST_TAG, artist );
-    url.replace( OTHER_STORE_TITLE_TAG, title );
-
-    launchBrowser( url );
-}
-
-/*!
- *
- */
-void RadioUiEngine::launchBrowser( const QString& url )
-{
-    QDesktopServices::openUrl( QUrl( url ) );
-}
-
-/*!
- * Sets or unsets the engine to manual seek mode
- */
-void RadioUiEngine::setManualSeekMode( bool manualSeek )
-{
-    Q_D( RadioUiEngine );
-    d->mEngineWrapper->setManualSeekMode( manualSeek );
-}
-
-/*!
- * Checks if the engine is in manual seek mode
- */
-bool RadioUiEngine::isInManualSeekMode() const
-{
-    Q_D( const RadioUiEngine );
-    return d->mEngineWrapper->isInManualSeekMode();
-}
-
-/*!
- * Tunes the radio engine to given frequency
- */
-void RadioUiEngine::setFrequency( uint frequency, const int reason )
-{
-    Q_D( RadioUiEngine );
-    if ( frequency != d->mStationModel->currentStation().frequency() && d->mEngineWrapper->isFrequencyValid( frequency ) ) {
-        LOG_FORMAT( "RadioUiEngine::tuneFrequency, frequency: %d", frequency );
-        d->cancelSeeking();
-        d->mEngineWrapper->setFrequency( frequency, reason );
-    }
-}
-
-/*!
- * Public slot
- * volume update command slot for the engine
- */
-void RadioUiEngine::setVolume( int volume )
-{
-    Q_D( RadioUiEngine );
-    d->mEngineWrapper->setVolume( volume );
-}
-
-/*!
- * Public slot
- *
- */
-void RadioUiEngine::toggleMute()
-{
-    Q_D( RadioUiEngine );
-    if ( !isScanning() ) {
-        d->mEngineWrapper->setMute( !d->mEngineWrapper->isMuted() );
-    }
-}
-
-/*!
- * Public slot
- *
- */
-void RadioUiEngine::toggleAudioRoute()
-{
-    Q_D( RadioUiEngine );
-    d->mEngineWrapper->toggleAudioRoute();
-}
-
-/*!
- * Public slot
- *
- */
-void RadioUiEngine::seekStation( int seekDirection )
-{
-    if ( isAntennaAttached() ) {
-        Q_D( RadioUiEngine );
-        Seek::Direction direction = static_cast<Seek::Direction>( seekDirection );
-        emitSeekingStarted( direction );
-        d->mEngineWrapper->startSeeking( direction, TuneReason::Seek );
-    }
-}
-
-/*!
- * Public slot
- *
- */
-void RadioUiEngine::launchSongRecognition()
-{
-    //TODO: Implement Shazam support
-}
-
-/*!
- * Function used by the private implementation to emit a tunedToFrequency signal
- */
-void RadioUiEngine::emitTunedToFrequency( uint frequency, int commandSender )
-{
-    emit tunedToFrequency( frequency, commandSender );
-}
-
-/*!
- * Function used by the private implementation to emit a seekingStarted signal
- */
-void RadioUiEngine::emitSeekingStarted( Seek::Direction direction )
-{
-    emit seekingStarted( direction );
-}
-
-/*!
- * Function used by the private implementation to emit a radioStatusChanged signal
- */
-void RadioUiEngine::emitRadioStatusChanged( bool radioIsOn )
-{
-    emit radioStatusChanged( radioIsOn );
-}
-
-/*!
- * Function used by the private implementation to emit a rdsAvailabilityChanged signal
- */
-void RadioUiEngine::emitRdsAvailabilityChanged( bool available )
-{
-    emit rdsAvailabilityChanged( available );
-}
-
-/*!
- * Function used by the private implementation to emit a volumeChanged signal
- */
-void RadioUiEngine::emitVolumeChanged( int volume )
-{
-    emit volumeChanged( volume );
-}
-
-/*!
- * Function used by the private implementation to emit a muteChanged signal
- */
-void RadioUiEngine::emitMuteChanged( bool muted )
-{
-    emit muteChanged( muted );
-}
-
-/*!
- * Function used by the private implementation to emit a audioRouteChanged signal
- */
-void RadioUiEngine::emitAudioRouteChanged( bool loudspeaker )
-{
-    emit audioRouteChanged( loudspeaker );
-}
-
-/*!
- * Function used by the private implementation to emit a antennaStatusChanged signal
- */
-void RadioUiEngine::emitAntennaStatusChanged( bool connected )
-{
-    emit antennaStatusChanged( connected );
-}
-
--- a/radioapp/radiouiengine/src/radiouiengine_p.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,262 +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:
-*
-*/
-
-// System includes
-#include <QApplication>
-#include <QStringList>
-#include <QDateTime>
-#ifndef BUILD_WIN32
-#   include <XQSettingsManager>
-#   include <XQPublishAndSubscribeSettingsKey>
-#   include <XQPublishAndSubscribeUtils>
-#endif
-
-// User includes
-#include "radiouiengine.h"
-#include "radiouiengine_p.h"
-#include "radioenginewrapper.h"
-#include "radiostationmodel.h"
-#include "radiostationmodel_p.h"
-#include "radiohistorymodel.h"
-#include "radiopresetstorage.h"
-#include "radiosettings.h"
-#include "radiostation.h"
-#include "radioscannerengine.h"
-#include "radiostationhandlerif.h"
-#include "radiocontrolservice.h"
-#include "radiomonitorservice.h"
-#include "radioservicedef.h"
-#include "radiologger.h"
-
-/*!
- *
- */
-RadioUiEnginePrivate::RadioUiEnginePrivate( RadioUiEngine* engine ) :
-    q_ptr( engine ),
-    mPowerOffTimer( NULL )
-{
-}
-
-/*!
- *
- */
-RadioUiEnginePrivate::~RadioUiEnginePrivate()
-{
-#ifndef BUILD_WIN32
-    XQSettingsManager settingsManager;
-    XQPublishAndSubscribeUtils utils( settingsManager );
-    XQPublishAndSubscribeSettingsKey radioStartupKey( KRadioPSUid, KRadioStartupKey );
-    bool deleted = utils.deleteProperty( radioStartupKey );
-    LOG_ASSERT( deleted, LOG( "RadioUiEnginePrivate::~RadioUiEnginePrivate(). Failed to remove P&S key" ) );
-#endif
-}
-
-/*!
- *
- */
-RadioUiEngine& RadioUiEnginePrivate::api()
-{
-    Q_Q( RadioUiEngine );
-    return *q;
-}
-
-/*!
- *
- */
-bool RadioUiEnginePrivate::init()
-{
-    mControlService.reset( new RadioControlService( *q_ptr ) );
-    mMonitorService.reset( new RadioMonitorService( *this ) );
-    mStationModel.reset( new RadioStationModel( *this ) );
-
-    mEngineWrapper.reset( new RadioEngineWrapper( mStationModel->stationHandlerIf() ) );
-    if ( !mEngineWrapper->init() ) {
-        return false;
-    }
-    mEngineWrapper->addObserver( this );
-
-    mPresetStorage.reset( new RadioPresetStorage() );
-    mStationModel->initialize( mPresetStorage.data(), mEngineWrapper.data() );
-    mHistoryModel.reset( new RadioHistoryModel( *q_ptr ) );
-
-#ifndef BUILD_WIN32
-    // Write the startup timestamp to P&S key for the homescreen widget
-    XQSettingsManager settingsManager;
-    XQPublishAndSubscribeUtils utils( settingsManager );
-    XQPublishAndSubscribeSettingsKey radioStartupKey( KRadioPSUid, KRadioStartupKey );
-    bool defined = utils.defineProperty( radioStartupKey, XQSettingsManager::TypeInt );
-    if ( defined ) {
-        settingsManager.writeItemValue( radioStartupKey, (int)QDateTime::currentDateTime().toTime_t() );
-    }
-#endif
-
-    mMonitorService->init();
-
-    return true;
-}
-
-/*!
- *
- */
-void RadioUiEnginePrivate::cancelSeeking()
-{
-    mEngineWrapper->cancelSeeking();
-}
-
-/*!
- *
- */
-RadioEngineWrapper& RadioUiEnginePrivate::wrapper()
-{
-    return *mEngineWrapper;
-}
-
-/*!
- *
- */
-void RadioUiEnginePrivate::tunedToFrequency( uint frequency, int reason )
-{
-    Q_Q( RadioUiEngine );
-    q->emitTunedToFrequency( frequency, reason );
-}
-
-/*!
- *
- */
-void RadioUiEnginePrivate::radioStatusChanged( bool radioIsOn )
-{
-    Q_Q( RadioUiEngine );
-    q->emitRadioStatusChanged( radioIsOn );
-}
-
-/*!
- *
- */
-void RadioUiEnginePrivate::rdsAvailabilityChanged( bool available )
-{
-    Q_Q( RadioUiEngine );
-    q->emitRdsAvailabilityChanged( available );
-}
-
-/*!
- *
- */
-void RadioUiEnginePrivate::increaseVolume()
-{
-    Q_Q( RadioUiEngine );
-    if( q->isScanning() ){
-        // volume not changed while scanning
-    } else {
-        mEngineWrapper->increaseVolume();
-    }
-}
-
-/*!
- *
- */
-void RadioUiEnginePrivate::decreaseVolume()
-{
-    Q_Q( RadioUiEngine );
-    if( q->isScanning() ) {
-        // volume not changed while scanning
-    } else {
-        mEngineWrapper->decreaseVolume();
-    }
-}
-
-/*!
- *
- */
-void RadioUiEnginePrivate::volumeChanged( int volume )
-{
-    Q_Q( RadioUiEngine );
-    q->emitVolumeChanged( volume );
-}
-
-/*!
- *
- */
-void RadioUiEnginePrivate::muteChanged( bool muted )
-{
-    Q_Q( RadioUiEngine );
-    q->emitMuteChanged( muted );
-}
-
-/*!
- *
- */
-void RadioUiEnginePrivate::audioRouteChanged( bool loudspeaker )
-{
-    Q_Q( RadioUiEngine );
-    q->emitAudioRouteChanged( loudspeaker );
-}
-
-/*!
- *
- */
-void RadioUiEnginePrivate::antennaStatusChanged( bool connected )
-{
-    Q_Q( RadioUiEngine );
-    q->emitAntennaStatusChanged( connected );
-}
-
-/*!
- *
- */
-void RadioUiEnginePrivate::skipPrevious()
-{
-    skip( StationSkip::PreviousFavorite, 0, TuneReason::SkipFromEngine );
-}
-
-/*!
- *
- */
-void RadioUiEnginePrivate::skipNext()
-{
-    skip( StationSkip::NextFavorite, 0, TuneReason::SkipFromEngine );
-}
-
-/*!
- * Tunes to next or previous station
- */
-uint RadioUiEnginePrivate::skip( StationSkip::Mode mode, uint startFrequency, const int reason )
-{
-    LOG_FORMAT( "RadioUiEnginePrivate::skip: mode: %d", mode );
-    if ( startFrequency == 0 ) {
-        startFrequency = mEngineWrapper->currentFrequency();
-    }
-
-    const int favoriteCount = mStationModel->favoriteCount();
-    if ( favoriteCount < 2 ) {
-        if ( mode == StationSkip::NextFavorite ) {
-            mode = StationSkip::Next;
-        } else if ( mode == StationSkip::PreviousFavorite ) {
-            mode = StationSkip::Previous;
-        }
-    }
-
-    const RadioStation station = mStationModel->findClosest( startFrequency, mode );
-    if ( station.isValid() ) {
-        const uint newFrequency = station.frequency();
-
-        LOG_FORMAT( "RadioUiEnginePrivate::skip. CurrentFreq: %u, tuning to: %u", startFrequency, newFrequency );
-        mEngineWrapper->setFrequency( newFrequency, reason );
-        return newFrequency;
-    }
-    return startFrequency;
-}
-
--- a/radioapp/radiouiengine/tsrc/inc/t_radiostation.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,138 +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 T_RADIOSTATION_H_
-#define T_RADIOSTATION_H_
-
-
-// INCLUDES
-#include <QtTest/QtTest>
-
-#include "radioenginewrapperobserver.h"
-#include "radiostation.h"
-
-class RadioUiEngine;
-class RadioStationModel;
-class RadioHistoryModel;
-class RadioPresetStorage;
-class RadioEngineWrapper;
-class RadioEngineWrapperObserver;
-
-class TestRadioUiEngine : public QObject, RadioEngineWrapperObserver
-{
-    Q_OBJECT
-
-    /**
-     * Flags to indicate which slots have been entered since calling API method. 
-     * Declared to use QFlags<> to ease flag usage and to enforce type safety.
-     */
-    enum SlotEnteredFlag
-    {
-    	NoSlotsEntered               = 0
-        ,StationDataChanged     = 1 << 0
-        ,FavoriteChanged        = 1 << 1
-        ,StationAdded           = 1 << 2
-        ,DataChanged            = 1 << 3
-        ,ItemAdded              = 1 << 4
-    };
-    Q_DECLARE_FLAGS( Slots, SlotEnteredFlag )    
-    
-public:
-
-    TestRadioUiEngine();
-    ~TestRadioUiEngine();    
-
-public slots:
-    void dataChanged(const QModelIndex topLeft, const QModelIndex bottomRight);
-    void stationAdded( RadioStation addedStation );    
-    void stationDataChanged( RadioStation station );        
-    void favoriteChanged( RadioStation station );
-    void itemAdded();
-    
-private slots:
-    // test framework called slots 
-    void initTestCase();
-    void init();
-    void cleanup();
-    void cleanupTestCase();
-    void testImplicitSharing();
-    void testChangeFlags();
-    void TestCallSignChar();
-    void testPICodeToCallSign();
-    void testRadioStationModel();
-    void testhistoryModel();
-    void testHistoryModelItem();
-    
-private:
-
-    // from base class RadioEngineWrapperObserver
-    void tunedToFrequency( uint frequency, int commandSender );
-    void seekingStarted( Seeking::Direction direction );
-    void radioStatusChanged( bool radioIsOn );
-    void rdsAvailabilityChanged( bool available );
-    void volumeChanged( int volume );
-    void muteChanged( bool muted );
-    void audioRouteChanged( bool loudspeaker );
-    void scanAndSaveFinished();
-    void headsetStatusChanged( bool connected );
-    void skipPrevious();
-    void skipNext();
-    // subfunctions used by the test framework called slots
-    void testRadioStationModelInit();
-    void testAddStation1();
-    void testSaveStation1();
-    void testAddStation2();
-    void testSaveStation2();
-    void testAddStation3();
-    void testSaveStation3();
-    void testSortByFrequency();
-    void testFindPresetIndex();
-    void testRemoveByFrequency();
-    void testRemoveByPresetIndex();
-    void testRemoveStation();
-
-    void testSetFavorite();
-
-    void testRenameStation();
-    void testSetRadioTextPlus();
-    void testHistoryModelInit();
-    void testHistoryModelAddItem();
-    void testHistoryModelFindItem();
-    void testHistoryModelUpdateItem();
-    void testHistoryModelSetData();
-    void testAddRadioTextPlus();
-    void testClearRadioTextPlus();
-    void testRadioHistoryItem();
-    
-private:
-	RadioUiEngine* mUiEngine;
-	QScopedPointer<RadioEngineWrapper>  mEngineWrapper;
-	RadioStationModel* mRadioStationModel;
-	RadioHistoryModel* mhistoryModel;
-	QScopedPointer<RadioPresetStorage>  mPresetStorage;
-	int mExpectedStationCount;	
-	/**
-	 * Internal book keeping used to determine which slots have been entered since calling RadioStationModel 
-	 * API method. Used to conclude if the correct signals from RadioStationModel have been received.
-	 */
-	Slots mEnteredSlots;
-	QString mStationToBeAdded;
-	QString mStationToBeSaved;
-};
-
-#endif /* T_RADIOSTATION_H_ */
--- a/radioapp/radiouiengine/tsrc/src/t_radiostation.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1014 +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: radiostation test implementation
-*
-*/
-
-#define UNIT_TESTS_FOR_10_1
-#ifdef UNIT_TESTS_FOR_10_1
-#include <e32base.h>
-#include <eikenv.h>
-#endif
-#include "t_radiostation.h"
-#include "radiopresetstorage.h"
-#include "radiostation.h"
-#include "radiostationmodel.h"
-#include "radiohistorymodel.h"
-#include "radioenginewrapper.h"
-#include "radiouiengine.h"
-#include "radiologger.h" //Radio::connect
-
-// Constants
-const uint KTestFrequency1 = 89000000;
-const uint KTestFrequency2 = 89500000;
-const uint KTestFrequency3 = 90000000;
-const uint KTestFrequency4 = 90500000;
-const uint KTestFrequency5 = 91000000;
-const uint KTestFrequency6 = 91500000;
-const uint KTestGenre1 = 1;
-const uint KTestGenre2 = 2;
-const QString KTestStationName1 = "Radio Noice";
-const QString KTestStationName2 = "RN RENAMED";
-const QString KTestUrl1 = "http://qt.nokia.com";
-const QString KTestUrl2 = "http://www.radionoice.com";
-const QString KTestFrequencyString1 = "89000000";
-const QString KTestFrequencyString2 = "89500000";
-const QString KTestFrequencyString3 = "90000000";
-const QString KTestFrequencyString6 = "91500000";
-const QString KTestArtist1 = "Eläkeläiset";
-const QString KTestArtist2 = "Jope";
-const QString KTestArtist3 = "Motorhead";
-const QString KTestTitle1 = "Humppa^2";
-const QString KTestTitle2 = "´åäö´ ^&%¤^";
-const QString KTestTitle3 = "Dancing queen";
-const QString KTestRadioTextRadioText = "NOW! Metallica - Enter sandman in MusicStore for free";
-const QString KTestRadioTextPlusArtist = "Metallica";
-const QString KTestRadioTextPlusTitle = "Enter sandman";
-const QString KTestRadioTextPlusUrl = "www.metallica.com";
-const QString KTestRadioTextPlusUnsupportedTag = "*#*#*#";
-const QString KTestDynamicPSText = "MAKKARAA";
-
-/*!
- *
- */
-int main(int /* argc*/, char *argv[])
-{
-    TestRadioUiEngine tv;
-
-    char *pass[3];
-    pass[0] = argv[0];
-    pass[1] = "-o";
-    pass[2] = "c:\\data\\testradiouiengine.txt";
-
-    int res = QTest::qExec(&tv, 3, pass);
-
-    return res;
-}
-
-
-TestRadioUiEngine::TestRadioUiEngine()
-{
-}
-
-
-void TestRadioUiEngine::tunedToFrequency( uint /* frequency */, int /* commandSender */)
-{
-}
-
-
-void TestRadioUiEngine::seekingStarted( Seeking::Direction /* direction */)
-{
-}
-    
-void TestRadioUiEngine::radioStatusChanged( bool /* radioIsOn */)
-{
-}
-    
-void TestRadioUiEngine::rdsAvailabilityChanged( bool /* available */)
-{
-}
-    
-void TestRadioUiEngine::volumeChanged( int /* volume */)
-{
-}
-    
-void TestRadioUiEngine::muteChanged( bool /* muted */)
-{
-}
-
-void TestRadioUiEngine::audioRouteChanged( bool /* loudspeaker */)
-{
-}
-
-void TestRadioUiEngine::scanAndSaveFinished()
-{
-}
-
-    
-void TestRadioUiEngine::headsetStatusChanged( bool /* connected */)
-{
-}
-        
-void TestRadioUiEngine::skipPrevious()
-{
-}
-    
-void TestRadioUiEngine::skipNext()
-{
-}
-
-/*!
- * Destructor
- */
-TestRadioUiEngine::~TestRadioUiEngine()
-{
-	delete mRadioStationModel;	
-	delete mUiEngine;
-}
-
-/*!
- * called before each testfunction is executed
- */
-void TestRadioUiEngine::init()
-{
-}
-
-/*!
- * called after every testfunction
- */
-void TestRadioUiEngine::cleanup()
-{
-}
-
-/*!
- * called before the first testfunction is executed
- */
-void TestRadioUiEngine::initTestCase()
-{
-#ifdef UNIT_TESTS_FOR_10_1
-// Workaround for the below panic, occured after porting to 10.1 
-// Main Panic E32USER-CBase 44
-// Create and install the active scheduler
-    CActiveScheduler* scheduler = new(ELeave) CActiveScheduler;
-    CleanupStack::PushL(scheduler);
-    CActiveScheduler::Install(scheduler);
-// CCoeEnv::Static() call in CRadioEngineTls returns NULL
-    CCoeEnv* env = new CCoeEnv;
-#endif 
-    mUiEngine = new RadioUiEngine;
-    mRadioStationModel = new RadioStationModel( *mUiEngine );
-    mhistoryModel = new RadioHistoryModel( *mUiEngine );
-    
-    mEngineWrapper.reset( new RadioEngineWrapper( mRadioStationModel->stationHandlerIf(), *this ) );
-    mPresetStorage.reset( new RadioPresetStorage() );
-    mRadioStationModel->initialize( mPresetStorage.data(), mEngineWrapper.data() );
-    
-    //TODO:: Check why ASSERT fails when mModel->rowCount() == 0 
-    if(mRadioStationModel->rowCount()>0)
-    {
-    	mRadioStationModel->removeAll(); //ASSERT: \"last >= first\" in file qabstractitemmodel.cpp, line 2110	
-    }    
-
-    Radio::connect( mRadioStationModel,  SIGNAL(dataChanged(const QModelIndex, const QModelIndex)),
-        this,    SLOT(dataChanged(const QModelIndex, const QModelIndex)) );
-    
-    Radio::connect( mRadioStationModel,           SIGNAL(stationAdded(RadioStation)),
-        this,    SLOT(stationAdded(RadioStation)) );
-    
-    Radio::connect( mRadioStationModel,           SIGNAL(stationDataChanged(RadioStation)),
-        this,    SLOT(stationDataChanged(RadioStation)) );
-    
-    Radio::connect( mRadioStationModel,           SIGNAL(favoriteChanged(RadioStation)),
-        this,    SLOT(favoriteChanged(RadioStation)) );
-    
-    Radio::connect( mhistoryModel,           SIGNAL(itemAdded()),
-        this,    SLOT(itemAdded()) );
-}
-
-/*!
- * called after the last testfunction was executed
- */
-void TestRadioUiEngine::cleanupTestCase()
-{
-	delete mRadioStationModel;
-	delete mUiEngine;
-}
-
-/*!
- * 
- */
-void TestRadioUiEngine::dataChanged(const QModelIndex /* topLeft */, const QModelIndex /* bottomRight */)
-{
-	mEnteredSlots |= DataChanged;
-}
-
-/*!
- * 
- */
-void TestRadioUiEngine::stationDataChanged( RadioStation /* addedStation */ )
-{
-	mEnteredSlots |= StationDataChanged;	
-}
-
-/*!
- * 
- */
-void TestRadioUiEngine::favoriteChanged( RadioStation /* addedStation */)
-{
-	mEnteredSlots |= FavoriteChanged;
-}
-
-/*!
- * 
- */
-void TestRadioUiEngine::itemAdded()
-{
-    mEnteredSlots |= ItemAdded;
-}
-
-/*!
- * 
- */
-void TestRadioUiEngine::stationAdded( RadioStation addedStation )
-{
-	mEnteredSlots |= StationAdded;
-	
-	QVERIFY2(( mStationToBeAdded == addedStation.name() ), "API:RadioStationModel stationAdded 1");
-	QVERIFY2(( mExpectedStationCount == mRadioStationModel->rowCount() ), "API:RadioStationModel stationAdded 2");	
-}
-
-
-/*!
- * Testing of implicit sharing a.k.a. copy-on-write
- */
-void TestRadioUiEngine::testImplicitSharing()
-{	
-	RadioStation t_RadioStation_1;
-	
-	int originalPresetIndex = t_RadioStation_1.presetIndex();
-	// before any values assigned into any data field
-	QVERIFY2(( originalPresetIndex == RadioStation::SharedNull ), "API:Radiostation init failed 1");
-	t_RadioStation_1.setName("Noice");
-	originalPresetIndex = t_RadioStation_1.presetIndex();
-	// once some value assigned into some other data field
-	QVERIFY2(( originalPresetIndex == RadioStation::Invalid ), "API:Radiostation init failed 2");
-		
-	t_RadioStation_1.setFrequency( KTestFrequency1 );
-	//const int newIndex = mModel->findUnusedPresetIndex();
-	t_RadioStation_1.setPresetIndex( 2 );
-	t_RadioStation_1.setGenre(1);
-	t_RadioStation_1.setUrl("http://qt.nokia.com");			
-	
-	RadioStation* t_RadioStation_2 = new RadioStation(t_RadioStation_1);
-	// test that changing the content of copied data doesn't cause
-	// detach in the copying data structure
-	uint originalFrequency = t_RadioStation_1.frequency();
-    t_RadioStation_1.setFrequency( originalFrequency + 1 );
-    // should be detached
-	bool detached = t_RadioStation_2->isDetached();
-	QVERIFY2(detached, "API:Radiostation Implicit sharing/ freq 1");
-	
-	// test that changing the content of data sets detach true
-	originalFrequency = t_RadioStation_2->frequency();
-	t_RadioStation_2->setFrequency( originalFrequency + 1 );
-	// should be detached
-	detached = t_RadioStation_2->isDetached();	
-	QVERIFY2(detached, "API:Radiostation Implicit sharing/ freq 2");	
-	delete t_RadioStation_2;
-	t_RadioStation_2 = NULL;
-	
-	//-------------------------------------------------------------------------
-	// test that changing the content of copied data doesn't cause
-	// detach in the copying data structure
-	t_RadioStation_2 = new RadioStation(t_RadioStation_1);
-	// should not be detached
-	detached = t_RadioStation_2->isDetached();
-	QVERIFY2(!detached, "API:Radiostation Implicit sharing/ preset index 1");
-	originalPresetIndex = t_RadioStation_1.presetIndex();
-	t_RadioStation_1.setPresetIndex( originalPresetIndex + 1 );
-	// should be detached
-	detached = t_RadioStation_2->isDetached();
-	QVERIFY2(detached, "API:Radiostation Implicit sharing/ preset index 2");
-	
-	// test that changing the content of data sets detach true
-	originalPresetIndex = t_RadioStation_2->presetIndex();
-	//newIndex = mModel->findUnusedPresetIndex();
-	t_RadioStation_2->setPresetIndex( originalPresetIndex + 1 );
-	// should be detached
-	detached = t_RadioStation_2->isDetached();
-	QVERIFY2(detached, "API:Radiostation Implicit sharing/ preset index 3");	
-    delete t_RadioStation_2;
-    t_RadioStation_2 = NULL;
-    
-    // test that changing the content of copied data doesn't cause
-    // detach in the copying data structure
-    t_RadioStation_2 = new RadioStation(t_RadioStation_1);
-    // should not be detached
-    detached = t_RadioStation_2->isDetached();
-    QVERIFY2(!detached, "API:Radiostation Implicit sharing/ name 1");
-    //QString originalName = t_RadioStation_1.name(); 
-    t_RadioStation_1.setName("RadioOne");
-    // should be detached
-    detached = t_RadioStation_2->isDetached();
-    QVERIFY2(detached, "API:Radiostation Implicit sharing/ name 2");
-    // test that changing the content of data sets detach true
-    t_RadioStation_2->setName("RadioTwo");
-    // should be detached
-    detached = t_RadioStation_2->isDetached();
-    QVERIFY2(detached, "API:Radiostation  Implicit sharing/ name 3");
-}
-
-/*!
- * Testing of change flags set by RadioStation class
- */
-void TestRadioUiEngine::testChangeFlags()
-{
-	RadioStation t_RadioStation;
-		
-    QVERIFY2(!t_RadioStation.isValid(), "API:Radiostation Init failure");
-    t_RadioStation.setUserDefinedName("");
-	t_RadioStation.setUserDefinedName("Radio Noice");
-	t_RadioStation.setFrequency( KTestFrequency1 );
-	//const int newIndex = mModel->findUnusedPresetIndex();
-	t_RadioStation.setPresetIndex( 2 );
-	t_RadioStation.setGenre( KTestGenre1 );
-	t_RadioStation.setUrl( KTestUrl1 );	
-	
-	t_RadioStation.resetChangeFlags();
-	bool persistentDataChanged = t_RadioStation.hasDataChanged( RadioStation::PersistentDataChanged );
-    QVERIFY2(!persistentDataChanged, "API:Radiostation Change flags/ PersistentDataChanged 1");	
-    t_RadioStation.setUserDefinedName("Radio Noice+");
-	bool nameChanged = t_RadioStation.hasDataChanged( RadioStation::NameChanged );	
-	QVERIFY2(nameChanged, "API:Radiostation Change flags/ NameChanged");	
-	persistentDataChanged = t_RadioStation.hasDataChanged( RadioStation::PersistentDataChanged );
-	QVERIFY2(persistentDataChanged, "API:Radiostation Change flags/ PersistentDataChanged 2");	
-	t_RadioStation.resetChangeFlags();
-			
-	uint originalGenre = t_RadioStation.genre();
-	t_RadioStation.setGenre( originalGenre + 1 );
-	bool genreChanged = t_RadioStation.hasDataChanged( RadioStation::GenreChanged );
-	QVERIFY2(genreChanged, "API:Radiostation Change flags/ GenreChanged");	
-	persistentDataChanged = t_RadioStation.hasDataChanged( RadioStation::PersistentDataChanged );
-	QVERIFY2(persistentDataChanged, "API:Radiostation Change flags/ PersistentDataChanged 3");	
-	t_RadioStation.resetChangeFlags();
-	
-	QString originalUrl = t_RadioStation.url();
-	t_RadioStation.setUrl(originalUrl);
-	// previous url set so no url or persistent data change flags should be set
-	bool urlChanged = t_RadioStation.hasDataChanged( RadioStation::UrlChanged );
-	QVERIFY2(!urlChanged, "API:Radiostation Change flags/ UrlChanged");
-	persistentDataChanged = t_RadioStation.hasDataChanged( RadioStation::PersistentDataChanged );
-    QVERIFY2(!persistentDataChanged, "API:Radiostation Change flags/ PersistentDataChanged 4");	
-	t_RadioStation.resetChangeFlags();
-	
-	QString originalRadioText = t_RadioStation.radioText();
-	t_RadioStation.setRadioText( originalRadioText + "buy sausage" );
-	bool radioTextChanged = t_RadioStation.hasDataChanged( RadioStation::RadioTextChanged );
-	QVERIFY2(radioTextChanged, "API:Radiostation Change flags/ RadioTextChanged");
-	// radio text not stored into cenrep
-	persistentDataChanged = t_RadioStation.hasDataChanged( RadioStation::PersistentDataChanged );
-	QVERIFY2(!persistentDataChanged, "API:Radiostation Change flags/ PersistentDataChanged 5");
-	t_RadioStation.resetChangeFlags();
-	t_RadioStation.setRadioText( t_RadioStation.radioText() );
-	// because current radio text is reset change flags must not be affected
-	radioTextChanged = t_RadioStation.hasDataChanged( RadioStation::RadioTextChanged );
-	QVERIFY2(!radioTextChanged, "API:Radiostation Change flags/ RadioTextChanged");
-	t_RadioStation.resetChangeFlags();
-	
-	QVERIFY2((t_RadioStation.psType()==RadioStation::Unknown), "API:Radiostation PS type check");	
-	t_RadioStation.setPsType( RadioStation::Dynamic );
-	bool psTypeChanged = t_RadioStation.hasDataChanged( RadioStation::PsTypeChanged );
-	QVERIFY2(psTypeChanged, "API:Radiostation Change flags/ PsTypeChanged");
-	persistentDataChanged = t_RadioStation.hasDataChanged( RadioStation::PersistentDataChanged );
-	// PS type not stored as persistent data
-	QVERIFY2(!persistentDataChanged, "API:Radiostation Change flags/ PersistentDataChanged 6");
-	t_RadioStation.resetChangeFlags();
-	
-	t_RadioStation.setFavorite(t_RadioStation.isFavorite());
-	bool favouriteChanged = t_RadioStation.hasDataChanged( RadioStation::FavoriteChanged );
-    QVERIFY2(!favouriteChanged, "API:Radiostation Change flags/ FavoriteChanged");    
-    persistentDataChanged = t_RadioStation.hasDataChanged( RadioStation::PersistentDataChanged );
-    QVERIFY2(!persistentDataChanged, "API:Radiostation Change flags/ PersistentDataChanged 7");
-    t_RadioStation.resetChangeFlags();
-    
-    // initially there should not be PI code defined
-    QVERIFY2(!t_RadioStation.hasPiCode(), "API:Radiostation Pi code check");
-    // non-clear channel
-    t_RadioStation.setPiCode(0xC004, RadioRegion::Default); //88.1 CBEE-FM - Chatham, ON
-    bool piCodeChanged = t_RadioStation.hasDataChanged( RadioStation::PiCodeChanged );
-    QVERIFY2(piCodeChanged, "API:Radiostation Change flags/ PiCodeChanged");
-    persistentDataChanged = t_RadioStation.hasDataChanged( RadioStation::PersistentDataChanged );
-    QVERIFY2(persistentDataChanged, "API:Radiostation Change flags/ PersistentDataChanged 8");
-}
-
-/*!
- * Testing of call sign integer to char conversion
- */
-void TestRadioUiEngine::TestCallSignChar()
-{
-	for(uint i = 0; i < KLastCallSignCharCode; i++)
-	{
-	    RadioStation t_RadioStation;
-	    bool passed =  t_RadioStation.callSignChar(i) == static_cast<char>( 'A' + i ); 	    	
-	    QVERIFY2(passed, "API:Radiostation TestCallSignChar 1");	
-	}
-	RadioStation t_RadioStation;
-	bool passed = t_RadioStation.callSignChar(KLastCallSignCharCode + 1) == static_cast<char>( '?' );
-	QVERIFY2(passed, "API:Radiostation TestCallSignChar 2");
-}
-
-/*!
- * Testing of PI code to call sign conversion
- */
-void TestRadioUiEngine::testPICodeToCallSign()
-{
-	RadioStation t_RadioStation;
-	
-	// boundary values, two typical values and three chars call sign case
-	QString callSign = t_RadioStation.piCodeToCallSign( KKxxxCallSignPiFirst - 1 );
-	QVERIFY2((callSign==""), "API:Radiostation Call sign <");
-	callSign = t_RadioStation.piCodeToCallSign( KKxxxCallSignPiFirst );
-	QVERIFY2((callSign=="KAAA"), "API:Radiostation Call sign KAAA");
-	callSign = t_RadioStation.piCodeToCallSign( 0x243F );
-	QVERIFY2((callSign=="KHRJ"), "API:Radiostation Call sign KHRJ");
-	callSign = t_RadioStation.piCodeToCallSign( KWxxxCallSignPiFirst - 1 );
-	QVERIFY2((callSign=="KZZZ"), "API:Radiostation Call sign KZZZ");
-	callSign = t_RadioStation.piCodeToCallSign( KWxxxCallSignPiFirst );
-	QVERIFY2((callSign=="WAAA"), "API:Radiostation Call sign WAAA");
-	callSign = t_RadioStation.piCodeToCallSign( 0x74B9 );
-    QVERIFY2((callSign=="WMDT"), "API:Radiostation Call sign WMDT");
-    callSign = t_RadioStation.piCodeToCallSign( KWxxxCallSignPiLast );
-    QVERIFY2((callSign=="WZZZ"), "API:Radiostation Call sign WZZZ");
-    callSign = t_RadioStation.piCodeToCallSign( KWxxxCallSignPiLast + 1 );
-    QVERIFY2((callSign=="KEX"), "API:Radiostation Call sign KEX");
-    callSign = t_RadioStation.piCodeToCallSign( 0x99B5 );
-    QVERIFY2((callSign=="WJZ"), "API:Radiostation Call sign WJZ");    
-    callSign = t_RadioStation.piCodeToCallSign( 0x99C0 );
-    QVERIFY2((callSign==""), "API:Radiostation Call sign ????");
-}
-
-/*!
- * Testing of RadioStationModel initial state
- */
-void TestRadioUiEngine::testRadioStationModelInit()
-{
-	//TODO:: Check why ASSERT fails when mModel->rowCount() == 0 
-	if( mRadioStationModel->rowCount()>0 )
-    {	    
-		mRadioStationModel->removeAll();
-		QVERIFY2((mRadioStationModel->rowCount()==0), "API:RadioStationModel removeAll()");
-	}
-		 
-	RadioStation foundStation;
-	// no stations in the model in this phase
-	QVERIFY2(!(mRadioStationModel->findFrequency( KTestFrequency1, foundStation )), 
-		"API:RadioStationModel findFrequency 1");	
-}
-
-/*!
- * Testing of RadioStationModel addStation method and resulting RadioStationModel signals
- */
-void TestRadioUiEngine::testAddStation1()
-{
-	RadioStation station;
-	station.setFrequency( KTestFrequency1 );
-	station.setFrequency( KTestFrequency1 );
-	station.setGenre( KTestGenre1 );
-	station.setGenre( KTestGenre1 );
-	station.setUrl( KTestUrl1 );    
-	station.setType( RadioStation::LocalStation );
-	station.setType( RadioStation::LocalStation );
-	station.setName("");
-	station.setName( KTestStationName1 );
-	station.setDynamicPsText( KTestDynamicPSText );
-	station.setPiCode( 0xC004, RadioRegion::America ); //88.1 CBEE-FM - Chatham, ON
-    QVERIFY2(!(station.dynamicPsText().compare(KTestDynamicPSText)), "API:RadioStationModel addStation 1");
-    station.setDynamicPsText( KTestDynamicPSText );
-	// check that adding station increases model row count
-	mExpectedStationCount = mRadioStationModel->rowCount() + 1;	
-	mStationToBeAdded = station.name();
-	mRadioStationModel->addStation( station );
-	QVERIFY2((mRadioStationModel->rowCount()==mExpectedStationCount), "API:RadioStationModel addStation 2");
-	bool correctSignalsReceived = mEnteredSlots.testFlag( StationDataChanged ) && 
-	    mEnteredSlots.testFlag( StationAdded ) && mEnteredSlots.testFlag( DataChanged );
-	
-	bool frequencyUpdated = station.frequencyMhz().toDouble()*1000000 == KTestFrequency1;
-	QVERIFY2(frequencyUpdated, "API:RadioStationModel addStation 1");
-	// check that correct signals received
-	QVERIFY2(correctSignalsReceived, "API:RadioStationModel addStation 3");
-	mEnteredSlots = NoSlotsEntered;
-	
-	// check that added station can be found by frequency
-    QModelIndex index = mRadioStationModel->modelIndexFromFrequency( KTestFrequency1 );
-    QVariant stationData = mRadioStationModel->data( index, Qt::DisplayRole );
-    QString stationName = stationData.toString().right( KTestStationName1.length() );    
-    QVERIFY2(!(stationName.compare(KTestStationName1)), "API:RadioStationModel modelIndexFromFrequency");
-}
-
-/*!
- * Testing of RadioStationModel saveStation method and resulting RadioStationModel signals
- */
-void TestRadioUiEngine::testSaveStation1()
-{
-	RadioStation newStation1;
-    // check that find by frequency works
-    // this is needed for preset index to be updated into newStation1
-    QVERIFY2((mRadioStationModel->findFrequency( KTestFrequency1, newStation1 )), 
-        "API:RadioStationModel findFrequency 2");
-    newStation1.setType( RadioStation::Favorite );
-    mRadioStationModel->saveStation( newStation1 );    
-    bool correctSignalsReceived = mEnteredSlots.testFlag( StationDataChanged ) && 
-            mEnteredSlots.testFlag( FavoriteChanged ) && mEnteredSlots.testFlag( DataChanged );;
-    QVERIFY2(correctSignalsReceived, "API:RadioStationModel saveStation 1");
-    
-    newStation1.setGenre(newStation1.genre()+1);
-    mRadioStationModel->saveStation( newStation1 );
-    correctSignalsReceived = mEnteredSlots.testFlag( StationDataChanged  ) && mEnteredSlots.testFlag( DataChanged );
-    // check that correct signals received
-    QVERIFY2(correctSignalsReceived, "API:RadioStationModel saveStation 2");
-}
-
-/*!
- * Testing of RadioStationModel addStation method and rowCount methods
- */
-void TestRadioUiEngine::testAddStation2()
-{
-    RadioStation newStation2;
-	newStation2.setFrequency( KTestFrequency2 );
-    QVERIFY2(!newStation2.hasRds(), "API:RadioStationModel addStation 1");
-	newStation2.setGenre( KTestGenre2 );
-	// setting genre should set this true
-	QVERIFY2(newStation2.hasRds(), "API:RadioStationModel addStation 2");
-	newStation2.setUrl( KTestUrl2 );
-    newStation2.setType( RadioStation::LocalStation | RadioStation::Favorite );
-    newStation2.setName("Radio ice");
-    // check that adding station increases model row count
-    mExpectedStationCount = mRadioStationModel->rowCount()+1;
-    mStationToBeAdded = newStation2.name();
-    mRadioStationModel->addStation( newStation2 );
-    
-    QVERIFY2((mRadioStationModel->rowCount()==mExpectedStationCount), "API:RadioStationModel addStation 3");
-    mEnteredSlots = NoSlotsEntered;
-}
-
-/*!
- * Testing of RadioStationModel saveStation method special cases
- */
-void TestRadioUiEngine::testSaveStation2()
-{
-    RadioStation newStation1;
-    // this is needed for preset index to be updated into newStation1
-    QVERIFY2((mRadioStationModel->findFrequency( KTestFrequency1, newStation1 )), 
-        "API:RadioStationModel findFrequency 2");
-    
-	newStation1.setFrequency( KTestFrequency2 );	
-	mExpectedStationCount = mRadioStationModel->rowCount();
-	// updating existing station data must not increase station count
-	mRadioStationModel->saveStation( newStation1 );
-	QVERIFY2((mRadioStationModel->rowCount()==mExpectedStationCount), "API:RadioStationModel saveStation 1");    
-    // because frequency tried to be updated no signals should be received either
-	bool correctSignalsReceived = mEnteredSlots.testFlag( NoSlotsEntered );
-    QVERIFY2(correctSignalsReceived, "API:RadioStationModel saveStation 2");
-    mEnteredSlots = NoSlotsEntered;
-    
-    // original frequency resumed
-    newStation1.setFrequency( KTestFrequency1 );
-    newStation1.setGenre(newStation1.genre()+1);
-    mExpectedStationCount = mRadioStationModel->rowCount();
-    // now that frequency resumed signal should be received also
-    mRadioStationModel->saveStation( newStation1 );
-    correctSignalsReceived = mEnteredSlots.testFlag( StationDataChanged ) && mEnteredSlots.testFlag( DataChanged );
-    QVERIFY2(correctSignalsReceived, "API:RadioStationModel saveStation 3");
-    // updating existing station data must not increase station count
-    QVERIFY2((mRadioStationModel->rowCount()==mExpectedStationCount), "API:RadioStationModel saveStation 2");
-    
-    mExpectedStationCount = mRadioStationModel->rowCount();
-    mStationToBeAdded = newStation1.name();
-    // adding station must fail because the frequency is the same as previously used frequency
-    mRadioStationModel->addStation( newStation1 );
-    QVERIFY2((mRadioStationModel->rowCount()==mExpectedStationCount), "API:RadioStationModel addStation 3");
-}
-
-/*!
- * Testing of RadioStationModel addStation method special cases
- */
-void TestRadioUiEngine::testAddStation3()
-{
-    RadioStation newStation3;
-    newStation3.setFrequency( KTestFrequency2 );
-    newStation3.setGenre(3);
-    newStation3.setUrl("http://www.radio4noice.com");
-    newStation3.setType( RadioStation::LocalStation | RadioStation::Favorite );
-    newStation3.setName("Radio e");
-    // adding station must fail because frequency is the same as previously used frequency
-    mExpectedStationCount = mRadioStationModel->rowCount();
-    mStationToBeAdded = newStation3.name();
-    mRadioStationModel->addStation( newStation3 );    
-    QVERIFY2((mRadioStationModel->rowCount()==mExpectedStationCount), "API:RadioStationModel addStation 4");
-    // adding station must success because the station frequency is different now
-    newStation3.setFrequency( KTestFrequency2 + 1 );
-    mExpectedStationCount = mRadioStationModel->rowCount() + 1;
-    mRadioStationModel->addStation( newStation3 );
-    QVERIFY2((mRadioStationModel->rowCount()==mExpectedStationCount), "API:RadioStationModel addStation 5");
-    // test that station can be found by frequency range
-    QList<RadioStation> stations;
-    stations = mRadioStationModel->stationsInRange( KTestFrequency1, KTestFrequency3 );
-    QVERIFY2((stations.count()==3), "API:RadioStationModel stationsInRange");
-}
-
-/*!
- * Testing of RadioStationModel saveStation method special cases
- */
-void TestRadioUiEngine::testSaveStation3()
-{
-    RadioStation newStation3;
-    RadioStation foundStation;
-    QVERIFY2(mRadioStationModel->findFrequency( KTestFrequency2 + 1, newStation3 ),			
-        "API:RadioStationModel findFrequency 4");
-    
-    newStation3.setFrequency( KTestFrequency3 );
-    // because frequency or preset index don't have change flag the frequency must not be updated 
-    mRadioStationModel->saveStation( newStation3 );
-
-    QVERIFY2(!(mRadioStationModel->findFrequency( KTestFrequency3, foundStation )),			
-        "API:RadioStationModel findFrequency 3");
-
-    int stationGenre;
-    stationGenre = newStation3.genre();	
-    newStation3.setGenre( newStation3.genre() + 1 );
-    // allthough genre changed so the frequency update must not become effective  
-    mRadioStationModel->saveStation( newStation3 );	
-
-    QVERIFY2(!(mRadioStationModel->findFrequency( KTestFrequency3, foundStation )),			
-        "API:RadioStationModel findFrequency 4");
-    
-
-    mEnteredSlots = NoSlotsEntered;
-    foreach( const RadioStation& station, mRadioStationModel->list() ) 
-    {
-        if ( station.frequency() == KTestFrequency2 ) 
-        {        
-            mRadioStationModel->setFavoriteByFrequency( KTestFrequency2, !station.isFavorite() );
-        }
-    }
-    bool correctSignalsReceived = mEnteredSlots.testFlag( StationDataChanged ) && 
-        mEnteredSlots.testFlag( FavoriteChanged ) && mEnteredSlots.testFlag( DataChanged );
-    QVERIFY2(correctSignalsReceived, "API:RadioStationModel findFrequency 5");
-}
-
-
-
-/*!
- * Test that stations are stored into RadioStationModel in ascending frequency order  
- */
-void TestRadioUiEngine::testSortByFrequency()
-{
-	int role = RadioStationModel::RadioStationRole;
-	int previousFrequency(0); // int not initialized zero as default
-	
-	for (int i = 0; i< mRadioStationModel->rowCount(); i++ )
-	{
-		QModelIndex index = mRadioStationModel->index( i, 0 );
-		QVariant stationData = mRadioStationModel->data( index, role );
-		RadioStation station = stationData.value<RadioStation>();
-		// stations must be obtainded at ascending frequency order
-		QVERIFY2((station.frequency()>previousFrequency), "API:RadioStationModel testSortByFrequency");
-		previousFrequency = station.frequency();
-	}
-}
-
-/*!
- * Test that preset indexes match
- */
-void TestRadioUiEngine::testFindPresetIndex()
-{
-	RadioStation station;
-	for (int i = 0; i< mRadioStationModel->rowCount(); i++ )
-    {
-		QVERIFY2((mRadioStationModel->findPresetIndex(i) != RadioStation::NotFound), 
-	        "API:RadioStationModel testFindPresetIndex 1");
-		QVERIFY2((mRadioStationModel->findPresetIndex( i, station ) != RadioStation::NotFound), 
-			"API:RadioStationModel testFindPresetIndex 2");
-		QVERIFY2((station.presetIndex() == i), "API:RadioStationModel testFindPresetIndex 3");
-	}
-}
-
-/*!
- * Test that preset can be removed from model by frequency
- */
-void TestRadioUiEngine::testRemoveByFrequency()
-{
-	RadioStation station;
-	int initialStationCount( mRadioStationModel->rowCount() );
-	int presetIndex(0);
-	
-	// find valid preset index
-	for(int i = 0; i<mRadioStationModel->rowCount(); i++)
-	{
-		presetIndex = mRadioStationModel->findPresetIndex( i, station );
-		if(presetIndex!=RadioStation::NotFound)
-			break;
-	}
-	QVERIFY2((presetIndex != RadioStation::NotFound), "API:RadioStationModel testRemoveByFrequency 1");
-		
-	mRadioStationModel->removeByFrequency( station.frequency() );	
-	QVERIFY2((mRadioStationModel->rowCount()==(initialStationCount-1)), "API:RadioStationModel testRemoveByFrequency 2");
-}
-
-/*!
- * Test that station can be removed from model by preset index 
- */
-void TestRadioUiEngine::testRemoveByPresetIndex()
-{
-	RadioStation station;
-	station.setFrequency( KTestFrequency4 );
-	mStationToBeAdded = "";
-	mExpectedStationCount = mRadioStationModel->rowCount() + 1;
-	mRadioStationModel->addStation( station );
-	// for updating station preset index
-	QVERIFY2((mRadioStationModel->findFrequency( KTestFrequency4, station )), 
-			"API:RadioStationModel testRemoveByPresetIndex 1");
-	
-	int initialStationCount( mRadioStationModel->rowCount() );
-	mRadioStationModel->removeByPresetIndex( station.presetIndex() );    
-    QVERIFY2((mRadioStationModel->rowCount()==(initialStationCount-1)), "API:RadioStationModel testRemoveByPresetIndex 2");
-}
-
-/*!
- * Test RadioStationModel method removeStation
- */
-void TestRadioUiEngine::testRemoveStation()
-{
-	RadioStation station;
-	station.setFrequency( KTestFrequency5 );
-	mStationToBeAdded = "";
-	mExpectedStationCount = mRadioStationModel->rowCount() + 1;
-	mRadioStationModel->addStation( station );
-	int initialStationCount( mRadioStationModel->rowCount() );
-	// for updating station preset index
-	QVERIFY2(mRadioStationModel->findFrequency( KTestFrequency5, station ),			
-	        "API:RadioStationModel testRemoveStation");
-	
-	mRadioStationModel->removeStation( station );	
-	QVERIFY2((mRadioStationModel->rowCount()==(initialStationCount-1)), "API:RadioStationModel testRemoveStation");
-}
-
-
-/*!
- * Test setting and unsetting station type favourite
- */
-void TestRadioUiEngine::testSetFavorite()
-{	
-	RadioStation station;	
-	station.setFrequency( KTestFrequency6 );
-	station.setType( RadioStation::Favorite );	
-    QVERIFY2(station.isFavorite(), "API:RadioStationModel testSetFavorite 1");
-	mRadioStationModel->addStation( station );
-	mEnteredSlots = NoSlotsEntered;	
-	
-	mRadioStationModel->setFavoriteByFrequency( KTestFrequency6, false );	
-	bool correctSignalsReceived = mEnteredSlots.testFlag( StationDataChanged ) && 
-	    mEnteredSlots.testFlag( FavoriteChanged ) && mEnteredSlots.testFlag( DataChanged );
-	QVERIFY2(correctSignalsReceived, "API:RadioStationModel testSetFavorite 2");
-	
-	mRadioStationModel->findFrequency( KTestFrequency6, station );
-	QVERIFY2(!station.isFavorite(), "API:RadioStationModel testSetFavorite 3");
-	mEnteredSlots = NoSlotsEntered;
-	
-	mRadioStationModel->setFavoriteByPreset( station.presetIndex(), true );
-	correctSignalsReceived = mEnteredSlots.testFlag( StationDataChanged ) && 
-		mEnteredSlots.testFlag( FavoriteChanged ) && mEnteredSlots.testFlag( DataChanged );
-	QVERIFY2(correctSignalsReceived, "API:RadioStationModel testSetFavorite 4");
-    
-	// test toggling the favorite 
-	QModelIndex index = mRadioStationModel->modelIndexFromFrequency( KTestFrequency6 );
-    mRadioStationModel->setData( index, KTestFrequencyString6 ,RadioStationModel::ToggleFavoriteRole);
-    RadioStation station1 = mRadioStationModel->stationAt( index.row() );
-    QVERIFY2(!station1.isFavorite(), "API:RadioStationModel testToggleFavourite");
-
-}
-
-/*!
- * Test renaming station
- */
-void TestRadioUiEngine::testRenameStation()
-{	
-	RadioStation station;
-	int presetIndex(0);
-	// find valid preset index
-    for( int i = 0; i<mRadioStationModel->rowCount(); i++ )
-	{
-		if( mRadioStationModel->findPresetIndex( i, station ) != RadioStation::NotFound )
-		{
-			presetIndex = i;
-			break;
-		}
-	}   
-    QString initialStationName( station.name() );
-    mEnteredSlots = NoSlotsEntered;
-	mRadioStationModel->renameStation( presetIndex, initialStationName + "Renamed" );	
-	bool correctSignalsReceived = mEnteredSlots.testFlag( StationDataChanged ) && 
-        mEnteredSlots.testFlag( DataChanged );
-	QVERIFY2(correctSignalsReceived, "API:RadioStationModel testRenameStation 1");	
-    QVERIFY2(initialStationName!=mRadioStationModel->stationAt(presetIndex).name(), "API:RadioStationModel testRenameStation 2");
-        
-    station.setUserDefinedName( KTestStationName2 );
-    QVERIFY2(station.isRenamed(), "API:RadioStationModel testRenameStation 1");
-    
-}
-
-/*!
- * Test setting radio text
- */
-void TestRadioUiEngine::testSetRadioTextPlus()
-{
-    RadioStation station;
-    mRadioStationModel->findFrequency( KTestFrequency6, station );
-    station.setRadioText( "" );
-    station.setRadioText( KTestRadioTextRadioText );
-    station.setRadioText( KTestRadioTextRadioText );
-    station.setRadioTextPlus( RtPlus::Artist, KTestRadioTextPlusArtist );
-    station.setRadioTextPlus( RtPlus::Title, KTestRadioTextPlusTitle );
-    station.setRadioTextPlus( RtPlus::Homepage, KTestRadioTextPlusUrl );
-    station.setRadioTextPlus( RtPlus::Homepage + 1, KTestRadioTextPlusUnsupportedTag );
-    mRadioStationModel->saveStation( station );
-    bool effective = station.radioText().contains( KTestRadioTextPlusArtist, Qt::CaseSensitive );
-    QVERIFY2(effective, "API:RadioStationModel testSetRadioTextPlus 1");
-    effective = station.radioText().contains( KTestRadioTextPlusTitle, Qt::CaseSensitive );
-    QVERIFY2(effective, "API:RadioStationModel testSetRadioTextPlus 2");
-    effective = !station.url().compare( KTestRadioTextPlusUrl );
-    QVERIFY2(effective, "API:RadioStationModel testSetRadioTextPlus 3");
-}
-
-/*!
- * Test RadioStationModel API
- */	
-void TestRadioUiEngine::testRadioStationModel()
-{
-	testRadioStationModelInit();
-	testAddStation1();
-	testSaveStation1();
-	testAddStation2();
-	testSaveStation2();
-	testAddStation3();
-	testSaveStation3();
-	testSortByFrequency();
-	testFindPresetIndex();
-	testRemoveByFrequency();
-	testRemoveByPresetIndex();
-	testRemoveStation();
-	testSetFavorite();
-	testRenameStation();
-	testSetRadioTextPlus();
-}
-/*!
- * Test RadioHistoryModel API
- */
-void TestRadioUiEngine::testhistoryModel()
-    {
-    testHistoryModelInit();
-    testHistoryModelAddItem();
-    testHistoryModelFindItem();
-    testHistoryModelUpdateItem();
-    testHistoryModelSetData();
-    testAddRadioTextPlus();
-    testClearRadioTextPlus();
-    }
-
-/*!
- * Testing of RadioHistoryModel initial state
- */
-void TestRadioUiEngine::testHistoryModelInit()
-{
-    //TODO:: Check why ASSERT fails when mhistoryModel->rowCount() == 0 
-    if( mhistoryModel->rowCount()>0 )
-    {       
-        mhistoryModel->removeAll();
-        QVERIFY2((mRadioStationModel->rowCount()==0), "API:RadioHistoryModel removeAll() 1");
-    }
-    QVERIFY2((mhistoryModel->rowCount()==0), "API:RadioHistoryModel removeAll() 2");           
-}
-
-/*!
- *
- */
-void TestRadioUiEngine::testHistoryModelAddItem()
-{
-    int expectedHistoryItemCount( mhistoryModel->rowCount() + 1 );
-    mEnteredSlots = NoSlotsEntered;
-    mhistoryModel->addItem( KTestArtist1, KTestTitle1 );    
-    bool correctSignalsReceived = mEnteredSlots.testFlag( ItemAdded );
-    // check that correct signals received
-    QVERIFY2(correctSignalsReceived, "API:RadioHistoryModel addItem() 1");
-    // check that item count increases
-    QVERIFY2((mhistoryModel->rowCount()==expectedHistoryItemCount), "API:RadioHistoryModel addItem() 2");
-    
-    // check that artist/title stored into the model conforms to the one read from the model
-    QModelIndex index = mhistoryModel->index( 0, 0 );
-    QStringList stringList = mhistoryModel->data( index, Qt::DisplayRole ).value<QStringList>();        
-    QString artistTitle = stringList.at(0);    
-    QVERIFY2(!(artistTitle.compare(KTestArtist1+" - "+KTestTitle1)), "API:RadioHistoryModel addItem() 3");
-    
-    
-    expectedHistoryItemCount = mhistoryModel->rowCount();
-    // trying to add an item that allready exists must not increase the item count
-    mhistoryModel->addItem( KTestArtist1, KTestTitle1 );
-    QVERIFY2((mhistoryModel->rowCount()==expectedHistoryItemCount), "API:RadioHistoryModel addItem() 4");
-}
-
-/*!
- *
- */
-void TestRadioUiEngine::testHistoryModelFindItem()
-{
-    RadioHistoryItem item;
-    mhistoryModel->findItem( KTestArtist1, KTestTitle1, item );
-    QVERIFY2((item.artist()==KTestArtist1), "API:RadioHistoryModel findItem() 1");
-    QVERIFY2((item.title()==KTestTitle1), "API:RadioHistoryModel findItem() 2");
-    // try to find an item that doesn't exist
-    int ret = mhistoryModel->findItem( KTestArtist1+"+", KTestTitle1, item );
-    QVERIFY2(ret==-1, "API:RadioHistoryModel findItem() 3");
-}
-
-/*!
- *
- */
-void TestRadioUiEngine::testHistoryModelUpdateItem()
-{
-    RadioHistoryItem item;    
-    mhistoryModel->findItem( KTestArtist1, KTestTitle1, item );
-    item.setTitle( KTestTitle2 );    
-    // update an existing item
-    mhistoryModel->updateItem( 0, item, true );
-    
-    RadioHistoryItem foundItem;
-    // original item must not be found any more
-    int ret = mhistoryModel->findItem(KTestArtist1, KTestTitle1, foundItem);
-    QVERIFY2(ret==-1, "API:RadioHistoryModel updateItem() 1");
-    // but the updated one instead
-    mhistoryModel->findItem(KTestArtist1, KTestTitle2, foundItem);
-    QVERIFY2((foundItem.title()==KTestTitle2), "API:RadioHistoryModel updateItem() 2"); 
-}
-
-/*!
- *
- */
-void TestRadioUiEngine::testHistoryModelSetData()
-{
-   RadioHistoryItem foundItem;
-   mhistoryModel->findItem(KTestArtist1, KTestTitle2, foundItem);
-   QVERIFY2(!foundItem.isFavorite(), "API:RadioHistoryModel SetData() 1");
-   
-   QModelIndex index = mhistoryModel->index( 0, 0 );
-   QString artistTitle = KTestArtist1 + KTestTitle2;
-   mhistoryModel->setData( index, artistTitle, RadioHistoryModel::SetFavoriteRole );
-   mhistoryModel->findItem(KTestArtist1, KTestTitle2, foundItem);
-   // item should be now favorite
-   QVERIFY2(foundItem.isFavorite(), "API:RadioHistoryModel SetData() 2");    
-}
-
-/*!
- *
- */
-void TestRadioUiEngine::testAddRadioTextPlus()
-{   
-    mhistoryModel->addRadioTextPlus( RtPlus::Artist, KTestArtist1 );
-    mhistoryModel->addRadioTextPlus( RtPlus::Title, KTestTitle1 );
-}
-
-/*!
- *
- */
-void TestRadioUiEngine::testClearRadioTextPlus()
-{   
-    mhistoryModel->clearRadioTextPlus();
-}
-
-/*!
- * Test RadioHistoryModelItem API
- */
-void TestRadioUiEngine::testHistoryModelItem()
-{
-    RadioHistoryItem* item = new RadioHistoryItem( KTestArtist3, KTestTitle3 );
-    item->setArtist( KTestArtist3 );
-    QVERIFY2(!(item->artist().compare(KTestArtist3)), "API:testHistoryModelItem setArtist()");
-    item->setTitle( KTestTitle3 );
-    QVERIFY2(!(item->title().compare(KTestTitle3)), "API:testHistoryModelItem setTitle()");
-    QVERIFY2(!item->isFavorite(), "API:testHistoryModelItem isFavorite() 1");
-    item->setFavorite();
-    QVERIFY2(item->isFavorite(), "API:testHistoryModelItem isFavorite() 2");
-    item->setFavorite();
-    delete item;
-    item = NULL;
-}
--- a/radioapp/radiouiengine/tsrc/t_radiouiengine.pro	Tue Aug 31 15:15:02 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: project file for radiouiengine tests
-*
-*/
-
-TEMPLATE = app
-TARGET = t_radiouiengine
-
-
-symbian: {
-    TARGET.CAPABILITY = CAP_GENERAL_DLL
-    TARGET.SID = 0x101FF976 # Old visual radio uid
-    MMP_RULES += SMPSAFE
-}
-
-
-DEPENDPATH += . \
-    inc \
-    src
-INCLUDEPATH += . \
-    /epoc32/include/domain \
-    /epoc32/include/domain/middleware \
-    /epoc32/include/domain/applications \
-    /epoc32/include/osextensions \
-    /epoc32/include/middleware \
-    /epoc32/include/osextensions/stdapis/stlport \
-    stub/inc \
-    ../../../inc \
-    ../inc \
-    ../../commoninc \
-    ../../radioenginewrapper/inc \
-    ../../radiopresetstorage/inc \
-    ../../../../inc
-
-CONFIG += qtestlib
-
-symbian:LIBS += -lradiouiengine
-symbian:LIBS += -lradioenginewrapper
-symbian:LIBS += -lradiopresetstorage
-
-HEADERS += inc/t_radiostation.h
-SOURCES += src/t_radiostation.cpp
--- a/radioapp/radiowidgets/inc/radiocarouselanimator.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +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 RADIOCAROUSELANIMATOR_H
-#define RADIOCAROUSELANIMATOR_H
-
-// System includes
-#include <QObject>
-
-// User includes
-
-// Forward declarations
-class RadioStationCarousel;
-class QTimeLine;
-class QTimer;
-
-// Class declaration
-class RadioCarouselAnimator : public QObject
-{
-    Q_OBJECT
-
-    enum AnimationFlag
-    {
-        NoAnimation         = 0,
-        ScrollingNumbers    = 1 << 0,
-        TimerItem           = 1 << 1,
-        IconItem            = 1 << 2,
-        TextItem            = 1 << 3,
-
-        FlashingIcon        = TimerItem | IconItem,
-        FlashingText        = TimerItem | TextItem
-    };
-    Q_DECLARE_FLAGS( AnimationMode, AnimationFlag )
-
-public:
-
-    RadioCarouselAnimator( RadioStationCarousel& carousel );
-    ~RadioCarouselAnimator();
-
-    void startNumberScroll( const uint startFrequency, const uint stopFrequency );
-
-    void startFlashingIcon();
-    void stopFlashingIcon();
-
-    void startFlashingText();
-    void stopFlashingText();
-
-    void stopAll();
-
-private slots:
-
-    void handleTimeout();
-    void updateNumberScroll( int value );
-    void finalizeNumberScroll();
-
-private:
-
-    void addMode( AnimationMode mode );
-    void removeMode( AnimationMode mode );
-
-private:
-
-    RadioStationCarousel&   mCarousel;
-    QTimeLine*              mAnimationTimeLine;
-    QTimer*                 mTimer;
-    bool                    mCanceled;
-    AnimationMode           mMode;
-    bool                    mStationIsFavorite;
-    bool                    mFlashingToggle;
-
-};
-
-#endif // RADIOCAROUSELANIMATOR_H
--- a/radioapp/radiowidgets/inc/radiocarouselitem.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,136 +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 RADIOCAROUSELITEM_H
-#define RADIOCAROUSELITEM_H
-
-// System includes
-#include <HbWidget>
-#include <QScopedPointer>
-
-// User includes
-
-// Forward declarations
-class RadioStation;
-class HbIconItem;
-class HbTextItem;
-class HbRichTextItem;
-class HbTouchArea;
-class RadioCarouselItemObserver;
-
-// Class declaration
-class RadioCarouselItem : public HbWidget
-{
-    Q_OBJECT
-    Q_PROPERTY(Appearance appearance READ appearance WRITE setAppearance)
-    Q_PROPERTY(bool landscape READ landscape WRITE setLandscape)
-    Q_ENUMS(Appearance)
-
-    friend class RadioStationCarousel;
-
-public:
-
-    enum ItemFlag
-    {
-        NameVisible         = 1 << 0,
-        FavoriteVisible     = 1 << 1,
-        FavoriteTouchable   = 1 << 2,
-        GenreVisible        = 1 << 3,
-        RadiotextVisible    = 1 << 4,
-        RadiotextTouchable  = 1 << 5,
-        UrlVisible          = 1 << 6,
-        UrlTouchable        = 1 << 7,
-
-        LastFlagMarker      = 1 << 8,       // Keep this as the last flag
-
-        DefaultFlags = NameVisible | FavoriteVisible | FavoriteTouchable | GenreVisible | RadiotextVisible,
-        ManualSeekFlags = NameVisible
-    };
-    Q_DECLARE_FLAGS( CarouselItemFlags, ItemFlag )
-
-    enum Appearance { Default, Full, ManualSeek };
-
-    RadioCarouselItem( RadioCarouselItemObserver& observer, QGraphicsItem* parent, bool registerCss = false );
-    ~RadioCarouselItem();
-
-// New functions
-
-    void setAppearance( Appearance appearance );
-    Appearance appearance() const;
-
-    void setLandscape( bool landscape );
-    bool landscape() const;
-
-    void setSeekLayout( bool seekLayout );
-
-    void setStation( const RadioStation& station );
-
-    uint frequency() const;
-    void update( const RadioStation* station = NULL );
-    void setFrequency( uint frequency );
-    void cleanRdsData();
-    void setRadioText( const QString& text );
-
-    enum ItemVisibility{ AllVisible, AllHidden, IconVisible };
-    void setItemVisibility( ItemVisibility visibility );
-
-    void setIconOpacity( qreal opacity );
-
-    void createPrimitives();
-
-    void drawOffScreen( QPainter& painter );
-
-public slots:
-
-    void updatePrimitives();
-
-private:
-
-    void gestureEvent( QGestureEvent* event );
-
-    void setFlags( CarouselItemFlags flags );
-    void clearFlags( CarouselItemFlags flags );
-
-    void updateVisibilities();
-
-    void updateFavoriteIcon( bool isFavorite );
-
-    void updateLayout();
-
-private: // data
-
-    RadioCarouselItemObserver&          mObserver;
-
-    QScopedPointer<RadioStation>        mStation;
-
-    HbIconItem*                         mFavoriteItem;
-    HbTextItem*                         mGenreItem;
-    HbTouchArea*                        mFavoriteTouchArea;
-    HbTextItem*                         mNameItem;
-    HbRichTextItem*                     mRadiotextItem;
-    HbTextItem*                         mUrlItem;
-
-    Appearance                          mAppearance;
-    bool                                mOwnsCss;
-    bool                                mLandscapeMode;
-    CarouselItemFlags                   mFlags;
-
-};
-
-Q_DECLARE_OPERATORS_FOR_FLAGS( RadioCarouselItem::CarouselItemFlags )
-
-#endif // RADIOCAROUSELITEM_H
--- a/radioapp/radiowidgets/inc/radiocarouselitemobserver.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef RADIOCAROUSELITEMOBSERVER_H
-#define RADIOCAROUSELITEMOBSERVER_H
-
-class RadioStation;
-class QString;
-class HbIcon;
-
-class RadioCarouselItemObserver
-{
-public:
-
-    virtual void handleIconClicked( const RadioStation& station ) = 0;
-    virtual void handleRadiotextClicked( const RadioStation& station ) = 0;
-    virtual void handleUrlClicked( const RadioStation& station ) = 0;
-    virtual QString localizeGenre( int genre ) = 0;
-    virtual bool isInManualSeek() const = 0;
-    virtual HbIcon favoriteIcon() const = 0;
-    virtual HbIcon nonFavoriteIcon() const = 0;
-    virtual RadioStation findStation( uint frequency ) = 0;
-
-};
-
-#endif // RADIOCAROUSELITEMOBSERVER_H
--- a/radioapp/radiowidgets/inc/radiofadinglabel.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +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 RADIOFADINGLABEL_H
-#define RADIOFADINGLABEL_H
-
-// System includes
-#include <HbLabel>
-#include <HbEffect>
-
-// User includes
-#include "radiowidgetsexport.h"
-
-class WIDGETS_DLL_EXPORT RadioFadingLabel : public HbLabel
-{
-    Q_OBJECT
-
-public:
-
-    RadioFadingLabel( QGraphicsItem* parent = 0 );
-
-    void setFadingEnabled( bool fading );
-
-    void setTextWithoutFading( const QString& newText );
-
-public slots:
-
-    void setText( const QString& newText );
-
-private slots:
-
-    void effectFinished( HbEffect::EffectStatus status );
-
-private:
-
-    void startEffect( const QString& effectName, const char* slot = 0 );
-
-    QString trimHtml( const QString& text );
-
-private: // data
-
-    QString     mTextHolder;
-
-    bool        mFadingEnabled;
-
-};
-
-#endif // RADIOFADINGLABEL_H
--- a/radioapp/radiowidgets/inc/radiofrequencyitem.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,50 +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 RADIOFREQUENCYITEM_H
-#define RADIOFREQUENCYITEM_H
-
-// System includes
-#include <QPixmap>
-
-// Forward declarations
-class QGraphicsPixmapItem;
-
-// Class declaration
-class RadioFrequencyItem
-{
-public:
-
-    RadioFrequencyItem( QString frequency );
-
-    uint frequency() const;
-
-    QPixmap updatePrimitive( QGraphicsPixmapItem* item );
-
-    void setPixmap( QPixmap pixmap );
-
-private: // data
-
-    uint                        mFrequency;
-
-    QPixmap                     mPixmap;
-
-    QGraphicsPixmapItem*        mGraphicsItem;
-
-};
-
-#endif // RADIOFREQUENCYITEM_H
--- a/radioapp/radiowidgets/inc/radiofrequencyscanner.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +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 RADIOPRESETSCANNER_H_
-#define RADIOPRESETSCANNER_H_
-
-// System includes
-#include <QObject>
-#include <QSharedPointer>
-
-// Forward declarations
-class HbProgressDialog;
-class RadioStation;
-class RadioUiEngine;
-class RadioWindow;
-class RadioFrequencyStrip;
-class RadioStationCarousel;
-class RadioScannerEngine;
-
-// Class declaration
-class RadioFrequencyScanner : public QObject
-{
-    Q_OBJECT
-
-public:
-
-    RadioFrequencyScanner( RadioUiEngine& uiEngine, QObject* parent );
-    ~RadioFrequencyScanner();
-
-    void startScanning();
-
-    bool isAlive() const;
-
-signals:
-
-    void frequencyScannerFinished();
-
-public slots:
-
-    void cancelScanning();
-
-private slots:
-
-    void delayedStart();
-    void updateScanProgress( const RadioStation& station );
-    void continueScanning();
-    void restoreUiControls();
-
-private:
-
-    void finishScanning();
-
-private: // data
-
-    /*!
-     * Reference to the Ui engine
-     */
-    RadioUiEngine&                      mUiEngine;
-
-    bool                                mInMainView;
-
-    QSharedPointer<RadioScannerEngine>  mScannerEngine;
-
-    /**
-     * Scanning progress note
-     * Own.
-     */
-    QWeakPointer<HbProgressDialog>      mScanningProgressNote;
-
-    int                                 mStripScrollTime;
-    int                                 mCarouselScrollTime;
-
-    bool                                mIsAlive;
-
-    bool                                mUserCanceled;
-
-};
-
-#endif // RADIOPRESETSCANNER_H_
--- a/radioapp/radiowidgets/inc/radiofrequencystrip.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +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 RADIOFREQUENCYSTRIP_H
-#define RADIOFREQUENCYSTRIP_H
-
-// User includes
-#include "radiofrequencystripbase.h"
-#include "radio_global.h"
-#include "radiowidgetsexport.h"
-
-// Forward declarations
-class RadioUiEngine;
-class RadioStation;
-class RadioUiLoader;
-
-typedef QList<RadioStation> StationList;
-
-// Class declaration
-class WIDGETS_DLL_EXPORT RadioFrequencyStrip : public RadioFrequencyStripBase
-{
-    Q_OBJECT
-
-public:
-
-    RadioFrequencyStrip();
-
-    void init( RadioUiEngine* engine, RadioUiLoader& uiLoader );
-
-    void setFrequency( const uint newFrequency, int reason, Scroll::Direction direction = Scroll::Shortest );
-
-signals:
-
-    void frequencyChanged( uint frequency, int reason, int direction );
-    void skipRequested( int skipMode );
-    void seekRequested( int seekDirection );
-
-private:
-
-// from base class RadioFrequencyStripBase
-
-    bool isInitialized() const;
-    QList<FrequencyStrip::StationMarker> stationsInRange( uint minFrequency, uint maxFrequency ) const;
-    void emitFrequencyChanged( uint frequency, int reason, int direction );
-    void skipToPrevious();
-    void skipToPreviousFavorite();
-    void skipToNext();
-    void skipToNextFavorite();
-    void seekDown();
-    void seekUp();
-    bool isScanning() const;
-    uint frequencyAtIndex( int index ) const;
-
-private: // data
-
-    RadioUiEngine*              mUiEngine;
-
-};
-
-#endif // RADIOFREQUENCYSTRIP_H
--- a/radioapp/radiowidgets/inc/radiofrequencystripbase.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,224 +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 RADIOFREQUENCYSTRIPBASE_H
-#define RADIOFREQUENCYSTRIPBASE_H
-
-// System includes
-#include <QMap>
-#include <QHash>
-#include <HbEffect>
-#include <QColor>
-
-// User includes
-#include "radiostripbase.h"
-#include "radiofrequencystripdef.h"
-
-// Forward declarations
-class RadioFrequencyItem;
-class HbPushButton;
-class QTimer;
-class QModelIndex;
-class HbDocumentLoader;
-
-// Class declaration
-class RadioFrequencyStripBase : public RadioStripBase
-{
-    Q_OBJECT
-    Q_PROPERTY(int itemHeight READ itemHeight WRITE setItemHeight)
-    Q_PROPERTY(uint frequency READ frequency)
-
-    friend class RadioFrequencyItem;
-
-public:
-
-    RadioFrequencyStripBase( QGraphicsItem* parent = 0 );
-
-    void setItemHeight( int itemHeight );
-    int itemHeight() const;
-
-    void initbase( uint minFrequency, uint maxFrequency, uint stepSize, uint frequency );
-    void createButtonsFromDocml( HbDocumentLoader& uiLoader, const QString& leftButtonName, const QString& rightButtonName );
-    void createButtons();
-
-    virtual void setFrequency( const uint frequency, int reason, Scroll::Direction direction = Scroll::Shortest );
-    uint frequency() const;
-
-    bool isInManualSeekMode() const;
-    void cancelManualSeek();
-
-    void addScannedStation( uint frequency );
-
-    void updateFavorite( uint frequency );
-
-public slots:
-
-    void setScanningMode( bool isScanning );
-
-signals:
-
-    void manualSeekChanged( bool manualSeek );
-
-private slots:
-
-    void initEmptyItems();
-    void removeStation( const QModelIndex& parent, int first, int last );
-    void updateStation( const QModelIndex& parent, int first, int last );
-    void handleLeftButton();
-    void handleRightButton();
-    void handleLongLeftButton();
-    void handleLongRightButton();
-    void toggleManualSeek();
-    void handleScrollingEnd();
-
-private:
-
-// from base class RadioStripBase
-
-    void updateItemPrimitive( QGraphicsItem* itemToUpdate, int itemIndex );
-    QGraphicsItem* createItemPrimitive( QGraphicsItem *parent );
-    void scrollPosChanged();
-
-// from base class QGraphicsWidget
-
-    void resizeEvent ( QGraphicsSceneResizeEvent* event );
-//    void showEvent( QShowEvent* event );
-    void changeEvent( QEvent* event );
-
-// from base class HbScrollArea
-
-    void mousePressEvent( QGraphicsSceneMouseEvent* event );
-    void mouseReleaseEvent( QGraphicsSceneMouseEvent* event );
-    void gestureEvent( QGestureEvent* event );
-
-// from base class QObject
-
-    void timerEvent( QTimerEvent* event );
-
-// New functions
-
-    virtual bool isInitialized() const = 0;
-    virtual QList<FrequencyStrip::StationMarker> stationsInRange( uint minFrequency, uint maxFrequency ) const = 0;
-    virtual void emitFrequencyChanged( uint frequency, int reason, int direction ) = 0;
-    virtual void skipToPrevious() = 0;
-    virtual void skipToPreviousFavorite() = 0;
-    virtual void skipToNext() = 0;
-    virtual void skipToNextFavorite() = 0;
-    virtual void seekDown() = 0;
-    virtual void seekUp() = 0;
-    virtual bool isScanning() const = 0;
-    virtual uint frequencyAtIndex( int index ) const = 0;
-
-    void initModel();
-
-    void initSelector();
-
-    void initPositions();
-
-    void initButtons();
-
-    void addFrequencyPos( int pos, uint frequency, RadioFrequencyItem* item );
-
-    void updateStationsInRange( int first, int last, bool stationRemoved = false );
-
-    void updateItem( RadioFrequencyItem* item, uint upperRange = 0, uint ignoredFrequency = 0 );
-
-    void updateAllItems();
-
-    QPixmap drawPixmap( uint frequency, QList<FrequencyStrip::StationMarker> stations, RadioFrequencyItem* item );
-
-    QLineF makeTab( qreal pos, int height );
-
-    int selectorPos() const;
-
-    void scrollToFrequency( uint frequency,
-                            Scroll::Direction direction = Scroll::Shortest,
-                            int time = 0 );
-
-    void hideButtons();
-    void showButtons();
-
-private: // data
-
-    class FrequencyPos
-    {
-    public:
-        explicit FrequencyPos( int pos, RadioFrequencyItem* item ) :
-            mPosition( pos ),
-            mItem( item ) {}
-
-        FrequencyPos() :
-            mPosition( 0 ),
-            mItem( 0 ) {}
-
-        int                     mPosition;
-        RadioFrequencyItem*     mItem;
-
-    };
-
-    int                         mItemHeight;
-
-    uint                        mMinFrequency;
-
-    uint                        mMaxFrequency;
-
-    uint                        mFrequencyStepSize;
-
-    uint                        mFrequency;
-
-    QGraphicsPixmapItem*        mSelectorImage;
-
-    qreal                       mSeparatorPos;
-
-    short                       mMaxWidth;
-
-    qreal                       mSelectorPos;
-
-    QList<RadioFrequencyItem*>  mFrequencyItems;
-
-    /**
-     * Container to help map a frequency to strip position and additional information about the frequency.
-     * In the default region contains an item for every valid frequency from 87.50 Mhz to 108.00 Mhz with
-     * stepsize 50 Khz which amounts to 410 items.
-     */
-    QMap<uint,FrequencyPos>     mFrequencies;
-
-    /**
-     * Container to help map strip position to frequency.
-     * It is queried every time the strip moves so the lookup time needs to be fast. QHash is used because
-     * it offers the fastest lookup time of any other QT container. QHash stores the items in arbitrary
-     * order so we must never try to loop through them and assume they are in any particular order.
-     */
-    QHash<int,uint>             mPositions;
-
-    HbPushButton*               mLeftButton;
-
-    HbPushButton*               mRightButton;
-
-    QTimer*                     mManualSeekTimer;
-
-    bool                        mManualSeekMode;
-
-    uint                        mLastReportedFrequency;
-
-    int                         mManualSeekTimerId;
-
-    QColor                      mForegroundColor;
-
-};
-
-#endif // RADIOFREQUENCYSTRIPBASE_H
--- a/radioapp/radiowidgets/inc/radiofrequencystripdef.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +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 RADIOFREQUENCYSTRIPDEF_H
-#define RADIOFREQUENCYSTRIPDEF_H
-
-#include <QLatin1String>
-#include <QFont>
-
-namespace Scroll
-{
-    enum Direction
-    {
-        Shortest,
-        Left,
-        Right
-    };
-}
-
-namespace FrequencyStrip
-{
-
-    struct StationMarker
-    {
-        StationMarker() : mFrequency( 0 ), mIsFavorite( false ) {}
-        StationMarker( uint frequency, bool isFavorite ) : mFrequency( frequency ), mIsFavorite( isFavorite ) {}
-        uint mFrequency;
-        bool mIsFavorite;
-    };
-
-    enum FrequencyChangeReason
-    {
-        Unspecified = 0,
-        ManualSeekUpdate,
-        ManualSeekTune
-    };
-
-    // Frequency lines
-    const int TAB_HEIGHT_SMALL = 12;
-    const int TAB_HEIGHT_BIG = 18;
-    const int PEN_WIDTH_FAVORITE = 4;
-    const qreal INDICATOR_WIDTH = 2.0;
-
-    const qreal ROUNDER = 0.5;
-    const int SELECTOR_WIDTH = 2;
-    const int SELECTOR_Z_POS = 100;
-
-    const int ONE_HERTZ = 1000000;
-    const int HALF_HERTZ = ONE_HERTZ / 2;
-    const int ONE_TAB_DISTANCE = 20;
-    const uint ONE_TAB_IN_HZ = uint( 0.2 * ONE_HERTZ );
-    const qreal PIXEL_IN_HZ = ONE_TAB_IN_HZ / ONE_TAB_DISTANCE;
-    const qreal PIXMAP_OVERLAP = qreal( ONE_TAB_DISTANCE ) / 2;
-    const int ITEM_WIDTH = ONE_TAB_DISTANCE * 5;
-    const int PIXMAP_WIDTH = ITEM_WIDTH + (int)PIXMAP_OVERLAP;
-
-    const uint ONE_HUNDRED_KHZ = 100000;
-
-    static const QLatin1String DECIMAL_TEXT( ".0" );
-
-    #ifdef BUILD_WIN32
-        const int FREQUENCY_FONT_SIZE = 12;
-        const int DECIMAL_FONT_SIZE = 8;
-    #else
-        const int FREQUENCY_FONT_SIZE = 6;
-        const int DECIMAL_FONT_SIZE = 4;
-    #endif // BUILD_WIN32
-
-    const QFont FREQUENCY_FONT( "", FREQUENCY_FONT_SIZE );
-    const QFont DECIMAL_FONT( "", DECIMAL_FONT_SIZE );
-    const int FREQUENCY_TEXT_Y_POS = 35;
-    const int STATION_MARKER_Y_POS = 10;
-
-    static const QLatin1String SLIDE_TO_LEFT    ( "SlideToLeft" );
-    static const QLatin1String SLIDE_FROM_LEFT  ( "SlideFromLeft" );
-    static const QLatin1String SLIDE_TO_RIGHT   ( "SlideToRight" );
-    static const QLatin1String SLIDE_FROM_RIGHT ( "SlideFromRight" );
-    static const QLatin1String LEFT_BUTTON      ( "tv:left_button" );
-    static const QLatin1String RIGHT_BUTTON     ( "tv:right_button" );
-
-    static const QLatin1String TEXT_COLOR_ATTRIBUTE( "text" );
-    const int MANUALSEEK_START_TIMEOUT = 400;
-    const int MANUALSEEK_END_TIMEOUT = 2000;
-    const int MANUALSEEK_SIGNAL_DELAY = 300;
-
-}
-
-#endif // RADIOFREQUENCYSTRIPDEF_H
--- a/radioapp/radiowidgets/inc/radiohistoryview.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +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 RADIOHISTORYVIEW_H
-#define RADIOHISTORYVIEW_H
-
-// System includes
-#include <HbIcon>
-#include <QScopedPointer>
-
-// User includes
-#include "radioviewbase.h"
-
-// Forward declarations
-class RadioXmlUiLoader;
-class HbListView;
-class HbAction;
-class HbAbstractViewItem;
-class RadioHistoryModel;
-class RadioHistoryItem;
-
-// Class declaration
-class RadioHistoryView : public RadioViewBase
-{
-    Q_OBJECT
-    Q_PROPERTY(HbIcon nonTaggedIcon READ nonTaggedIcon WRITE setNonTaggedIcon)
-    Q_PROPERTY(HbIcon taggedIcon READ taggedIcon WRITE setTaggedIcon)
-
-public:
-
-    RadioHistoryView();
-    ~RadioHistoryView();
-
-    void setNonTaggedIcon( const HbIcon& nonTaggedIcon );
-    HbIcon nonTaggedIcon() const;
-
-    void setTaggedIcon( const HbIcon& taggedIcon );
-    HbIcon taggedIcon() const;
-
-private slots:
-
-    void updateViewMode();
-    void clearList();
-    void updateVisibilities();
-    void showContextMenu( const QModelIndex& index );
-    void handleLongPress( HbAbstractViewItem* item );
-    void toggleTagging();
-    void openOviStore();
-    void openOtherStore();
-    void addSongs();            // Temporary test code
-    void addOneSong();          // Temporary test code
-
-private:
-
-// from base class RadioViewBase
-
-    void init();
-    void setOrientation();
-    void userAccepted();
-
-// New functions
-
-    RadioHistoryModel& historyModel() const;
-
-private: //data
-
-    HbListView*                         mHistoryList;
-    HbAction*                           mAllSongsButton;
-    HbAction*                           mTaggedSongsButton;
-    QScopedPointer<RadioHistoryItem>    mSelectedItem;
-    int                                 mCurrentRow;
-    HbIcon                              mNonTaggedIcon;
-    HbIcon                              mTaggedIcon;
-
-    int                                 mSongIndex; // Temporary test variable
-
-};
-
-#endif // RADIOHISTORYVIEW_H
--- a/radioapp/radiowidgets/inc/radiomainview.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,97 +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 RADIOMAINVIEW_H
-#define RADIOMAINVIEW_H
-
-// System includes
-#include <QScopedPointer>
-
-// User includes
-#include "radioviewbase.h"
-
-// Forward declarations
-class RadioWindow;
-class RadioStationModel;
-class HbPushButton;
-class RadioUiLoader;
-class RadioFrequencyScanner;
-class RadioStationCarousel;
-class RadioFrequencyStrip;
-class RadioStation;
-
-// Class declaration
-class RadioMainView : public RadioViewBase
-    {
-    Q_OBJECT
-
-public:
-
-    explicit RadioMainView();
-    ~RadioMainView();
-
-    void setScanningMode( bool scanning );
-
-signals:
-
-    void applicationReady();
-
-private slots:
-
-    void setFrequencyFromWidget( uint frequency, int reason, int direction );
-    void setFrequencyFromEngine( uint frequency, int reason );
-    void skip( int skipMode );
-    void openStationsView();
-    void startFirstTimeScanning();
-    void toggleScanning();
-    void toggleFavorite();
-    void seekingStarted();
-    void updateAntennaStatus( bool connected );
-    void updateAudioRoute( bool loudspeaker );
-    void setManualSeekMode( bool manualSeekActive );
-    void handleFavoriteChange( const RadioStation& station );
-    void saveActivity();
-
-private:
-
-// from base class RadioViewBase
-
-    void preLazyLoadInit();
-    void init();
-    void setOrientation();
-    void userAccepted();
-
-// from base class QObject
-
-    bool eventFilter( QObject* watched, QEvent* event );
-
-// New functions
-
-    void updateFavoriteButton();
-
-private: // data
-
-    QScopedPointer<RadioFrequencyScanner>   mFrequencyScanner;
-    RadioStationCarousel*                   mCarousel;
-    RadioFrequencyStrip*                    mFrequencyStrip;
-
-    HbAction*                               mSkippingAction;    //TODO: Remove. Temporary test code
-    bool                                    mAlternateSkipping; //TODO: Remove. Temporary test code
-
-    };
-
-#endif // RADIOMAINVIEW_H
--- a/radioapp/radiowidgets/inc/radiostationcarousel.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,234 +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 RADIOSTATIONCAROUSEL_H
-#define RADIOSTATIONCAROUSEL_H
-
-// System includes
-#include <HbScrollArea>
-#include <HbIcon>
-#include <QWeakPointer>
-
-// User includes
-#include "radiocarouselitemobserver.h"
-#include "radiowidgetsexport.h"
-#include "radiofrequencystripdef.h"
-#include "radio_global.h"
-
-// Forward declarations
-class RadioUiEngine;
-class RadioUiLoader;
-class RadioCarouselItem;
-class RadioStation;
-class RadioStationModel;
-class RadioStationCarousel;
-class RadioCarouselAnimator;
-class HbLabel;
-class HbMenu;
-
-namespace CarouselInfoText
-{
-    enum Type
-    {
-        None,
-        ConnectAntenna,
-        NoFavorites,
-        FavoriteIconHint,
-        Seeking,
-        Scanning,
-        ManualSeek
-    };
-}
-
-// Class declaration
-class WIDGETS_DLL_EXPORT RadioStationCarousel : public HbScrollArea
-                                              , public RadioCarouselItemObserver
-{
-    Q_OBJECT
-    Q_PROPERTY(HbIcon favoriteIcon READ favoriteIcon WRITE setFavoriteIcon)
-    Q_PROPERTY(HbIcon nonFavoriteIcon READ nonFavoriteIcon WRITE setNonFavoriteIcon)
-    Q_PROPERTY( int autoScrollTime READ autoScrollTime WRITE setAutoScrollTime )
-
-    friend class RadioCarouselAnimator;
-    friend class RadioCarouselItem;
-
-public:
-
-    enum ScrollFlag
-    {
-        Default             = 0,
-        NoAnim              = 1 << 0,
-        NoSignal            = 1 << 1,
-        IgnoreCenter        = 1 << 2,
-        UpdateItem          = 1 << 3,
-        FromPanGesture      = 1 << 4,
-        FromSwipeGesture    = 1 << 5
-    };
-    Q_DECLARE_FLAGS( ScrollMode, ScrollFlag )
-
-    RadioStationCarousel( QGraphicsItem* parent = 0 );
-
-    void setFavoriteIcon( const HbIcon& favoriteIcon );
-    HbIcon favoriteIcon() const;
-
-    void setNonFavoriteIcon( const HbIcon& nonFavoriteIcon );
-    HbIcon nonFavoriteIcon() const;
-
-    void setAutoScrollTime( const int time );
-    int autoScrollTime() const;
-
-    void init( RadioUiLoader& uiLoader, RadioUiEngine* uiEngine );
-
-    void setFrequency( uint frequency, int reason, Scroll::Direction direction = Scroll::Shortest );
-
-    RadioUiEngine* uiEngine();
-
-    bool isAntennaAttached() const;
-
-    void setScanningMode( bool scanning );
-    bool isInScanningMode() const;
-
-    void cleanRdsData();
-
-    void animateNewStation( const RadioStation& station );
-    void cancelAnimation();
-
-    void setInfoText( CarouselInfoText::Type type );
-    void clearInfoText();
-
-    void setManualSeekMode( bool manualSeekActive );
-
-    void drawOffScreen( QPainter& painter );
-
-    void setLandscape( bool landscape );
-
-signals:
-
-    void frequencyChanged( uint frequency, int reason, int direction );
-    void skipRequested( int skipMode );
-    void scanAnimationFinished();
-
-public slots:
-
-    void updateAntennaStatus( bool connected );
-
-private slots:
-
-    void scrollPosChanged( const QPointF& newPosition );
-    void adjustAfterScroll();
-    void update( const RadioStation& station );
-    void updateRadioText( const RadioStation& station );
-    void updateStations();
-    void timerFired();
-
-#ifdef USE_DEBUGGING_CONTROLS
-    void setRdsAvailable( bool available );
-#endif // USE_DEBUGGING_CONTROLS
-
-private:
-
-// from base class QGraphicsItem
-
-    void mousePressEvent( QGraphicsSceneMouseEvent* event );
-    void resizeEvent( QGraphicsSceneResizeEvent* event );
-    void showEvent( QShowEvent* event );
-    void gestureEvent( QGestureEvent* event );
-
-// from base class RadioCarouselItemObserver
-
-    void handleIconClicked( const RadioStation& station );
-    void handleRadiotextClicked( const RadioStation& station );
-    void handleUrlClicked( const RadioStation& station );
-    QString localizeGenre( int genre );
-    bool isInManualSeek() const;
-    RadioStation findStation( uint frequency );
-
-// New functions
-
-    bool isInitialized() const;
-
-    void setCenterIndex( int index, ScrollMode mode = Default );
-
-    void scrollToIndex( int index, Scroll::Direction direction = Scroll::Shortest,
-                        ScrollMode mode = Default );
-
-    int calculateDifference( int targetIndex, Scroll::Direction& direction );
-
-    bool isScrollingAllowed() const;
-
-    void adjustPos( int offset );
-
-    int trimIndex( int index );
-
-    int prevIndex( int index );
-    int nextIndex( int index );
-
-    void skip( StationSkip::Mode mode );
-
-private: // data
-
-    enum TimerMode { NoTimer, SetFrequency, RtPlusCheck, InfoText, FavoriteHintShow, FavoriteHintHide };
-
-    RadioUiEngine*                      mUiEngine;
-
-    int                                 mAutoScrollTime;
-
-    HbIcon                              mFavoriteIcon;
-    HbIcon                              mNonFavoriteIcon;
-
-    QTimer*                             mGenericTimer;
-    TimerMode                           mTimerMode;
-
-    QString                             mRadioTextHolder;
-
-    QWeakPointer<RadioCarouselAnimator> mAnimator;
-
-    HbLabel*                            mInfoText;
-
-    HbMenu*                             mRadiotextPopup;
-
-    HbWidget*                           mContainer;
-
-    enum CarouselItem                   { LeftItem, CenterItem, RightItem };
-    RadioCarouselItem*                  mItems[3];
-
-    int                                 mMidScrollPos;
-    int                                 mMaxScrollPos;
-
-    int                                 mCurrentIndex;
-    int                                 mTargetIndex;
-    bool                                mIsCustomFreq;
-
-    CarouselInfoText::Type              mInfoTextType;
-
-    RadioStationModel*                  mModel;
-
-    bool                                mPosAdjustmentDisabled;
-
-    Scroll::Direction                   mScrollDirection;
-
-    bool                                mManualSeekMode;
-
-#ifdef USE_DEBUGGING_CONTROLS
-    RadioFadingLabel*                   mRdsLabel;
-#endif
-
-};
-
-Q_DECLARE_OPERATORS_FOR_FLAGS( RadioStationCarousel::ScrollMode )
-
-#endif // RADIOSTATIONCAROUSEL_H
--- a/radioapp/radiowidgets/inc/radiostationsview.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef RADIOSTATIONSVIEW_H
-#define RADIOSTATIONSVIEW_H
-
-// System includes
-#include <HbIcon>
-#include <QScopedPointer>
-
-// User includes
-#include "radioviewbase.h"
-
-// Forward declarations
-class RadioWindow;
-class RadioStationModel;
-class HbListView;
-class HbPushButton;
-class HbAbstractViewItem;
-class RadioUiLoader;
-class RadioStation;
-class RadioStationFilterModel;
-class RadioFrequencyScanner;
-class QSortFilterProxyModel;
-
-// Class declaration
-class RadioStationsView : public RadioViewBase
-{
-    Q_OBJECT
-    Q_PROPERTY(HbIcon nowPlayingIcon READ nowPlayingIcon WRITE setNowPlayingIcon)
-    Q_PROPERTY(HbIcon favoriteIcon READ favoriteIcon WRITE setFavoriteIcon)
-
-public:
-
-    explicit RadioStationsView();
-    ~RadioStationsView();
-
-    void setNowPlayingIcon( const HbIcon& nowPlayingIcon );
-    HbIcon nowPlayingIcon() const;
-
-    void setFavoriteIcon( const HbIcon& favoriteIcon );
-    HbIcon favoriteIcon() const;
-
-private slots:
-
-    void handleClick( const QModelIndex& index );
-    void handleLongPress( HbAbstractViewItem* item, const QPointF& coords );
-    void updateAntennaStatus( bool connected );
-    void updateViewMode();
-    void startScanning();
-    void finishScanning();
-    void updateVisibilities();
-    void clearList();
-    void play();            // Called from context menu
-    void rename();          // Called from context menu
-    void toggleFavorite();  // Called from context menu
-    void deleteStation();   // Called from context menu
-    void renameDone( HbAction* action );
-
-private:
-
-// from base class RadioViewBase
-
-    void init();
-    void userAccepted();
-
-// New functions
-
-    void initListView();
-
-private: //data
-
-    RadioStationModel*                      mModel;
-
-    QSortFilterProxyModel*                  mFilterModel;
-
-    HbAction*                               mScanStationsAction;
-    HbAction*                               mClearListAction;
-
-    HbListView*                             mStationsList;
-
-    HbAction*                               mFavoritesButton;
-    HbAction*                               mLocalStationsButton;
-
-    HbIcon                                  mFavoriteIcon;
-    HbIcon                                  mNowPlayingIcon;
-
-    QScopedPointer<RadioStation>            mSelectedStation;
-
-    QScopedPointer<RadioFrequencyScanner>   mFrequencyScanner;
-
-    enum UserQuestion { NoQuestion, DeleteStation, StartScanning, ClearList };
-    UserQuestion                            mCurrentQuestion;
-
-};
-
-#endif // RADIOSTATIONSVIEW_H
--- a/radioapp/radiowidgets/inc/radiostripbase.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +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 RADIOSTRIPBASE_H_
-#define RADIOSTRIPBASE_H_
-
-// System includes
-#include <HbScrollArea>
-
-// Forward declarations
-class HbWidget;
-class QAbstractItemModel;
-
-// Class declaration
-class RadioStripBase : public HbScrollArea
-{
-    Q_OBJECT
-    Q_PROPERTY(int autoScrollTime READ autoScrollTime WRITE setAutoScrollTime)
-
-public:
-
-    virtual ~RadioStripBase();
-
-    void setAutoScrollTime( const int time );
-    int autoScrollTime() const;
-
-    void setModel( QAbstractItemModel* model );
-    QAbstractItemModel* model() const;
-
-    void setCyclic( bool isCyclic );
-    void setOverlap( qreal overlap );
-    void setAutoCenter( bool autoCenter );
-    void setItemSize( const QSizeF& size );
-    void setIndex( int index, bool animateToCenter );
-
-protected:
-
-    RadioStripBase( QGraphicsItem* parent = 0 );
-
-// from base class QGraphicsWidget
-
-    void resizeEvent( QGraphicsSceneResizeEvent* event );
-
-// from base class QGraphicsItem
-
-    void mousePressEvent( QGraphicsSceneMouseEvent* event );
-    void mouseReleaseEvent( QGraphicsSceneMouseEvent* event );
-
-private:
-
-    Q_DISABLE_COPY( RadioStripBase )
-
-// from base class HbScrollArea
-
-    bool scrollByAmount( const QPointF& delta );
-
-    virtual void updateItemPrimitive( QGraphicsItem* itemToUpdate, int itemIndex ) = 0;
-    virtual QGraphicsItem* createItemPrimitive( QGraphicsItem *parent ) = 0;
-
-    virtual void scrollPosChanged() = 0;
-
-    void moveAllItemsToPool();
-
-    void populateAndLayout();
-
-    QGraphicsItem* constructItem( int index, bool append );
-
-    QGraphicsItem* getFromPool();
-
-    void returnToPool( QGraphicsItem* item );
-
-    qreal indexToOffset( int index );
-
-    int offsetToIndex( qreal offset );
-
-    void updateItemWithIndex( int index );
-
-    void adjustItems();
-
-protected: // data
-
-    int                     mAutoScrollTime;
-
-private: //data
-
-    HbWidget*               mStripContainer;
-
-    QAbstractItemModel*     mModel;
-
-    bool                    mIsCyclic;
-    bool                    mAutoCenter;
-
-    qreal                   mOverlap;
-
-    QSizeF                  mItemSize;
-
-    QList<QGraphicsItem*>   mItemPool;
-    QGraphicsWidget*        mItemPoolParent;
-
-    int                     mCurrentIndex;
-    int                     mPressedIndex;
-
-    qreal                   mStripLength;
-    qreal                   mContentsLength;
-
-    QList<QGraphicsItem*>   mItemAtSlot;
-    QList<int>              mIndexAtSlot; // Can be bigger than rowcount if cyclic is used
-
-};
-
-
-#endif // RADIOSTRIPBASE_H_
--- a/radioapp/radiowidgets/inc/radiouiloader.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,145 +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 RADIOUILOADER_H_
-#define RADIOUILOADER_H_
-
-// System includes
-#include <HbDocumentLoader>
-
-// Constants
-
-namespace DOCML
-{
-    static const QLatin1String FILE_MAINVIEW                    ( ":/layout/mainview.docml" );
-    static const QLatin1String FILE_STATIONSVIEW                ( ":/layout/stationsview.docml" );
-    static const QLatin1String FILE_HISTORYVIEW                 ( ":/layout/historyview.docml" );
-
-    // Generic XML UI definitions
-    static const QLatin1String NAME_VIEW                        ( "view" );
-    static const QLatin1String SECTION_LAZY_LOAD                ( "lazy_load" );
-    static const QLatin1String SECTION_PORTRAIT                 ( "portrait" );
-    static const QLatin1String SECTION_LANDSCAPE                ( "landscape" );
-    static const QLatin1String NAME_LOUDSPEAKER_ACTION          ( "loudspeaker_action" );
-    static const QLatin1String NAME_EXIT_ACTION                 ( "exit_action" );
-
-    // RadioMainView
-    static const QLatin1String MV_NAME_HISTORYVIEW_ACTION       ( "mv:historyview_action" );
-    static const QLatin1String MV_NAME_CAROUSEL_BACKGROUND      ( "mv:carousel_background" );
-    static const QLatin1String MV_NAME_CAROUSEL_OVERLAY         ( "mv:carousel_overlay" );
-    static const QLatin1String MV_NAME_STATION_CAROUSEL         ( "mv:station_carousel" );
-    static const QLatin1String MV_NAME_FREQUENCY_BACKGROUND     ( "mv:frequency_background" );
-    static const QLatin1String MV_NAME_FREQUENCY_STRIP          ( "mv:frequency_strip" );
-    static const QLatin1String MV_NAME_STATIONS_BUTTON          ( "mv:stations_button" );
-    static const QLatin1String MV_NAME_FAVORITE_BUTTON          ( "mv:favorite_button" );
-    static const QLatin1String MV_NAME_SPEAKER_BUTTON           ( "mv:loudspeaker_button" );
-    static const QLatin1String MV_NAME_PREV_BUTTON              ( "mv:prev_button" );
-    static const QLatin1String MV_NAME_NEXT_BUTTON              ( "mv:next_button" );
-    static const QLatin1String MV_NAME_SCAN_ACTION              ( "mv:scan_action" );
-    static const QLatin1String MV_NAME_CAROUSEL_RT_MENU         ( "mv:carousel_rt_menu" );
-    static const QLatin1String MV_SECTION_NO_ANTENNA            ( "mv:no_antenna" );
-    static const QLatin1String MV_SECTION_SEEKING               ( "mv:seeking" );
-    static const QLatin1String MV_SECTION_SCANNING              ( "mv:scanning" );
-    static const QLatin1String MV_SECTION_NO_FAVORITES          ( "mv:no_favorites" );
-    static const QLatin1String MV_SECTION_NORMAL                ( "mv:normal" );
-
-    // RadioStationsView
-    static const QLatin1String SV_NAME_HEADING_BANNER           ( "sv:heading_banner" );
-    static const QLatin1String SV_NAME_STATIONS_LIST            ( "sv:stations_list" );
-    static const QLatin1String SV_NAME_FAVORITES_BUTTON         ( "sv:favorite_stations_button" );
-    static const QLatin1String SV_NAME_LOCALS_BUTTON            ( "sv:local_stations_button" );
-    static const QLatin1String SV_NAME_SCAN_ACTION              ( "sv:scan_action" );
-    static const QLatin1String SV_NAME_CLEAR_LIST_ACTION        ( "sv:clear_list_action" );
-    static const QLatin1String SV_NAME_SCAN_BUTTON              ( "sv:scan_button" );
-    static const QLatin1String SV_NAME_PLAY_ACTION              ( "sv:play_action" );
-    static const QLatin1String SV_NAME_RENAME_ACTION            ( "sv:rename_action" );
-    static const QLatin1String SV_NAME_FAVORITE_ACTION          ( "sv:toggle_favorite_action" );
-    static const QLatin1String SV_NAME_DELETE_ACTION            ( "sv:delete_action" );
-
-    static const QLatin1String SV_SECTION_SHOW_ALL_STATIONS     ( "show_all_stations" );
-    static const QLatin1String SV_SECTION_SHOW_FAVORITES        ( "show_favorites" );
-    static const QLatin1String SV_SECTION_SHOW_SCAN_TEXT        ( "show_scan_text" );
-    static const QLatin1String SV_SECTION_HIDE_SCAN_TEXT        ( "hide_scan_text" );
-
-    // RadioStationsView Context Menu
-    static const QLatin1String NAME_CONTEXT_MENU                ( "sv:context_menu" );
-    static const QLatin1String NAME_CONTEXT_RENAME              ( "sv:rename_action" );
-    static const QLatin1String NAME_CONTEXT_FAVORITE            ( "sv:toggle_favorite_action" );
-    static const QLatin1String NAME_CONTEXT_DELETE              ( "sv:delete_action" );
-    static const QLatin1String NAME_INPUT_QUERY                 ( "sv:station_name_query" );
-
-    // Station Carousel
-    static const QLatin1String MV_NAME_INFO_FIRST_ROW           ( "mv:InfoFirstRow" );
-    static const QLatin1String MV_NAME_INFO_SECOND_ROW          ( "mv:InfoSecondRow" );
-    static const QLatin1String MV_NAME_INFO_THIRD_ROW           ( "mv:InfoThirdRow" );
-    static const QLatin1String MV_NAME_INFO_FOURTH_ROW          ( "mv:InfoFourthRow" );
-    static const QLatin1String MV_NAME_INFO_TEXT                ( "mv:info_text" );
-
-    // History View
-    static const QLatin1String HV_NAME_CLEAR_LIST_ACTION        ( "hv:clear_list_action" );
-    static const QLatin1String HV_NAME_HISTORY_LIST             ( "hv:history_list" );
-    static const QLatin1String HV_NAME_ALL_SONGS_BUTTON         ( "hv:all_songs_button" );
-    static const QLatin1String HV_NAME_TAGGED_SONGS_BUTTON      ( "hv:tagged_songs_button" );
-    static const QLatin1String HV_SECTION_SHOW_LIST             ( "hv:show_list" );
-    static const QLatin1String HV_SECTION_HIDE_LIST             ( "hv:hide_list" );
-    static const QLatin1String HV_SECTION_HISTORY_MODE          ( "hv:history_mode" );
-    static const QLatin1String HV_SECTION_FAVORITE_MODE         ( "hv:tagged_mode" );
-    static const QLatin1String HV_NAME_CONTEXT_MENU             ( "hv:context_menu" );
-    static const QLatin1String HV_NAME_TOGGLE_TAG_ACTION        ( "hv:toggle_tag_action" );
-    static const QLatin1String HV_NAME_OVI_STORE_ACTION         ( "hv:ovi_store_action" );
-    static const QLatin1String HV_NAME_OTHER_STORE_ACTION       ( "hv:other_store_action" );
-
-    // History View Context Menu
-    static const QLatin1String HV_NAME_CONTEXT_TAG              ( "hv:toggle_tag_action" );
-    static const QLatin1String HV_NAME_CONTEXT_SEARCH           ( "hv:search_from_other_store_action" );
-
-}
-
-// Class declaration
-class RadioUiLoader : public HbDocumentLoader
-{
-public:
-
-    RadioUiLoader();
-
-    /*!
-     * Returns the requested widget casted to correct type
-     *
-     * @param name Name of the widget
-     * @return Pointer to the widget
-     */
-    template<class T>
-    T* findWidget( QString name )
-    {
-        return qobject_cast<T*>( HbDocumentLoader::findWidget( name ) );
-    }
-
-    /*!
-     * Returns the requested object casted to correct type
-     *
-     * @param name Name of the object
-     * @return Pointer to the object
-     */
-    template<class T>
-    T* findObject( QString name )
-    {
-        return qobject_cast<T*>( HbDocumentLoader::findObject( name ) );
-    }
-
-};
-
-#endif // RADIOUILOADER_H_
--- a/radioapp/radiowidgets/inc/radioutil.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef _RADIOUIUTILITIES_H_
-#define _RADIOUIUTILITIES_H_
-
-// System includes
-#include <QWeakPointer>
-
-// User includes
-#include "radio_global.h"
-#include "radiofrequencystripdef.h"
-
-// Forward declarations
-class RadioFrequencyStrip;
-class RadioStationCarousel;
-class RadioFrequencyScanner;
-class HbNotificationDialog;
-
-struct EffectInfo
-{
-    EffectInfo( QGraphicsItem* item, QString path, QString event ) :
-        mItem( item ),
-        mPath( path ),
-        mEvent( event )
-    {}
-
-    QGraphicsItem* mItem;
-    QString mPath;
-    QString mEvent;
-
-private:
-    EffectInfo();
-};
-typedef QList<EffectInfo> QEffectList;
-
-// Class declaration
-class RadioUtil
-{
-public:
-
-    static bool addEffects( QEffectList list );
-
-    static RadioFrequencyStrip* frequencyStrip();
-    static RadioStationCarousel* carousel();
-    static bool isScannerAlive();
-    static Scan::Status scanStatus();
-
-    static void setFrequencyStrip( RadioFrequencyStrip* frequencyStrip );
-    static void setCarousel( RadioStationCarousel* carousel );
-    static void setFrequencyScanner( RadioFrequencyScanner* scanner );
-    static void setScanStatus( Scan::Status status );
-
-    static Scroll::Direction scrollDirectionFromSkipMode( int skipMode );
-    static Scroll::Direction scrollDirection( int direction );
-    static TuneReason::Reason tuneReason( int tuneReason );
-
-    static void showDiscreetNote( const QString& text );
-
-private:
-
-    RadioUtil();
-    ~RadioUtil();
-
-    static RadioUtil& instance();
-
-private: // data
-
-    QWeakPointer<RadioFrequencyStrip>   mFrequencyStrip;
-
-    QWeakPointer<RadioStationCarousel>  mCarousel;
-
-    QWeakPointer<RadioFrequencyScanner> mScanner;
-
-    QWeakPointer<HbNotificationDialog>  mNotificationDialog;
-
-    Scan::Status                        mScanStatus;
-
-};
-
-
-#endif // _RADIOUIUTILITIES_H_
--- a/radioapp/radiowidgets/inc/radioviewbase.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,142 +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 _RADIOVIEWBASE_H_
-#define _RADIOVIEWBASE_H_
-
-// System includes
-#include <HbView>
-#include <QScopedPointer>
-#include <QSharedPointer>
-
-// User includes
-
-// Forward declarations
-class RadioWindow;
-class RadioStationModel;
-class RadioUiLoader;
-class HbAction;
-class RadioUiEngine;
-
-// Constants
-namespace MenuItem
-{
-    enum CommonMenuItem
-    {
-        UseLoudspeaker,
-        Exit
-    };
-}
-
-// Class declaration
-class RadioViewBase : public HbView
-{
-    Q_OBJECT
-    Q_DISABLE_COPY( RadioViewBase )
-
-public:
-    explicit RadioViewBase( bool transient = true );
-
-    virtual ~RadioViewBase();
-
-    void setMembers( RadioWindow* mainWindow, RadioUiLoader* uiLoader );
-
-    virtual void preLazyLoadInit();
-
-    void initialize( QSharedPointer<RadioUiEngine> uiEngine );
-
-    bool isInitialized() const;
-
-    bool isTransient() const;
-
-    void updateOrientation( Qt::Orientation orientation, bool forceUpdate = false );
-
-    void bringToForeground();
-
-protected slots:
-
-    void updateAudioRouting( bool loudspeaker );
-    void activatePreviousView();
-    void quit();
-
-private slots:
-
-    void handleUserAnswer( HbAction* answer );   // Needed by HbMessageBox inconvenience API
-
-protected:
-
-// New functinos
-
-    void initBackAction();
-
-    void connectCommonMenuItem( int menuItem );
-
-    void connectXmlElement( const QString& name, const char* signal, QObject* receiver, const char* slot );
-
-    void connectViewChangeMenuItem( QString name, const char* slot );
-
-    void loadSection( const QString& docml, const QString& section );
-
-    void askQuestion( const QString& question );
-
-private:
-
-    virtual void init() = 0;
-
-    virtual void setOrientation();
-    virtual void userAccepted();
-
-protected: // data
-
-    /**
-     * Pointer to the main window.
-     * Not own.
-     */
-    RadioWindow*                        mMainWindow;
-
-    /**
-     * Pointer to the XML UI (DocML) loader
-     * Own.
-     */
-    QScopedPointer<RadioUiLoader>       mUiLoader;
-
-    /**
-     * Pointer to the ui engine
-     * Shared among all views and the radio window
-     */
-    QSharedPointer<RadioUiEngine>       mUiEngine;
-
-    /**
-     * Flag indicating whether or not the view is transient
-     * Transient views are deleted when they are hidden.
-     */
-    bool                                mTransientView;
-
-    /**
-     * Route audio to Loudspeaker/Headset menu item
-     */
-    HbAction*                           mUseLoudspeakerAction;
-
-    /**
-     * View orientation.
-     */
-    Qt::Orientation                     mOrientation;
-
-};
-
-
-#endif // _RADIOVIEWBASE_H_
--- a/radioapp/radiowidgets/inc/radiowidgetsexport.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef RADIO_WIDGETS_EXPORT_H_
-#define RADIO_WIDGETS_EXPORT_H_
-
-// System includes
-#include <QtGlobal>
-
-#ifdef BUILD_WIDGETS_DLL
-    #define WIDGETS_DLL_EXPORT Q_DECL_EXPORT
-#else
-    #define WIDGETS_DLL_EXPORT Q_DECL_IMPORT
-#endif
-
-#endif // RADIO_WIDGETS_EXPORT_H_
--- a/radioapp/radiowidgets/inc/radiowindow.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +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 _RADIOWINDOW_H_
-#define _RADIOWINDOW_H_
-
-// System includes
-#include <HbMainWindow>
-#include <HbEffect>
-#include <QWeakPointer>
-#include <QScopedPointer>
-#include <QSharedPointer>
-
-// User includes
-#include "radiowidgetsexport.h"
-
-// Forward declarations
-class RadioViewBase;
-class RadioUiEngine;
-class HbVolumeSliderPopup;
-class HbMessageBox;
-
-typedef QScopedPointer<HbVolumeSliderPopup> VolumeSliderPtr;
-
-/**
- * QWeakPointer is used to store the views because it tracks the deletion of the object and nulls
- * the reference. Transient view like RadioHistoryView is destroyed after they are closed
- * and QWeakPointer will notice it.
- */
-typedef QWeakPointer<RadioViewBase> ViewPtr;
-
-// Class declaration
-class WIDGETS_DLL_EXPORT RadioWindow : public HbMainWindow
-{
-    Q_OBJECT
-    Q_DISABLE_COPY( RadioWindow )
-
-public:
-
-    RadioWindow( QWidget* parent = 0 );
-
-    ~RadioWindow();
-
-    void showErrorMessage( const QString& text );
-
-    void init();
-
-    QString orientationSection();
-
-public slots:
-
-    void activateMainView();
-
-    void activateStationsView();
-
-    void activateHistoryView();
-
-private slots:
-
-    void initView();
-    void updateOrientation( Qt::Orientation orientation );
-    void showVolumeLevel( int volume );
-    void updateAntennaStatus( bool connected );
-
-private:
-
-// New functions
-
-    void activateView( RadioViewBase* aMember, const QString& docmlFile, Hb::ViewSwitchFlags flags = Hb::ViewSwitchDefault );
-
-private: // data
-
-    /*!
-     * Pointer to the UI engine
-     * Own, shared with views
-     */
-    QSharedPointer<RadioUiEngine>       mUiEngine;
-
-    /**
-     * Tuning view.
-     * Own.
-     */
-    ViewPtr                             mMainView;
-
-    /**
-     * Stations view
-     * Own.
-     */
-    ViewPtr                             mStationsView;
-
-    /**
-     * Play history view
-     * Own.
-     */
-    ViewPtr                             mHistoryView;
-
-    /**
-     * Pointer to the volume slider
-     * Own.
-     */
-    VolumeSliderPtr                     mVolSlider;
-
-    /**
-     * Pointer to messagebox
-     * Own.
-     */
-    QScopedPointer<HbMessageBox>        mMessageBox;
-
-};
-
-
-#endif // _RADIOWINDOW_H_
--- a/radioapp/radiowidgets/radiowidgets.pro	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,76 +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:
-#
-
-TMP_DIR_NAME = widgets
-include(../buildflags.pri)
-
-TEMPLATE    = lib
-TARGET      = fmradiowidgets
-CONFIG      += dll hb
-DEFINES     += BUILD_WIDGETS_DLL
-
-symbian:TARGET.UID3 = 0x2002FF4C
-
-INCLUDEPATH += inc
-INCLUDEPATH += ../radiouiengine/inc
-INCLUDEPATH += ../../common
-
-LIBS        += -lfmradiouiengine
-
-LOGGING_ENABLED:LIBS += -lfmradioenginewrapper
-
-DEPENDPATH  += $$INCLUDEPATH src
-
-# Input
-HEADERS     += radiowidgetsexport.h
-HEADERS     += radiowindow.h
-HEADERS     += radioutil.h
-HEADERS     += radioviewbase.h
-HEADERS     += radiouiloader.h
-HEADERS     += radiomainview.h
-HEADERS     += radiostripbase.h
-HEADERS     += radiofrequencystrip.h
-HEADERS     += radiofrequencystripbase.h
-HEADERS     += radiofrequencystripdef.h
-HEADERS     += radiofrequencyitem.h
-HEADERS     += radiostationsview.h
-HEADERS     += radiofrequencyscanner.h
-HEADERS     += radiofadinglabel.h
-HEADERS     += radiostationcarousel.h
-HEADERS     += radiocarouselitem.h
-HEADERS     += radiocarouselitemobserver.h
-HEADERS     += radiocarouselanimator.h
-HEADERS     += radiohistoryview.h
-
-SOURCES     += radiowindow.cpp
-SOURCES     += radioutil.cpp
-SOURCES     += radioviewbase.cpp
-SOURCES     += radiouiloader.cpp
-SOURCES     += radiomainview.cpp
-SOURCES     += radiostripbase.cpp
-SOURCES     += radiofrequencystrip.cpp
-SOURCES     += radiofrequencystripbase.cpp
-SOURCES     += radiofrequencyitem.cpp
-SOURCES     += radiostationsview.cpp
-SOURCES     += radiofrequencyscanner.cpp
-SOURCES     += radiofadinglabel.cpp
-SOURCES     += radiostationcarousel.cpp
-SOURCES     += radiocarouselitem.cpp
-SOURCES     += radiocarouselanimator.cpp
-SOURCES     += radiohistoryview.cpp
-
-DOCML       += res/layout/stationsview.docml res/layout/mainview.docml res/layout/historyview.docml
-RESOURCES   += res/fmradioui.qrc
--- a/radioapp/radiowidgets/res/effects/fade_in.fxml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<layers>
-    <visual src="Item">
-        <param name="opacity" type="anim">
-            <duration>1.0</duration>
-            <style>inquad</style>
-            <keyframe at="0.0">0.0</keyframe>
-            <keyframe at="1.0">1.0</keyframe>            
-        </param>
-    </visual>
-</layers>
--- a/radioapp/radiowidgets/res/effects/fade_out.fxml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-<layers>
-    <visual src="Item">
-        <param name="opacity" type="anim">
-            <duration>1.0</duration>
-            <style>outquad</style>
-            <keyframe at="0.0">1.0</keyframe>
-            <keyframe at="1.0">0.0</keyframe>            
-        </param>
-    </visual>
-</layers>
--- a/radioapp/radiowidgets/res/effects/slide_from_left.fxml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<layers>
-  <visual>
-    <param name="scale_x" type="anim"><keyframe
-          at="0">0.0</keyframe><duration>0.3</duration><keyframe
-          at="1.0">1.0</keyframe><style>outback</style></param>
-    <param name="scale_origin_x" ref="visual.width">0.0</param>
-    <param name="scale_origin_y" ref="visual.height">0.0</param>
-  </visual>
-</layers>
--- a/radioapp/radiowidgets/res/effects/slide_from_right.fxml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-<layers>
-  <visual>
-    <param name="scale_x" type="anim">
-        <duration>0.3</duration>
-        <style>outback</style>
-        <keyframe at="0.0">0.0</keyframe>
-        <keyframe at="0.5">0.5</keyframe>
-        <keyframe at="1.0">1.0</keyframe>
-    </param>
-    <param name="scale_origin_x" ref="visual.right">1</param>
-  </visual>
-</layers>
--- a/radioapp/radiowidgets/res/effects/slide_to_left.fxml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<layers>
-  <visual>
-    <param name="scale_x" type="anim"><keyframe
-          at="0">1.0</keyframe><duration>0.3</duration><keyframe
-          at="1.0">0.0</keyframe><style>outquad</style></param>
-    <param name="scale_origin_x" ref="visual.width">0.0</param>
-    <param name="scale_origin_y" ref="visual.height">0.0</param>
-  </visual>
-</layers>
--- a/radioapp/radiowidgets/res/effects/slide_to_right.fxml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-<layers>
-  <visual>
-    <param name="scale_x" type="anim">
-        <duration>0.3</duration>
-        <style>outquad</style>
-        <keyframe at="0.0">1.0</keyframe>
-        <keyframe at="0.5">0.5</keyframe>
-        <keyframe at="1.0">0.0</keyframe>
-    </param>
-    <param name="scale_origin_x" ref="visual.right">1</param>
-  </visual>
-</layers>
--- a/radioapp/radiowidgets/res/fmradioui.qrc	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<RCC>
-    <qresource>
-        <file alias="layout/mainview.docml">layout/mainview.docml.bin</file>
-        <file alias="layout/stationsview.docml">layout/stationsview.docml.bin</file>
-        <file alias="layout/historyview.docml">layout/historyview.docml.bin</file>
-        <file>layout/radiocarouselitem.css</file>
-        <file>layout/radiocarouselitem.widgetml</file>
-    </qresource>
-
-    <qresource>
-        <file>effects/fade_out.fxml</file>
-        <file>effects/fade_in.fxml</file>
-        <file>effects/slide_to_left.fxml</file>
-        <file>effects/slide_from_left.fxml</file>
-        <file>effects/slide_to_right.fxml</file>
-        <file>effects/slide_from_right.fxml</file>
-    </qresource>
-    
-    <qresource>
-        <file>images/pri_small_star.svg</file>
-        <file>images/pri_small_star_inactive.svg</file>
-        <file>images/qtg_fr_lcd.svg</file>
-        <file>images/qtg_fr_lcd_overlay.svg</file>
-        <file>images/qtg_fr_tuner.svg</file>
-    </qresource>
-    
-</RCC>
--- a/radioapp/radiowidgets/res/images/pri_small_star.svg	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In  -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
-	<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
-]>
-<svg version="1.1"
-	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
-	 x="0px" y="0px" width="30px" height="30px" viewBox="0 0 30 30" enable-background="new 0 0 30 30" xml:space="preserve">
-<defs>
-</defs>
-<polygon opacity="0.6" points="15,0.734 19.635,10.126 30,11.632 22.5,18.943 24.27,29.266 15,24.393 5.73,29.266 7.5,18.943 
-	0,11.632 10.365,10.126 "/>
-<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="15" y1="2.9937" x2="15" y2="27.438">
-	<stop  offset="0" style="stop-color:#FFE896"/>
-	<stop  offset="1" style="stop-color:#FFB701"/>
-</linearGradient>
-<polygon fill="url(#SVGID_1_)" points="15,23.262 7.058,27.438 8.574,18.594 2.149,12.331 11.029,11.04 15,2.994 18.971,11.04 
-	27.852,12.331 21.426,18.594 22.941,27.438 "/>
-<polygon fill="#FFFFFF" fill-opacity="0.4" points="11.693,11.954 15,5.253 18.307,11.954 26.959,13.201 27.852,12.331 
-	18.971,11.04 15,2.994 11.029,11.04 2.149,12.331 3.042,13.201 "/>
-<rect fill="none" width="30" height="30"/>
-</svg>
--- a/radioapp/radiowidgets/res/images/pri_small_star_inactive.svg	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In  -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
-	<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
-]>
-<svg version="1.1"
-	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
-	 x="0px" y="0px" width="30px" height="30px" viewBox="0 0 30 30" enable-background="new 0 0 30 30" xml:space="preserve">
-<defs>
-</defs>
-<path opacity="0.6" d="M15,24.393l-9.27,4.873L7.5,18.943L0,11.632l10.365-1.506L15,0.734l4.635,9.392L30,11.632l-7.5,7.311
-	l1.77,10.322L15,24.393z M19.621,22.867l-0.881-5.146l3.738-3.645l-5.168-0.751L15,8.643l-2.311,4.683l-5.168,0.751l3.739,3.645
-	l-0.882,5.146L15,20.438L19.621,22.867z"/>
-<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="15" y1="2.9937" x2="15" y2="27.438">
-	<stop  offset="0" style="stop-color:#F0F0F0"/>
-	<stop  offset="1" style="stop-color:#C8C8C8"/>
-</linearGradient>
-<path fill="url(#SVGID_1_)" d="M27.852,12.331l-8.881-1.291L15,2.994l-3.971,8.046l-8.88,1.291l6.425,6.263l-1.516,8.844L15,23.262
-	l7.941,4.176l-1.516-8.844L27.852,12.331z M15,21.567l-5.95,3.128l1.136-6.625l-4.814-4.692l6.653-0.967L15,6.383l2.975,6.028
-	l6.653,0.967l-4.813,4.692l1.135,6.625L15,21.567z"/>
-<rect fill="none" width="30" height="30"/>
-</svg>
--- a/radioapp/radiowidgets/res/images/qtg_fr_lcd.svg	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,33 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In  -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
-	<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
-]>
-<svg version="1.1"
-	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
-	 x="0px" y="0px" width="338px" height="224px" viewBox="0 0 338 224" enable-background="new 0 0 338 224" xml:space="preserve">
-<defs>
-</defs>
-<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="169.0005" y1="223" x2="169.0005" y2="1.0005">
-	<stop  offset="0" style="stop-color:#365E8F"/>
-	<stop  offset="0.3758" style="stop-color:#20344E"/>
-	<stop  offset="1" style="stop-color:#09090D"/>
-</linearGradient>
-<path fill="url(#SVGID_1_)" d="M6,223c-2.757,0-5-2.243-5-5V6c0-2.757,2.243-5,5-5h326c2.757,0,5,2.243,5,5v212c0,2.757-2.243,5-5,5
-	H6z"/>
-<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="0" y1="112" x2="338" y2="112">
-	<stop  offset="0" style="stop-color:#09090D;stop-opacity:0.5"/>
-	<stop  offset="0.4" style="stop-color:#09090D;stop-opacity:0"/>
-	<stop  offset="0.6" style="stop-color:#09090D;stop-opacity:0"/>
-	<stop  offset="1" style="stop-color:#09090D;stop-opacity:0.5"/>
-</linearGradient>
-<path fill="url(#SVGID_2_)" d="M6,224c-3.309,0-6-2.691-6-6V6c0-3.309,2.691-6,6-6h326c3.309,0,6,2.691,6,6v212c0,3.309-2.691,6-6,6
-	H6z"/>
-<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="2.0254" y1="222" x2="335.9746" y2="222">
-	<stop  offset="0" style="stop-color:#376294"/>
-	<stop  offset="0.5" style="stop-color:#BAE6FF"/>
-	<stop  offset="1" style="stop-color:#376294"/>
-</linearGradient>
-<path fill="url(#SVGID_3_)" fill-opacity="0.8" d="M335.975,221H2.025c0.914,1.207,2.348,2,3.975,2h326
-	C333.627,223,335.061,222.207,335.975,221z"/>
-</svg>
--- a/radioapp/radiowidgets/res/images/qtg_fr_lcd_overlay.svg	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In  -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
-	<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
-]>
-<svg version="1.1"
-	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
-	 x="0px" y="0px" width="338px" height="224px" viewBox="0 0 338 224" enable-background="new 0 0 338 224" xml:space="preserve">
-<defs>
-</defs>
-<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="169" y1="103" x2="169" y2="0">
-	<stop  offset="0" style="stop-color:#3E6DA3"/>
-	<stop  offset="1" style="stop-color:#E0EFFF"/>
-</linearGradient>
-<path fill="url(#SVGID_1_)" fill-opacity="0.4" d="M332,0H6C2.691,0,0,2.691,0,6v83.972C48.129,98.19,106.315,103,169,103
-	s120.871-4.81,169-13.028V6C338,2.691,335.309,0,332,0z"/>
-<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="0" y1="112" x2="338" y2="112">
-	<stop  offset="0" style="stop-color:#00000D;stop-opacity:0.7"/>
-	<stop  offset="0.25" style="stop-color:#00000D;stop-opacity:0"/>
-	<stop  offset="0.75" style="stop-color:#00000D;stop-opacity:0"/>
-	<stop  offset="1" style="stop-color:#00000D;stop-opacity:0.7"/>
-</linearGradient>
-<path fill="url(#SVGID_2_)" d="M6,224c-3.309,0-6-2.691-6-6V6c0-3.309,2.691-6,6-6h326c3.309,0,6,2.691,6,6v212c0,3.309-2.691,6-6,6
-	H6z"/>
-<path fill="#FFFFFF" fill-opacity="0.2" d="M332,0H6C2.7,0,0,2.7,0,6v212c0,3.3,2.7,6,6,6h326c3.3,0,6-2.7,6-6V6
-	C338,2.7,335.3,0,332,0z M337,218c0,2.757-2.243,5-5,5H6c-2.757,0-5-2.243-5-5V6c0-2.757,2.243-5,5-5h326c2.757,0,5,2.243,5,5V218z"
-	/>
-</svg>
--- a/radioapp/radiowidgets/res/images/qtg_fr_tuner.svg	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,35 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 14.0.0, SVG Export Plug-In  -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
-	<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
-]>
-<svg version="1.1"
-	 xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
-	 x="0px" y="0px" width="338px" height="60px" viewBox="0 0 338 60" enable-background="new 0 0 338 60" xml:space="preserve">
-<defs>
-</defs>
-<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="169.0005" y1="60" x2="169.0005" y2="4.882813e-004">
-	<stop  offset="0" style="stop-color:#2A4A70"/>
-	<stop  offset="1" style="stop-color:#09090D"/>
-</linearGradient>
-<rect fill="url(#SVGID_1_)" width="338" height="60"/>
-<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="1" y1="58" x2="337" y2="58">
-	<stop  offset="0" style="stop-color:#376294"/>
-	<stop  offset="0.5" style="stop-color:#BAE6FF"/>
-	<stop  offset="1" style="stop-color:#376294"/>
-</linearGradient>
-<rect x="1" y="57" fill="url(#SVGID_2_)" fill-opacity="0.8" width="336" height="2"/>
-<linearGradient id="SVGID_3_" gradientUnits="userSpaceOnUse" x1="1" y1="30" x2="337" y2="30">
-	<stop  offset="0" style="stop-color:#00000D;stop-opacity:0.9"/>
-	<stop  offset="0.3" style="stop-color:#00000D;stop-opacity:0"/>
-	<stop  offset="0.7" style="stop-color:#00000D;stop-opacity:0"/>
-	<stop  offset="1" style="stop-color:#00000D;stop-opacity:0.9"/>
-</linearGradient>
-<rect x="1" y="1" fill="url(#SVGID_3_)" width="336" height="58"/>
-<linearGradient id="SVGID_4_" gradientUnits="userSpaceOnUse" x1="169" y1="21" x2="169" y2="3">
-	<stop  offset="0" style="stop-color:#203956"/>
-	<stop  offset="1" style="stop-color:#CCE4FF"/>
-</linearGradient>
-<rect x="3" y="3" fill="url(#SVGID_4_)" fill-opacity="0.5" width="332" height="18"/>
-<path opacity="0.4" fill="#FFFFFF" d="M337,1v58H1V1H337 M338,0H0v60h338V0L338,0z"/>
-</svg>
--- a/radioapp/radiowidgets/res/layout/historyview.docml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument context="RadioHistoryView" version="1.0">
-    <object name="hv:clear_list_action" type="HbAction">
-        <string locid="txt_rad_opt_clear_list" name="text"/>
-    </object>
-    <object name="hv:add_songs_action" type="HbAction">
-        <string value="DEBUG: Add Songs" name="text"/>
-    </object>
-    <object name="loudspeaker_action" type="HbAction">
-        <string locid="txt_common_opt_activate_loudspeaker" name="text"/>
-    </object>
-    <object name="exit_action" type="HbAction">
-        <string locid="txt_common_opt_exit" name="text"/>
-    </object>
-    <object name="hv:all_songs_button" type="HbAction">
-        <bool name="checkable" value="TRUE"/>
-        <icon iconName="qtg_mono_radio_stations" name="icon"/>
-        <string locid="txt_rad_button_recently_played_songs" name="text"/>
-    </object>
-    <object name="hv:tagged_songs_button" type="HbAction">
-        <bool name="checkable" value="TRUE"/>
-        <icon iconName="qtg_mono_favourites" name="icon"/>
-        <string locid="txt_rad_button_tagged_songs" name="text"/>
-    </object>
-    <object name="hv:toggle_tag_action" type="HbAction">
-        <string locid="txt_rad_menu_tag_song" name="text"/>
-    </object>
-    <object name="hv:ovi_store_action" type="HbAction">
-        <string locid="txt_rad_menu_search_from_music_store" name="text"/>
-    </object>
-    <object name="hv:other_store_action" type="HbAction">
-        <string value="Search from Amazon" name="text"/>
-    </object>
-
-    <widget name="view" type="HbView">
-        <icon name="nonTaggedIcon" iconName="qtg_mono_tag" />
-        <icon name="taggedIcon" iconName="qtg_small_tag_inactive" />
-        <widget name="hv:toolbar" role="HbView:toolBar" type="HbToolBar">
-            <enums name="orientation" value="Horizontal"/>
-            <ref object="hv:all_songs_button" role="HbToolBar:addAction"/>
-            <ref object="hv:tagged_songs_button" role="HbToolBar:addAction"/>
-        </widget>
-        <widget name="content" role="HbView:widget" type="HbWidget">
-            <widget name="hv:heading_banner" type="HbGroupBox">
-                <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-                <sizehint height="expr(var(hb-param-text-height-secondary)+2*var(hb-param-margin-gene-middle-vertical))" type="PREFERRED"/>
-                <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
-                <string name="heading" locid="txt_rad_subhead_play_history" />
-            </widget>
-            <widget name="hv:stacked_widget" type="HbWidget" />
-            <layout type="anchor">
-                <anchoritem dst="hv:heading_banner" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
-                <anchoritem dst="hv:heading_banner" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="hv:heading_banner" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="hv:stacked_widget" dstEdge="TOP" spacing="0un" src="hv:heading_banner" srcEdge="BOTTOM"/>
-                <anchoritem dst="hv:stacked_widget" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
-                <anchoritem dst="hv:stacked_widget" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="hv:stacked_widget" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
-            </layout>
-        </widget>
-        <string locid="txt_rad_title_fm_radio" name="title"/>
-    </widget>
-    <widget name="hv:context_menu" type="HbMenu">
-        <ref object="hv:toggle_tag_action" role="HbMenu:addAction"/>
-        <ref object="hv:ovi_store_action" role="HbMenu:addAction"/>
-        <ref object="hv:other_store_action" role="HbMenu:addAction"/>
-    </widget>
-    
-    <!-- Section to do lazy initialization of the view -->
-    <section name="lazy_load">
-        <widget name="view">
-            <widget name="hv:menu" role="HbView:menu" type="HbMenu">
-                <ref object="hv:clear_list_action" role="HbMenu:addAction"/>
-                <ref object="hv:add_songs_action" role="HbMenu:addAction"/>
-                <ref object="loudspeaker_action" role="HbMenu:addAction"/>
-                <ref object="exit_action" role="HbMenu:addAction"/>
-            </widget>
-        </widget>
-        
-        <widget name="hv:stacked_widget">
-            <widget name="hv:history_list" type="HbListView">
-                <sizehint height="320" type="PREFERRED" width="240"/>
-            </widget>
-            <widget name="hv:empty_container" type="HbWidget">
-                <bool name="visible" value="FALSE"/>
-                <widget name="hv:empty_title" type="HbLabel">
-                    <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
-                    <string locid="txt_rad_info_play_history_is_empty" name="plainText"/>
-                    <fontspec name="fontSpec" role="Title" textheight="33.5"/>
-                </widget>
-                <widget name="hv:empty_text" type="HbLabel">
-                    <enums name="textWrapping" value="TextWordWrap"/>
-                    <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
-                    <sizehint height="320" type="PREFERRED" width="240"/>
-                    <string locid="txt_rad_info_song_information_is_collected_automat" name="plainText"/>
-                    <fontspec name="fontSpec" role="Title" textheight="33.5"/>
-                </widget>
-                <layout orientation="Vertical" spacing="var(hb-param-margin-gene-middle-vertical)" type="linear">
-                    <contentsmargins bottom="var(hb-param-margin-gene-bottom)" left="var(hb-param-margin-gene-left)" 
-                                     right="var(hb-param-margin-gene-right)" top="var(hb-param-margin-gene-top)"/>
-                    <stretchitem stretchfactor="2"/>
-                    <linearitem itemname="hv:empty_title"/>
-                    <stretchitem stretchfactor="1"/>
-                    <linearitem itemname="hv:empty_text"/>
-                    <stretchitem stretchfactor="2"/>
-                </layout>
-            </widget>
-            <layout type="stacked">
-                <stackitem itemname="hv:history_list"/>
-                <stackitem itemname="hv:empty_container"/>
-            </layout>
-        </widget>
-    </section>
-    
-    <section name="hv:show_list">
-        <widget name="hv:history_list">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="hv:empty_container">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <object name="hv:clear_list_action">
-            <bool name="visible" value="TRUE"/>
-        </object>
-    </section>
-    <section name="hv:hide_list">
-        <widget name="hv:history_list">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="hv:empty_container">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <object name="hv:clear_list_action">
-            <bool name="visible" value="FALSE"/>
-        </object>
-    </section>
-    <section name="hv:history_mode">
-        <object name="hv:all_songs_button">
-            <bool name="checked" value="TRUE"/>
-        </object>
-        <object name="hv:tagged_songs_button">
-            <bool name="checked" value="FALSE"/>
-        </object>
-        <widget name="hv:empty_text">
-            <string locid="txt_rad_info_song_information_is_collected_automat" name="plainText"/>
-        </widget>
-        <widget name="hv:heading_banner">
-            <string name="heading" locid="txt_rad_subhead_play_history" />
-        </widget>
-    </section>
-    <section name="hv:tagged_mode">
-        <object name="hv:all_songs_button">
-            <bool name="checked" value="FALSE"/>
-        </object>
-        <object name="hv:tagged_songs_button">
-            <bool name="checked" value="TRUE"/>
-        </object>
-        <widget name="hv:empty_text">
-            <string locid="txt_rad_info_you_can_add_song_to_the_tagged_songs" name="plainText"/>
-        </widget>
-        <widget name="hv:heading_banner">
-            <string name="heading" locid="txt_rad_button_tagged_songs" />
-        </widget>
-    </section>
-    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
-        <uistate name="Common ui state" sections="#common"/>
-        <dummydata objectName="hv:history_list" section="#common" value="app_list_template5"/>
-    </metadata>
-</hbdocument>
--- a/radioapp/radiowidgets/res/layout/mainview.docml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,219 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument context="RadioMainView" version="0.9">
-    <widget name="view" type="HbView">
-        <widget name="mv:container" role="HbView:widget" type="HbWidget">
-
-            <!-- Information area that holds the station carousel -->
-            <widget name="mv:info_area" type="HbWidget">
-                <widget name="mv:carousel_background" type="HbLabel">
-                    <icon name="icon" iconName="qtg_fr_lcd" />
-                </widget>
-                <widget name="mv:info_text" type="HbLabel" >
-                    <contentsmargins top="var(hb-param-margin-gene-top)" bottom="var(hb-param-margin-gene-bottom)"
-                                     left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" />
-                    <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
-                    <string name="plainText" locid="txt_rad_info_fm_radio" />
-                    <fontspec name="fontSpec" role="Title" textheight="8un" />
-                </widget>
-                <layout type="stacked">
-                    <stackitem itemname="mv:carousel_background"/>
-                    <stackitem itemname="mv:info_text"/>
-                </layout>
-            </widget>
-
-            <!-- Frequency area that holds the frequency strip -->
-            <widget name="mv:frequency_area" type="HbWidget">
-                <widget name="mv:frequency_background" type="HbLabel">
-                    <icon name="icon" iconName="qtg_fr_lcd"/>
-                </widget>
-                <layout type="stacked">
-                    <stackitem itemname="mv:frequency_background"/>
-                </layout>
-            </widget>
-
-            <!-- Control area that holds the three buttons -->
-            <widget name="mv:control_area" type="HbWidget" >
-                <widget name="mv:stations_button" type="HbPushButton" />
-                <widget name="mv:favorite_button" type="HbPushButton" />
-                <widget name="mv:loudspeaker_button" type="HbPushButton" />
-                <layout orientation="Vertical" spacing="var(hb-param-margin-gene-middle-vertical)" type="linear">
-                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un" />
-                    <stretchitem stretchfactor="1"/>
-                    <linearitem itemname="mv:stations_button"/>
-                    <stretchitem stretchfactor="1"/>
-                    <linearitem itemname="mv:favorite_button"/>
-                    <stretchitem stretchfactor="1"/>
-                    <linearitem itemname="mv:loudspeaker_button"/>
-                    <stretchitem stretchfactor="1"/>
-                </layout>
-            </widget>
-
-        </widget>
-        <string name="title" locid="txt_rad_title_fm_radio"/>
-    </widget>
-
-    <!-- Section to do lazy initialization of the view -->
-    <section name="lazy_load">
-        <object name="mv:historyview_action" type="HbAction">
-            <string name="text" locid="txt_rad_opt_play_history" />
-        </object>
-        <object name="mv:scan_action" type="HbAction">
-            <string name="text" locid="txt_rad_opt_search_all_stations" />
-        </object>
-        <object name="exit_action" type="HbAction">
-            <string name="text" locid="txt_common_opt_exit" />
-        </object>
-        <widget name="view">
-            <widget name="menu" role="HbView:menu" type="HbMenu">
-                <ref object="mv:historyview_action" role="HbMenu:addAction"/>
-                <ref object="mv:scan_action" role="HbMenu:addAction"/>
-                <ref object="exit_action" role="HbMenu:addAction"/>
-            </widget>
-        </widget>
-        <widget name="mv:info_area">
-            <widget name="mv:carousel_overlay" type="HbLabel">
-                <icon name="icon" iconName="qtg_fr_lcd_overlay" />
-            </widget>
-            <widget name="mv:station_carousel" plugin="fmradiowidgetsplugin" type="RadioStationCarousel">
-                <icon name="favoriteIcon" iconName="qtg_small_favorite" />
-                <icon name="nonFavoriteIcon" iconName=":/images/pri_small_star_inactive.svg" />
-                <integer name="autoScrollTime" value="1000"/>
-            </widget>
-            <widget name="mv:info_text">
-                <bool name="visible" value="FALSE" />
-                <string name="plainText" locid="" />
-                <enums name="alignment" value="AlignBottom|AlignHCenter"/>
-                <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)" />
-            </widget>
-            <layout type="stacked">
-                <stackitem itemname="mv:carousel_background"/>
-                <stackitem itemname="mv:carousel_overlay"/>
-                <stackitem itemname="mv:station_carousel"/>
-                <stackitem itemname="mv:info_text"/>
-            </layout>
-        </widget>
-        <widget name="mv:frequency_area">
-            <sizehint height="10un" type="FIXED"/>
-            <widget name="mv:frequency_strip" plugin="fmradiowidgetsplugin" type="RadioFrequencyStrip">
-                <contentsmargins left="var(hb-param-margin-gene-middle-horizontal)" right="var(hb-param-margin-gene-middle-horizontal)" />
-                <widget name="mv:prev_button" type="HbPushButton">
-                    <icon name="icon" iconName="qtg_mono_previous" />
-                </widget>
-                <widget name="mv:next_button" type="HbPushButton">
-                    <icon name="icon" iconName="qtg_mono_next" />
-                </widget>
-                <integer name="autoScrollTime" value="1000"/>
-                <integer name="itemHeight" value="9"/>
-            </widget>
-            <layout type="stacked">
-                <stackitem itemname="mv:frequency_background"/>
-                <stackitem itemname="mv:frequency_strip"/>
-            </layout>
-        </widget>
-
-        <widget name="mv:stations_button">
-            <bool name="stretched" value="TRUE" />
-            <string name="text" locid="txt_rad_button_stations" />
-            <icon name="icon" iconName="qtg_mono_radio_stations" />
-        </widget>
-        <widget name="mv:favorite_button">
-            <bool name="stretched" value="TRUE" />
-            <string name="text" locid="txt_rad_button_add_to_favourites" />
-            <icon name="icon" iconName="qtg_mono_add_to_favourites" />
-        </widget>
-        <widget name="mv:loudspeaker_button">
-            <bool name="stretched" value="TRUE" />
-            <string name="text" locid="txt_rad_button_activate_loudspeaker" />
-            <icon name="icon" iconName="qtg_mono_speaker" />
-        </widget>
-
-    </section>
-
-    <!-- Section to orient the view in portrait mode -->
-    <section name="portrait">
-        <widget name="mv:container">
-            <layout type="anchor">
-                <anchoritem src="mv:info_area" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-middle-vertical)" />
-                <anchoritem src="mv:info_area" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-middle-horizontal)" />
-                <anchoritem src="mv:info_area" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-middle-horizontal)" />
-
-                <anchoritem src="mv:frequency_area" srcEdge="CENTERV" dst="" dstEdge="CENTERV" spacing="0" />
-                <anchoritem src="mv:frequency_area" srcEdge="TOP" dst="mv:info_area" dstEdge="BOTTOM" spacing="-var(hb-param-margin-gene-middle-vertical)" />
-                <anchoritem src="mv:frequency_area" srcEdge="BOTTOM" dst="mv:control_area" dstEdge="TOP" spacing="var(hb-param-margin-gene-middle-vertical)" />
-                <anchoritem src="mv:frequency_area" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-middle-horizontal)" />
-                <anchoritem src="mv:frequency_area" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-middle-horizontal)" />
-
-                <anchoritem src="mv:control_area" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-middle-vertical)" />
-                <anchoritem src="mv:control_area" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-middle-horizontal)" />
-                <anchoritem src="mv:control_area" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-middle-horizontal)" />
-            </layout>
-        </widget>
-    </section>
-
-    <!-- Section to orient the view in landscape mode -->
-    <section name="landscape">
-        <widget name="mv:container">
-            <layout type="anchor">
-                <anchoritem src="mv:info_area" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-middle-vertical)" />
-                <anchoritem src="mv:info_area" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-middle-horizontal)" />
-                <anchoritem src="mv:info_area" srcEdge="RIGHT" dst="" dstEdge="CENTERH" spacing="expr(var(hb-param-margin-gene-middle-horizontal)/2)" />
-
-                <anchoritem src="mv:control_area" srcEdge="TOP" dst="" dstEdge="TOP" spacing="-var(hb-param-margin-gene-middle-vertical)" />
-                <anchoritem src="mv:control_area" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-middle-horizontal)" />
-                <anchoritem src="mv:control_area" srcEdge="LEFT" dst="" dstEdge="CENTERH" spacing="-expr(var(hb-param-margin-gene-middle-horizontal)/2)" />
-
-                <anchoritem src="mv:frequency_area" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" spacing="var(hb-param-margin-gene-middle-vertical)" />
-                <anchoritem src="mv:frequency_area" srcEdge="TOP" dst="mv:info_area" dstEdge="BOTTOM" spacing="-var(hb-param-margin-gene-middle-vertical)" />
-                <anchoritem src="mv:frequency_area" srcEdge="TOP" dst="mv:control_area" dstEdge="BOTTOM" spacing="-var(hb-param-margin-gene-middle-vertical)" />
-                <anchoritem src="mv:frequency_area" srcEdge="RIGHT" dst="" dstEdge="RIGHT" spacing="var(hb-param-margin-gene-middle-vertical)" />
-                <anchoritem src="mv:frequency_area" srcEdge="LEFT" dst="" dstEdge="LEFT" spacing="-var(hb-param-margin-gene-middle-vertical)" />
-            </layout>
-        </widget>
-    </section>
-
-    <!-- Scanning layout -->
-    <section name="mv:scanning">
-        <object name="mv:historyview_action">
-            <bool name="enabled" value="FALSE"/>
-        </object>
-        <widget name="mv:stations_button">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="mv:favorite_button">
-            <string name="text" locid="txt_rad_button_cancel" />
-            <icon name="icon" iconName=" " />
-        </widget>
-        <widget name="mv:loudspeaker_button">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <object name="mv:scan_action">
-            <bool name="enabled" value="FALSE" />
-        </object>
-    </section>
-
-    <!-- Normal layout (not scanning) -->
-    <section name="mv:normal">
-        <object name="mv:historyview_action">
-            <bool name="enabled" value="TRUE"/>
-        </object>
-        <widget name="mv:stations_button">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="mv:favorite_button">
-            <string name="text" locid="txt_rad_button_add_to_favourites" />
-            <icon name="icon" iconName="qtg_mono_add_to_favourites" />
-        </widget>
-        <widget name="mv:loudspeaker_button">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <object name="mv:scan_action">
-            <bool name="enabled" value="TRUE" />
-        </object>
-    </section>
-
-    <metadata activeUIState="portrait" display="NHD portrait" unit="un">
-        <uistate name="Common ui state" sections="#common"/>
-        <uistate name="portrait" sections="#common portrait"/>
-        <uistate name="landscape" sections="#common landscape"/>
-    </metadata>
-</hbdocument>
--- a/radioapp/radiowidgets/res/layout/radiocarouselitem.css	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,169 +0,0 @@
-RadioCarouselItem
-{
-    layout: default;
-}
-
-RadioCarouselItem::star_button
-{
-    top: -var(hb-param-margin-gene-top);
-    left: -var(hb-param-margin-gene-left);
-    pref-width: var(hb-param-graphic-size-primary-medium);
-    pref-height: var(hb-param-graphic-size-primary-medium);
-    size-policy-horizontal: fixed;
-    size-policy-vertical: fixed;
-}
-
-RadioCarouselItem[landscape]::star_button
-{
-    pref-width: expr(var(hb-param-graphic-size-primary-medium)*0.9);
-    pref-height: expr(var(hb-param-graphic-size-primary-medium)*0.9);
-}
-
-RadioCarouselItem[!landscape]::star_button
-{
-    pref-width: var(hb-param-graphic-size-primary-medium);
-    pref-height: var(hb-param-graphic-size-primary-medium);
-}
-
-RadioCarouselItem::genre_label
-{
-    top: -var(hb-param-margin-gene-top);
-    left: -var(hb-param-margin-gene-middle-horizontal);
-    right: expr(var(hb-param-margin-gene-left) + var(hb-param-graphic-size-primary-medium) + var(hb-param-margin-gene-middle-horizontal));
-    pref-height: var(hb-param-graphic-size-primary-medium);
-    size-policy-vertical: fixed;
-    size-policy-horizontal: expanding;
-}
-
-RadioCarouselItem::genre_label::text
-{
-    color: lightgray; /*var(qtc_lcd_title_normal);*/
-    font-variant: secondary;
-    text-align: center center;
-}
-
-RadioCarouselItem[landscape]::genre_label::text
-{
-    text-height: expr(var(hb-param-text-height-secondary)*0.95);
-}
-
-RadioCarouselItem[!landscape]::genre_label::text
-{
-    text-height: var(hb-param-text-height-secondary);
-}
-
-RadioCarouselItem::name_label
-{
-    left: -var(hb-param-margin-gene-left);
-    right: var(hb-param-margin-gene-right);
-    size-policy-vertical: fixed;
-    size-policy-horizontal: expanding;
-}
-
-RadioCarouselItem[appearance=Full]::name_label
-{
-    pref-height: 8un;
-    top: 0un;
-}
-
-RadioCarouselItem[appearance!=Full]::name_label
-{
-    pref-height: 14un;
-    top: 1.5un;
-}
-
-RadioCarouselItem::name_label::text
-{
-    color: white; /*var(qtc_lcd_title_normal);*/
-    font-variant: primary;
-    text-wrap-mode: no-wrap;
-    text-align: center top;
-}
-
-RadioCarouselItem[appearance=Full][landscape]::name_label::text
-{
-    text-height: 7.6un;
-}
-
-RadioCarouselItem[appearance=Full][!landscape]::name_label::text
-{
-    text-height: 8un;
-}
-
-RadioCarouselItem[appearance!=Full]::name_label::text
-{
-    text-height: 14un;
-}
-
-RadioCarouselItem::rt_label
-{
-    top: -16un;
-    left: -var(hb-param-margin-gene-left);
-    right: var(hb-param-margin-gene-right);
-    bottom: var(hb-param-margin-middle-vertical);
-    size-policy-vertical: expanding;
-}
-
-RadioCarouselItem::rt_label::text
-{
-    color: var(qtc_lcd_title_normal);
-    text-line-count-min: 1;
-    font-variant: secondary;
-}
-
-RadioCarouselItem[appearance=Full]::rt_label::text
-{
-    text-line-count-max: 4;
-    text-wrap-mode: word-wrap; /*wrap-anywhere; */
-    text-align: center center;
-}
-
-RadioCarouselItem[appearance=Full][landscape]::rt_label::text
-{
-    text-height: expr(var(hb-param-text-height-secondary)*0.95);
-}
-
-RadioCarouselItem[appearance=Full][!landscape]::rt_label::text
-{
-    text-height: var(hb-param-text-height-secondary);
-}
-
-RadioCarouselItem[appearance!=Full]::rt_label::text
-{
-    text-line-count-max: 1;
-    text-wrap-mode: no-wrap;
-    text-height: 5un;
-    text-align: center center;
-}
-
-RadioCarouselItem::url_label
-{
-    left: -var(hb-param-margin-gene-left);
-    right: var(hb-param-margin-gene-right);
-    bottom: var(hb-param-margin-gene-bottom);
-}
-
-RadioCarouselItem::url_label::text
-{
-    font-variant: secondary;
-    text-align: center center;
-    color:var(qtc_lcd_link_normal);
-}
-
-RadioCarouselItem[landscape]::url_label::text
-{
-    text-height: expr(var(hb-param-text-height-secondary)*0.95);
-}
-
-RadioCarouselItem[!landscape]::url_label::text
-{
-    text-height: var(hb-param-text-height-secondary);
-}
-
-RadioCarouselItem::favorite_touch_area
-{
-    top: 0un;
-    left: 0un;
-    right: -8un;
-    bottom: -4un;
-}
--- a/radioapp/radiowidgets/res/layout/radiocarouselitem.widgetml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-<hbwidget type="RadioCarouselItem" version="0.1">
-    <layout name="default" type="mesh">
-        <meshitem src="name_label" srcEdge="TOP" dst="genre_label" dstEdge="BOTTOM" />
-
-        <meshitem src="genre_label" srcEdge="TOP" dst="" dstEdge="TOP" />
-        <meshitem src="genre_label" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
-        <meshitem src="genre_label" srcEdge="LEFT" dst="star_button" dstEdge="RIGHT" />
-        <meshitem src="star_button" srcEdge="TOP" dst="" dstEdge="TOP" />
-        <meshitem src="star_button" srcEdge="LEFT" dst="" dstEdge="LEFT" />
-
-        <meshitem src="name_label" srcEdge="LEFT" dst="" dstEdge="LEFT" />
-        <meshitem src="name_label" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
-
-        <meshitem src="rt_label" srcEdge="TOP" dst="" dstEdge="TOP" />
-        <meshitem src="rt_label" srcEdge="LEFT" dst="" dstEdge="LEFT" />
-        <meshitem src="rt_label" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
-        <meshitem src="rt_label" srcEdge="BOTTOM" dst="url_label" dstEdge="TOP" />
-
-        <meshitem src="url_label" srcEdge="LEFT" dst="" dstEdge="LEFT" />
-        <meshitem src="url_label" srcEdge="RIGHT" dst="" dstEdge="RIGHT" />
-        <meshitem src="url_label" srcEdge="BOTTOM" dst="" dstEdge="BOTTOM" />
-
-        <meshitem src="favorite_touch_area" srcEdge="TOP" dst="star_button" dstEdge="TOP" />
-        <meshitem src="favorite_touch_area" srcEdge="LEFT" dst="star_button" dstEdge="LEFT" />
-        <meshitem src="favorite_touch_area" srcEdge="RIGHT" dst="star_button" dstEdge="RIGHT" />
-        <meshitem src="favorite_touch_area" srcEdge="BOTTOM" dst="star_button" dstEdge="BOTTOM" />
-    </layout>
-</hbwidget>
--- a/radioapp/radiowidgets/res/layout/stationsview.docml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,180 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument context="RadioStationsView" version="0.9">
-    <object name="sv:scan_action" type="HbAction">
-        <string name="text" locid="txt_rad_opt_search_all_stations" />
-    </object>
-    <object name="sv:clear_list_action" type="HbAction">
-        <string name="text" locid="txt_rad_opt_clear_list" />
-    </object>
-    <object name="loudspeaker_action" type="HbAction">
-        <string name="text" locid="txt_common_opt_activate_loudspeaker" />
-    </object>
-    <object name="exit_action" type="HbAction">
-        <string name="text" locid="txt_common_opt_exit" />
-    </object>
-    <object name="sv:play_action" type="HbAction">
-        <string name="text" locid="txt_common_menu_play_music" />
-    </object>
-    <object name="sv:rename_action" type="HbAction">
-        <string name="text" locid="txt_common_menu_rename_item" />
-    </object>
-    <object name="sv:toggle_favorite_action" type="HbAction">
-        <string name="text" locid="txt_rad_menu_add_to_favourites" />
-    </object>
-    <object name="sv:delete_action" type="HbAction">
-        <string name="text" locid="txt_common_menu_delete" />
-    </object>
-    <object name="sv:local_stations_button" type="HbAction">
-        <bool name="checkable" value="TRUE"/>
-        <icon iconName="qtg_mono_radio_stations" name="icon"/>
-        <string name="text" locid="txt_rad_button_local_stations" />
-    </object>
-    <object name="sv:favorite_stations_button" type="HbAction">
-        <bool name="checkable" value="TRUE"/>
-        <icon iconName="qtg_mono_favourites" name="icon"/>
-        <string name="text" locid="txt_rad_button_favourites" />
-    </object>
-    <widget name="view" type="HbView">
-        <icon name="nowPlayingIcon" iconName="qtg_mono_play" />
-        <icon name="favoriteIcon" iconName="qtg_small_favorite" />
-        <widget name="mMenu" role="HbView:menu" type="HbMenu">
-            <ref object="sv:scan_action" role="HbMenu:addAction"/>
-            <ref object="sv:clear_list_action" role="HbMenu:addAction"/>
-            <ref object="loudspeaker_action" role="HbMenu:addAction"/>
-            <ref object="exit_action" role="HbMenu:addAction"/>
-        </widget>
-        <widget name="sv:toolbar" role="HbView:toolBar" type="HbToolBar">
-            <enums name="orientation" value="Horizontal"/>
-            <ref object="sv:local_stations_button" role="HbToolBar:addAction"/>
-            <ref object="sv:favorite_stations_button" role="HbToolBar:addAction"/>
-        </widget>
-        <widget name="content" role="HbView:widget" type="HbWidget">
-            <widget name="sv:heading_banner" type="HbGroupBox">
-                <sizepolicy horizontalPolicy="Expanding" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-                <sizehint height="expr(var(hb-param-text-height-secondary)+2*var(hb-param-margin-gene-middle-vertical))" type="PREFERRED"/>
-                <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
-                <string name="heading" locid="txt_rad_subhead_all_stations" />
-            </widget>
-            <widget name="sv:stacked_widget" type="HbWidget">
-                <widget name="sv:scan_button" type="HbPushButton">
-                    <bool name="visible" value="FALSE"/>
-                </widget>
-                <widget name="sv:empty_container" type="HbWidget">
-                    <bool name="visible" value="FALSE"/>
-                    <widget name="sv:empty_title" type="HbLabel">
-                        <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
-                        <string locid="txt_rad_info_no_stations" name="plainText"/>
-                        <fontspec name="fontSpec" role="Title" textheight="33.5"/>
-                    </widget>
-                    <widget name="sv:empty_text" type="HbLabel">
-                        <enums name="textWrapping" value="TextWordWrap"/>
-                        <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
-                        <sizehint height="320" type="PREFERRED" width="240"/>
-                        <string locid="txt_rad_info_no_stations_search_stations_automat" name="plainText"/>
-                        <fontspec name="fontSpec" role="Title" textheight="33.5"/>
-                    </widget>
-                    <layout orientation="Vertical" spacing="var(hb-param-margin-gene-middle-vertical)" type="linear">
-                        <contentsmargins bottom="var(hb-param-margin-gene-bottom)" left="var(hb-param-margin-gene-left)" right="var(hb-param-margin-gene-right)" top="var(hb-param-margin-gene-top)"/>
-                        <stretchitem stretchfactor="2"/>
-                        <linearitem itemname="sv:empty_title"/>
-                        <stretchitem stretchfactor="1"/>
-                        <linearitem itemname="sv:empty_text"/>
-                        <stretchitem stretchfactor="2"/>
-                    </layout>
-                </widget>
-                <widget name="sv:stations_list" type="HbListView">
-                    <sizehint height="320" type="PREFERRED" width="240"/>
-                    <bool name="visible" value="TRUE"/>
-                </widget>
-                <layout type="stacked">
-                    <stackitem itemname="sv:scan_button"/>
-                    <stackitem itemname="sv:empty_container"/>
-                    <stackitem itemname="sv:stations_list"/>
-                </layout>
-            </widget>
-            <layout type="anchor">
-                <anchoritem dst="sv:heading_banner" dstEdge="TOP" spacing="0un" src="" srcEdge="TOP"/>
-                <anchoritem dst="sv:heading_banner" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="sv:heading_banner" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="sv:stacked_widget" dstEdge="TOP" spacing="0un" src="sv:heading_banner" srcEdge="BOTTOM"/>
-                <anchoritem dst="sv:stacked_widget" dstEdge="LEFT" spacing="0un" src="" srcEdge="LEFT"/>
-                <anchoritem dst="sv:stacked_widget" dstEdge="RIGHT" spacing="0un" src="" srcEdge="RIGHT"/>
-                <anchoritem dst="sv:stacked_widget" dstEdge="BOTTOM" spacing="0un" src="" srcEdge="BOTTOM"/>
-            </layout>
-        </widget>
-        <string name="title" locid="txt_rad_title_fm_radio"/>
-    </widget>
-
-    <widget name="sv:context_menu" type="HbMenu">
-        <ref object="sv:play_action" role="HbMenu:addAction" />
-        <ref object="sv:rename_action" role="HbMenu:addAction" />
-        <ref object="sv:toggle_favorite_action" role="HbMenu:addAction" />
-        <ref object="sv:delete_action" role="HbMenu:addAction" />
-    </widget>
-
-    <section name="show_scan_text">
-        <widget name="sv:stations_list">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="sv:empty_container">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="sv:scan_button">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-    </section>
-    <section name="hide_scan_text">
-        <widget name="sv:stations_list">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="sv:empty_container">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="sv:scan_button">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-    </section>
-    <section name="show_all_stations">
-        <object name="sv:local_stations_button">
-            <bool name="checked" value="TRUE"/>
-        </object>
-        <object name="sv:favorite_stations_button">
-            <bool name="checked" value="FALSE"/>
-        </object>
-        <widget name="sv:heading_banner">
-            <string name="heading" locid="txt_rad_subhead_all_stations" />
-        </widget>
-        <widget name="sv:scan_button">
-            <bool name="visible" value="TRUE"/>
-        </widget>
-        <widget name="sv:empty_title">
-            <string name="plainText" locid="txt_rad_info_no_stations" />
-        </widget>
-        <widget name="sv:empty_text">
-            <string name="plainText" locid="txt_rad_info_no_stations_search_stations_automat" />
-        </widget>
-    </section>
-    <section name="show_favorites">
-        <object name="sv:local_stations_button">
-            <bool name="checked" value="FALSE"/>
-        </object>
-        <object name="sv:favorite_stations_button">
-            <bool name="checked" value="TRUE"/>
-        </object>
-        <widget name="sv:heading_banner">
-            <string name="heading" locid="txt_rad_subhead_favorite_stations" />
-        </widget>
-        <widget name="sv:scan_button">
-            <bool name="visible" value="FALSE"/>
-        </widget>
-        <widget name="sv:empty_title">
-            <string name="plainText" locid="txt_rad_info_no_favourite_stations" />
-        </widget>
-        <widget name="sv:empty_text">
-            <string name="plainText" locid="txt_rad_info_no_favourites_add_favourites_to_see" />
-        </widget>
-    </section>
-    <metadata activeUIState="Common ui state" display="NHD portrait" unit="un">
-        <uistate name="Common ui state" sections="#common"/>
-    </metadata>
-</hbdocument>
--- a/radioapp/radiowidgets/src/radiocarouselanimator.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,217 +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:
-*
-*/
-
-// System includes
-#include <QTimer>
-#include <QTimeLine>
-#include <HbLabel>
-
-// User includes
-#include "radiocarouselanimator.h"
-#include "radiostationcarousel.h"
-#include "radiocarouselitem.h"
-#include "radiostation.h"
-#include "radiostationmodel.h"
-#include "radiologger.h"
-
-// Constants
-const int FREQUENCY_SCROLL_DIVIDER = 100000;
-const int NUMBER_SCROLL_TIMELINE_DURATION = 1000;
-const int FLASH_TIMER_INTERVAL = 400;
-const qreal FLASHING_ITEM_DIM_OPACITY = 0.3;
-const qreal FLASHING_ITEM_NORMAL_OPACITY = 1.0;
-
-/*!
- *
- */
-RadioCarouselAnimator::RadioCarouselAnimator( RadioStationCarousel& carousel ) :
-    mCarousel( carousel ),
-    mAnimationTimeLine( new QTimeLine( NUMBER_SCROLL_TIMELINE_DURATION, this ) ),
-    mTimer( new QTimer( this ) ),
-    mCanceled( false ),
-    mMode( NoAnimation ),
-    mStationIsFavorite( false ),
-    mFlashingToggle( false )
-{
-    mAnimationTimeLine->setCurveShape( QTimeLine::EaseInCurve );
-    Radio::connect( mAnimationTimeLine, SIGNAL(finished()),
-                    this,               SLOT(finalizeNumberScroll()) );
-    Radio::connect( mAnimationTimeLine, SIGNAL(frameChanged(int)),
-                    this,               SLOT(updateNumberScroll(int)) );
-
-    mTimer->setInterval( FLASH_TIMER_INTERVAL );
-    mTimer->setSingleShot( false );
-    Radio::connect( mTimer,     SIGNAL(timeout()),
-                    this,       SLOT(handleTimeout()) );
-}
-
-/*!
- *
- */
-RadioCarouselAnimator::~RadioCarouselAnimator()
-{
-    stopAll();
-}
-
-/*!
- *
- */
-void RadioCarouselAnimator::startNumberScroll( const uint startFrequency, const uint stopFrequency )
-{
-    addMode( ScrollingNumbers );
-
-    //TODO: Take italy case into account
-    mAnimationTimeLine->setDuration( NUMBER_SCROLL_TIMELINE_DURATION );
-    mAnimationTimeLine->setFrameRange( startFrequency / FREQUENCY_SCROLL_DIVIDER,
-                                       stopFrequency / FREQUENCY_SCROLL_DIVIDER );
-    mAnimationTimeLine->start();
-
-    mCarousel.scrollContentsTo( QPointF( -mCarousel.mMaxScrollPos, 0 ), mCarousel.mAutoScrollTime );
-}
-
-/*!
- *
- */
-void RadioCarouselAnimator::startFlashingIcon()
-{
-    const uint frequency = mCarousel.mItems[RadioStationCarousel::CenterItem]->frequency();
-    RadioStation station;
-    mCarousel.mModel->findFrequency( frequency, station );
-    mStationIsFavorite = station.isFavorite();
-
-    mCarousel.mItems[RadioStationCarousel::CenterItem]->setIconOpacity( FLASHING_ITEM_DIM_OPACITY );
-
-    addMode( FlashingIcon );
-}
-
-/*!
- *
- */
-void RadioCarouselAnimator::stopFlashingIcon()
-{
-    mCarousel.mItems[RadioStationCarousel::CenterItem]->setIconOpacity( FLASHING_ITEM_NORMAL_OPACITY );
-    removeMode( FlashingIcon );
-}
-
-/*!
- *
- */
-void RadioCarouselAnimator::startFlashingText()
-{
-    mCarousel.mInfoText->setOpacity( FLASHING_ITEM_DIM_OPACITY );
-    addMode( FlashingText );
-}
-
-/*!
- *
- */
-void RadioCarouselAnimator::stopFlashingText()
-{
-    mCarousel.mInfoText->setOpacity( FLASHING_ITEM_NORMAL_OPACITY );
-    removeMode( FlashingText );
-}
-
-/*!
- *
- */
-void RadioCarouselAnimator::stopAll()
-{
-    mCanceled = true;
-    mAnimationTimeLine->stop();
-    mTimer->stop();
-
-    stopFlashingText();
-    stopFlashingIcon();
-
-    mMode = NoAnimation;
-    deleteLater();
-}
-
-/*!
- * Private slot
- *
- */
-void RadioCarouselAnimator::handleTimeout()
-{
-    mFlashingToggle = !mFlashingToggle;
-    if ( mMode.testFlag( IconItem ) ) {
-        if ( mFlashingToggle ) {
-            mCarousel.mItems[RadioStationCarousel::CenterItem]->setIconOpacity( FLASHING_ITEM_NORMAL_OPACITY );
-        } else {
-            mCarousel.mItems[RadioStationCarousel::CenterItem]->setIconOpacity( FLASHING_ITEM_DIM_OPACITY );
-        }
-    }
-
-    if ( mMode.testFlag( TextItem ) ) {
-        if ( mFlashingToggle ) {
-            mCarousel.mInfoText->setOpacity( FLASHING_ITEM_NORMAL_OPACITY );
-        } else {
-            mCarousel.mInfoText->setOpacity( FLASHING_ITEM_DIM_OPACITY );
-        }
-    }
-}
-
-/*!
- * Private slot
- *
- */
-void RadioCarouselAnimator::updateNumberScroll( int value )
-{
-    mCarousel.mItems[RadioStationCarousel::RightItem]->setFrequency( value * FREQUENCY_SCROLL_DIVIDER );
-}
-
-/*!
- * Private slot
- *
- */
-void RadioCarouselAnimator::finalizeNumberScroll()
-{
-    if ( !mCanceled ) {
-        mCarousel.mItems[RadioStationCarousel::CenterItem]->setFrequency(
-                mCarousel.mItems[RadioStationCarousel::RightItem]->frequency() );
-        mCarousel.scrollContentsTo( QPointF( -mCarousel.mMidScrollPos, 0 ), 0 );
-        emit mCarousel.scanAnimationFinished();
-    }
-    removeMode( ScrollingNumbers );
-}
-
-/*!
- *
- */
-void RadioCarouselAnimator::addMode( AnimationMode mode )
-{
-    mMode |= mode;
-    if ( mMode.testFlag( TimerItem ) && !mTimer->isActive() ) {
-        mTimer->start();
-    }
-}
-
-/*!
- *
- */
-void RadioCarouselAnimator::removeMode( AnimationMode mode )
-{
-    mMode &= ~mode;
-    if ( !mMode.testFlag( TimerItem ) ) {
-        mTimer->stop();
-    }
-
-    if ( mMode == NoAnimation ) {
-        deleteLater();
-    }
-
-}
--- a/radioapp/radiowidgets/src/radiocarouselitem.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,419 +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:
-*
-*/
-
-// System includes
-#include <HbStyleLoader>
-#include <HbTextItem>
-#include <HbRichTextItem>
-#include <HbIconItem>
-#include <HbTouchArea>
-#include <HbTapGesture>
-#include <QPainter>
-
-// User includes
-#include "radiocarouselitem.h"
-#include "radiocarouselitemobserver.h"
-#include "radiostation.h"
-#include "radiologger.h"
-
-const QLatin1String FILE_PATH_WIDGETML   ( ":/layout/radiocarouselitem.widgetml" );
-const QLatin1String FILE_PATH_CSS        ( ":/layout/radiocarouselitem.css" );
-const QLatin1String ICON_BUTTON          ( "star_button" );
-const QLatin1String GENRE_LABEL          ( "genre_label" );
-const QLatin1String FAVORITE_TOUCH_AREA  ( "favorite_touch_area" );
-const QLatin1String NAME_LABEL           ( "name_label" );
-const QLatin1String RT_LABEL             ( "rt_label" );
-const QLatin1String URL_LABEL            ( "url_label" );
-
-const QLatin1String SEEKING_TEXT        ( "txt_rad_list_tuning" );
-const QLatin1String CONNECT_HEADSET_TEXT( "txt_rad_list_connect_wireless_antenna_headset_with" );
-
-/*!
- *
- */
-static void registerAndCheck( const QString& file ) {
-    bool registered = HbStyleLoader::registerFilePath( file );
-    Q_ASSERT_X( registered, "RadioCarouselItem", "Failed to register CSS or WIDGETML!" );
-}
-
-/*!
- *
- */
-RadioCarouselItem::RadioCarouselItem( RadioCarouselItemObserver& observer, QGraphicsItem* parent, bool registerCss ) :
-    HbWidget( parent ),
-    mObserver( observer ),
-    mFavoriteItem( NULL ),
-    mGenreItem( NULL ),
-    mFavoriteTouchArea( NULL ),
-    mNameItem( NULL ),
-    mRadiotextItem( NULL ),
-    mUrlItem( NULL ),
-    mAppearance( Default ),
-    mOwnsCss( registerCss ),
-    mLandscapeMode( false ),
-    mFlags( DefaultFlags )
-{
-    mStation.reset( new RadioStation() );
-
-    if ( mOwnsCss ) {
-        registerAndCheck( FILE_PATH_CSS );
-        registerAndCheck( FILE_PATH_WIDGETML );
-    }
-
-    createPrimitives();
-    updatePrimitives();
-
-    updateFavoriteIcon( false );
-
-    updateVisibilities();
-
-    grabGesture( Qt::TapGesture );
-}
-
-/*!
- *
- */
-RadioCarouselItem::~RadioCarouselItem()
-{
-    if ( mOwnsCss ) {
-        HbStyleLoader::unregisterFilePath( FILE_PATH_CSS );
-        HbStyleLoader::unregisterFilePath( FILE_PATH_WIDGETML );
-    }
-}
-
-/*!
- *
- */
-void RadioCarouselItem::createPrimitives()
-{
-    mFavoriteItem = new HbIconItem( this );
-    HbStyle::setItemName( mFavoriteItem, ICON_BUTTON );
-
-    mGenreItem = new HbTextItem( this );
-    HbStyle::setItemName( mGenreItem, GENRE_LABEL );
-
-    mNameItem = new HbTextItem( this );
-    HbStyle::setItemName( mNameItem, NAME_LABEL );
-
-    mRadiotextItem = new HbRichTextItem( this );
-    HbStyle::setItemName( mRadiotextItem, RT_LABEL );
-
-    mUrlItem = new HbTextItem( this );
-    HbStyle::setItemName( mUrlItem, URL_LABEL );
-
-    mFavoriteTouchArea = new HbTouchArea( this );
-    HbStyle::setItemName( mFavoriteTouchArea, FAVORITE_TOUCH_AREA );
-
-    // Matti testing needs these
-    mFavoriteItem->setObjectName( ICON_BUTTON );
-    mGenreItem->setObjectName( GENRE_LABEL );
-    mNameItem->setObjectName( NAME_LABEL );
-    mRadiotextItem->setObjectName( RT_LABEL );
-    mUrlItem->setObjectName( URL_LABEL );
-    mFavoriteTouchArea->setObjectName( FAVORITE_TOUCH_AREA );
-}
-
-/*!
- *
- */
-void RadioCarouselItem::drawOffScreen( QPainter& painter )
-{
-    QStyleOptionGraphicsItem option;
-
-    foreach ( QGraphicsItem* child, childItems() ) {
-        QGraphicsWidget* childWidget = static_cast<QGraphicsWidget*>( child );
-        option.exposedRect = childWidget->rect();
-        painter.save();
-        painter.translate( childWidget->pos() );
-        childWidget->paint( &painter, &option, NULL );
-        painter.restore();
-    }
-}
-
-/*!
- *
- */
-void RadioCarouselItem::updatePrimitives()
-{
-    update();
-}
-
-/*!
- * \reimp
- */
-void RadioCarouselItem::gestureEvent( QGestureEvent* event )
-{
-    if ( HbTapGesture* gesture = qobject_cast<HbTapGesture*>( event->gesture( Qt::TapGesture ) ) ) {
-        if ( gesture->state() == Qt::GestureFinished ) {
-            const QPointF mappedHotSpot = event->mapToGraphicsScene( gesture->hotSpot() );
-
-            if ( mFlags.testFlag( FavoriteTouchable ) &&
-                    mFavoriteTouchArea->sceneBoundingRect().contains( mappedHotSpot ) ) {
-
-                mObserver.handleIconClicked( *mStation );
-
-            } else if ( mFlags.testFlag( RadiotextTouchable ) &&
-                    mRadiotextItem->sceneBoundingRect().contains( mappedHotSpot ) ) {
-
-                mObserver.handleRadiotextClicked( *mStation );
-
-            } else if ( mFlags.testFlag( UrlTouchable ) &&
-                    mUrlItem->sceneBoundingRect().contains( mappedHotSpot ) ) {
-
-                mObserver.handleUrlClicked( *mStation );
-
-            }
-        }
-    }
-}
-
-/*!
- *
- */
-void RadioCarouselItem::setFlags( CarouselItemFlags flags )
-{
-    mFlags |= flags;
-    updateVisibilities();
-}
-
-/*!
- *
- */
-void RadioCarouselItem::clearFlags( CarouselItemFlags flags )
-{
-    for ( int i = 1; i < LastFlagMarker; i = i << 1 ) {
-        if ( flags.testFlag( static_cast<ItemFlag>( i ) ) ) {
-            mFlags &= ~i;
-        }
-    }
-    updateVisibilities();
-}
-
-/*!
- *
- */
-void RadioCarouselItem::updateVisibilities()
-{
-    mFavoriteItem->setVisible( mFlags.testFlag( FavoriteVisible ) );
-    mGenreItem->setVisible( mFlags.testFlag( GenreVisible ) );
-    mRadiotextItem->setVisible( mFlags.testFlag( RadiotextVisible ) );
-    mUrlItem->setVisible( mFlags.testFlag( UrlVisible ) );
-}
-
-/*!
- *
- */
-void RadioCarouselItem::setAppearance( Appearance appearance )
-{
-    mAppearance = appearance;
-
-    if ( mAppearance == ManualSeek ) {
-        mFlags = ManualSeekFlags;
-        mGenreItem->setText( "" );
-        mRadiotextItem->setText( "" );
-        mUrlItem->setText( "" );
-        mNameItem->setText( mStation->frequencyString() );
-        updateFavoriteIcon( false );
-    } else {
-        mFlags = DefaultFlags;
-    }
-
-    updateVisibilities();
-
-    repolish();
-}
-
-/*!
- *
- */
-RadioCarouselItem::Appearance RadioCarouselItem::appearance() const
-{
-    return mAppearance;
-}
-
-/*!
- *
- */
-void RadioCarouselItem::setLandscape( bool landscape )
-{
-    mLandscapeMode = landscape;
-}
-
-/*!
- *
- */
-bool RadioCarouselItem::landscape() const
-{
-    return mLandscapeMode;
-}
-
-/*!
- *
- */
-void RadioCarouselItem::setSeekLayout( bool seekLayout )
-{
-    if ( seekLayout ) {
-        setAppearance( ManualSeek );
-    } else {
-        setAppearance( mStation->radioText().isEmpty() ? Default : Full );
-    }
-}
-
-/*!
- *
- */
-void RadioCarouselItem::setStation( const RadioStation& station )
-{
-    *mStation = station;
-
-    updateLayout();
-
-    update();
-}
-
-/*!
- *
- */
-uint RadioCarouselItem::frequency() const
-{
-    return mStation->frequency();
-}
-
-/*!
- *
- */
-void RadioCarouselItem::update( const RadioStation* station )
-{
-    if ( station ) {
-        *mStation = *station;
-        updateLayout();
-    }
-
-    if ( mStation->isValid() ) {
-        mGenreItem->setText( mObserver.localizeGenre( mStation->genre() ) );
-
-        const bool hasName = mStation->hasName();
-        if ( hasName ) {
-            mNameItem->setText( mStation->name() );
-        } else {
-            mNameItem->setText( mStation->frequencyString() );
-        }
-
-        if ( mStation->hasRadiotext() ) {
-            mRadiotextItem->setText( mStation->radioText() );
-        } else {
-            if ( mStation->hasDynamicPs() ) {
-                mRadiotextItem->setText( mStation->dynamicPsText() );
-            } else if ( hasName ) {
-                const QString loc = "%L1 Mhz"; //hbTrId( "txt_rad_list_l1_mhz_small" );
-                mRadiotextItem->setText( loc.arg( mStation->frequencyString() ) );
-            } else {
-                mRadiotextItem->setText( "" );
-            }
-        }
-
-        mUrlItem->setText( mStation->url() );
-        if ( mStation->hasUrl() ) {
-            HbStyle::setItemName( mUrlItem, URL_LABEL );
-            setFlags( UrlVisible | UrlTouchable );
-        } else {
-            HbStyle::setItemName( mUrlItem, "" ); // Clear the name so the item disappears from layout
-            clearFlags( UrlVisible | UrlTouchable );
-        }
-
-        updateFavoriteIcon( mStation->isFavorite() );
-    } else {
-        cleanRdsData();
-    }
-}
-
-/*!
- *
- */
-void RadioCarouselItem::setFrequency( uint frequency )
-{
-    LOG_FORMAT( "RadioCarouselItem::setFrequency: %d", frequency );
-
-    mNameItem->setText( RadioStation::parseFrequency( frequency ) );
-
-    if ( !mObserver.isInManualSeek() ) {
-        *mStation = mObserver.findStation( frequency );
-    }
-}
-
-/*!
- *
- */
-void RadioCarouselItem::cleanRdsData()
-{
-    mGenreItem->setText( "" );
-    mRadiotextItem->setText( "" );
-    mUrlItem->setText( "" );
-}
-
-/*!
- *
- */
-void RadioCarouselItem::setRadioText( const QString& text )
-{
-    mRadiotextItem->setText( text );
-}
-
-/*!
- *
- */
-void RadioCarouselItem::setItemVisibility( ItemVisibility visibility )
-{
-    CarouselItemFlags flags = 0;
-    if ( visibility == AllVisible ) {
-        flags = DefaultFlags;
-    } else if ( visibility == AllHidden ) {
-
-    } else if ( visibility == IconVisible ) {
-        flags = FavoriteVisible;
-    }
-
-    setFlags( flags );
-}
-
-/*!
- *
- */
-void RadioCarouselItem::setIconOpacity( qreal opacity )
-{
-    mFavoriteItem->setOpacity( opacity );
-}
-
-/*!
- *
- */
-void RadioCarouselItem::updateFavoriteIcon( bool isFavorite )
-{
-    if ( isFavorite ) {
-        mFavoriteItem->setIcon( mObserver.favoriteIcon() );
-    } else {
-        mFavoriteItem->setIcon( mObserver.nonFavoriteIcon() );
-    }
-}
-
-/*!
- *
- */
-void RadioCarouselItem::updateLayout()
-{
-    setAppearance( mStation->hasSentRds() ? Full : Default );
-}
--- a/radioapp/radiowidgets/src/radiofadinglabel.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +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:
-*
-*/
-
-// System includes
-
-// User includes
-#include "radiofadinglabel.h"
-#include "radiologger.h"
-#include "radioutil.h"
-
-// Constants
-const QString HIDE_EFFECT = "hide";
-const QString SHOW_EFFECT = "show";
-
-#ifdef USE_DEPRECATED_ORBIT_APIS
-#   define SET_CONTENT setText
-#   define GET_CONTENT text
-#else
-#   define SET_CONTENT setHtml
-#   define GET_CONTENT html
-#endif // USE_DEPRECATED_ORBIT_APIS
-
-/*!
- *
- */
-RadioFadingLabel::RadioFadingLabel( QGraphicsItem* parent ) :
-    HbLabel( parent ),
-    mFadingEnabled( false )
-{
-    QEffectList effectList;
-//    effectList.append( EffectInfo( this, ":/effects/fade_in.fxml", SHOW_EFFECT ) );
-//    effectList.append( EffectInfo( this, ":/effects/fade_out.fxml", HIDE_EFFECT ) );
-    RadioUtil::addEffects( effectList );
-}
-
-/*!
- *
- */
-void RadioFadingLabel::setFadingEnabled( bool fading )
-{
-    mFadingEnabled = fading;
-}
-
-/*!
- *
- */
-void RadioFadingLabel::setTextWithoutFading( const QString& newText )
-{
-    HbLabel::SET_CONTENT( trimHtml( newText ) );
-    if ( newText.isEmpty() && mFadingEnabled ) {
-        setOpacity( 0.0 );
-    }
-}
-
-/*!
- * Public slot
- *
- */
-void RadioFadingLabel::setText( const QString& newText )
-{
-    if( GET_CONTENT().compare( newText ) != 0 &&                   // Text is different
-            parentItem() && parentItem()->isVisible() &&    // Parent is visible
-            mFadingEnabled ) {                              // Fading is enabled
-        if ( newText.isEmpty() ) {
-            if ( isVisible() ) {
-                mTextHolder = "";
-                startEffect( HIDE_EFFECT, "effectFinished" );
-            }
-        } else {
-            if ( GET_CONTENT().isEmpty() ) {
-                HbLabel::SET_CONTENT( trimHtml( newText ) );
-                startEffect( SHOW_EFFECT );
-            } else {
-                mTextHolder = newText;
-                startEffect( HIDE_EFFECT, "effectFinished" );
-            }
-        }
-    } else {
-        HbLabel::SET_CONTENT( trimHtml( newText ) );
-    }
-}
-
-/*!
- * Private slot
- *
- */
-void RadioFadingLabel::effectFinished( HbEffect::EffectStatus status )
-{
-    if ( status.reason == Hb::EffectFinished ) {
-        HbLabel::SET_CONTENT( trimHtml( mTextHolder ) );
-        if ( !mTextHolder.isEmpty() ) {
-            HbEffect::start( this, SHOW_EFFECT );
-        }
-        mTextHolder = "";
-    }
-}
-
-/*!
- *
- */
-void RadioFadingLabel::startEffect( const QString& effectName, const char* slot )
-{
-    if ( HbEffect::effectRunning( this ) ) {
-        HbEffect::cancel( this );
-    }
-    if ( slot ) {
-        HbEffect::start( this, effectName, this, slot );
-    } else {
-        HbEffect::start( this, effectName );
-    }
-}
-
-/*!
- *
- */
-QString RadioFadingLabel::trimHtml( const QString& text )
-{
-#ifdef USE_DEPRECATED_ORBIT_APIS
-    return text;
-#else
-    return "<font color=\"white\">" + text + "</font>";
-#endif // USE_DEPRECATED_ORBIT_APIS
-}
--- a/radioapp/radiowidgets/src/radiofrequencyitem.cpp	Tue Aug 31 15:15:02 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:
-*
-*/
-
-// System includes
-
-// User includes
-#include "radiofrequencyitem.h"
-#include "radiofrequencystripbase.h"
-#include "radiofrequencystripdef.h"
-
-/*!
- *
- */
-RadioFrequencyItem::RadioFrequencyItem( QString frequency ) :
-    mFrequency( frequency.isEmpty() ? 0 : frequency.toInt() * FrequencyStrip::ONE_HERTZ ),
-    mGraphicsItem( 0 )
-{
-}
-
-/*!
- *
- */
-uint RadioFrequencyItem::frequency() const
-{
-    return mFrequency;
-}
-
-/*!
- *
- */
-QPixmap RadioFrequencyItem::updatePrimitive( QGraphicsPixmapItem* item )
-{
-    mGraphicsItem = item;
-    return mPixmap;
-}
-
-/*!
- *
- */
-void RadioFrequencyItem::setPixmap( QPixmap pixmap )
-{
-    mPixmap = pixmap;
-    if ( mGraphicsItem ) {
-        mGraphicsItem->setPixmap( mPixmap );
-    }
-}
--- a/radioapp/radiowidgets/src/radiofrequencyscanner.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,292 +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:
-*
-*/
-
-// System includes
-#include <HbProgressDialog>
-#include <QTimer>
-#include <HbLabel>
-#include <HbPushButton>
-#include <HbMessageBox>
-
-// User includes
-#include "radiofrequencyscanner.h"
-#include "radioscannerengine.h"
-#include "radiouiengine.h"
-#include "radiologger.h"
-#include "radiostationmodel.h"
-#include "radiofrequencystrip.h"
-#include "radiostationcarousel.h"
-#include "radioutil.h"
-#include "radiomainview.h"
-
-// Constants
-const int EXTRA_TO_PROGRESS_MAX_VALUE = 100000;
-const int CAROUSEL_FINISH_SCROLL_TIME = 1000;
-const int STRIP_FINISH_SCROLL_TIME = 1100;
-const int CAROUSEL_SCROLL_TIME = 1000;
-const int STRIP_SCROLL_TIME = 1100;
-const int START_DELAY = 1000;
-
-/*!
- *
- */
-RadioFrequencyScanner::RadioFrequencyScanner( RadioUiEngine& uiEngine, QObject* parent ) :
-    QObject( parent ),
-    mUiEngine( uiEngine ),
-    mInMainView( parent->metaObject()->className() == RadioMainView::staticMetaObject.className() ),
-    mScannerEngine( mUiEngine.createScannerEngine() ),
-    mStripScrollTime( 0 ),
-    mCarouselScrollTime( 0 ),
-    mIsAlive( false ),
-    mUserCanceled( false )
-{
-    RadioUtil::setFrequencyScanner( this );
-
-    Radio::connect( mScannerEngine.data(),  SIGNAL(stationFound(RadioStation)),
-                    this,                   SLOT(updateScanProgress(RadioStation)) );
-}
-
-/*!
- *
- */
-RadioFrequencyScanner::~RadioFrequencyScanner()
-{
-    RadioUtil::setScanStatus( Scan::NotScanning );
-}
-
-/*!
- *
- */
-void RadioFrequencyScanner::startScanning()
-{
-    mIsAlive = true;
-    RadioFrequencyStrip* frequencyStrip = RadioUtil::frequencyStrip();
-    RadioStationCarousel* carousel = RadioUtil::carousel();
-
-    if ( mInMainView ) {
-
-        // If this is the first time start, bring application to foreground
-        if ( mUiEngine.isFirstTimeStart() ) {
-            static_cast<RadioMainView*>( parent() )->bringToForeground();
-        }
-
-        RadioUtil::setScanStatus( Scan::ScanningInMainView );
-        mStripScrollTime = frequencyStrip->autoScrollTime();
-        mCarouselScrollTime = carousel->autoScrollTime();
-
-        carousel->setScanningMode( true );
-        carousel->setAutoScrollTime( CAROUSEL_SCROLL_TIME );
-        frequencyStrip->setAutoScrollTime( STRIP_SCROLL_TIME );
-
-        Radio::connect( carousel,               SIGNAL(scanAnimationFinished()),
-                        this,                   SLOT(continueScanning()) );
-
-        static_cast<RadioMainView*>( parent() )->setScanningMode( true );
-        frequencyStrip->setScanningMode( true );
-    } else {
-        RadioUtil::setScanStatus( Scan::ScanningInStationsView );
-        mScanningProgressNote = new HbProgressDialog( HbProgressDialog::ProgressDialog );
-        mScanningProgressNote.data()->setModal( true );
-        mScanningProgressNote.data()->setAutoClose( true );
-
-        // Add some extra to the maximum value to allow room for the station at the low band edge
-        mScanningProgressNote.data()->setRange( mUiEngine.minFrequency(), mUiEngine.maxFrequency() + EXTRA_TO_PROGRESS_MAX_VALUE );
-        mScanningProgressNote.data()->setProgressValue( mUiEngine.minFrequency() );
-        mScanningProgressNote.data()->setText( hbTrId( "txt_rad_info_searching_local_stations_please_wait" ) );
-        mScanningProgressNote.data()->setAttribute( Qt::WA_DeleteOnClose, true );
-        mScanningProgressNote.data()->open();
-
-        Radio::connect( mScanningProgressNote.data(),   SIGNAL(cancelled()),
-                        this,                           SLOT(cancelScanning()) );
-    }
-
-    QTimer::singleShot( START_DELAY, this, SLOT(delayedStart()) );
-}
-
-/*!
- *
- */
-bool RadioFrequencyScanner::isAlive() const
-{
-    return mIsAlive;
-}
-
-/*!
- * Public slot
- *
- */
-void RadioFrequencyScanner::cancelScanning()
-{
-    mUserCanceled = true;
-    RadioUtil::carousel()->cancelAnimation();
-    finishScanning();
-}
-
-/*!
- * Private slot
- *
- */
-void RadioFrequencyScanner::delayedStart()
-{
-    mScannerEngine->startScanning();
-}
-
-/*!
- * Private slot
- *
- */
-void RadioFrequencyScanner::updateScanProgress( const RadioStation& station )
-{
-    if ( !station.isValid() ) {
-        finishScanning();
-        return;
-    }
-
-    const uint frequency = station.frequency();
-    LOG_FORMAT( "RadioFrequencyScanner::updateScanAndSaveProgress frequency: %d", frequency );
-
-    if ( mInMainView ) {
-
-        RadioUtil::frequencyStrip()->setFrequency( frequency, TuneReason::StationScan );
-        RadioUtil::carousel()->animateNewStation( station );
-
-    } else {
-        // Check for special case that can happen during scanning.
-        // If there is a valid radio station at the low frequency band edge it will be reported last after
-        // all of the higher frequencies. We don't update the progress value here because the value would
-        // be lower than the previous one. The progress value is set to maximum when the scanner finishes.
-        if ( frequency != mUiEngine.minFrequency() ) {
-            mScanningProgressNote.data()->setProgressValue( frequency );
-        }
-
-        mScannerEngine->continueScanning();
-    }
-}
-
-/*!
- * Private slot
- *
- */
-void RadioFrequencyScanner::continueScanning()
-{
-    if ( !mUserCanceled ) {
-        RadioUtil::frequencyStrip()->addScannedStation( mUiEngine.stationModel().currentStation().frequency() );
-        mScannerEngine->continueScanning();
-    }
-}
-
-/*!
- * Private slot
- *
- */
-void RadioFrequencyScanner::restoreUiControls()
-{
-    if ( mInMainView ) {
-        disconnect( RadioUtil::carousel(), SIGNAL(scrollingEnded()), this, 0 );
-
-        RadioUtil::frequencyStrip()->setScanningMode( false );
-        static_cast<RadioMainView*>( parent() )->setScanningMode( false );
-        RadioUtil::carousel()->setScanningMode( false );
-    }
-
-    deleteLater();
-}
-
-/*!
- *
- */
-void RadioFrequencyScanner::finishScanning()
-{
-    mScannerEngine->cancel();
-    RadioUtil::setScanStatus( Scan::NotScanning );
-    RadioUtil::setFrequencyScanner( NULL );
-    RadioFrequencyStrip* frequencyStrip = RadioUtil::frequencyStrip();
-    RadioStationCarousel* carousel = RadioUtil::carousel();
-
-    disconnect( mScannerEngine.data(), SIGNAL(stationFound(RadioStation)), this, 0 );
-
-    RadioStationModel& model = mUiEngine.stationModel();
-    const int stationCount = model.rowCount();
-
-    if ( mInMainView ) {
-
-        disconnect( carousel, SIGNAL(scanAnimationFinished()), this, 0 );
-
-        // Scroll the carousel and frequency strip through all of the scanned stations
-        if ( stationCount > 1 ) {
-            frequencyStrip->setAutoScrollTime( STRIP_FINISH_SCROLL_TIME );
-            carousel->setAutoScrollTime( CAROUSEL_FINISH_SCROLL_TIME );
-
-            Radio::connect( carousel,   SIGNAL(scrollingEnded()),
-                            this,       SLOT(restoreUiControls()) );
-
-            const uint frequency = model.stationAt( 0 ).frequency();
-
-            mUiEngine.setFrequency( frequency, TuneReason::StationScanFinalize );
-            frequencyStrip->setFrequency( frequency, TuneReason::StationScanFinalize, Scroll::Right );
-            carousel->setFrequency( frequency, TuneReason::StationScanFinalize, Scroll::Right );
-
-            frequencyStrip->setAutoScrollTime( mStripScrollTime );
-            carousel->setAutoScrollTime( mCarouselScrollTime );
-        } else {
-            const uint frequency = mUiEngine.minFrequency();
-            frequencyStrip->setFrequency( frequency, TuneReason::Unspecified );
-            carousel->setFrequency( frequency, TuneReason::Unspecified );
-
-            if ( !mUserCanceled ) {
-                HbMessageBox* box = new HbMessageBox( HbMessageBox::MessageTypeInformation );
-                box->setTimeout( HbPopup::NoTimeout );
-                box->setText( hbTrId( "txt_rad_dpophead_no_stations_found_try_searching" ) );
-                box->setDismissPolicy( HbPopup::NoDismiss );
-                box->setAttribute( Qt::WA_DeleteOnClose, true );
-                box->open();
-            }
-
-            restoreUiControls();
-        }
-
-    } else {
-        if ( !mUserCanceled ) {
-            if ( mScanningProgressNote ) {
-                mScanningProgressNote.data()->setProgressValue( mScanningProgressNote.data()->maximum() );
-                mScanningProgressNote.data()->close();
-            }
-
-            if ( stationCount == 0 ) {
-                HbMessageBox* box = new HbMessageBox( HbMessageBox::MessageTypeInformation );
-                box->setTimeout( HbPopup::NoTimeout );
-                box->setText( hbTrId( "txt_rad_dpophead_no_stations_found_try_searching" ) );
-                box->setDismissPolicy( HbPopup::NoDismiss );
-                box->setAttribute( Qt::WA_DeleteOnClose, true );
-                box->open();
-            }
-        }
-        const uint frequency = model.stationAt( 0 ).frequency();
-        mUiEngine.setFrequency( frequency, TuneReason::StationScanFinalize );
-    }
-
-    mIsAlive = false;
-    emit frequencyScannerFinished();
-
-    if ( !mInMainView ) {
-        if ( mUserCanceled ) {
-            deleteLater();
-        } else {
-            delete this; //TODO: Remove this weird hack once the problem with deleteLater is clear
-        }
-    }
-}
--- a/radioapp/radiowidgets/src/radiofrequencystrip.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,168 +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:
-*
-*/
-
-// System includes
-
-// User includes
-#include "radiofrequencystrip.h"
-#include "radiouiengine.h"
-#include "radiostation.h"
-#include "radiostationmodel.h"
-#include "radioutil.h"
-#include "radiouiloader.h"
-#include "radiologger.h"
-
-RadioFrequencyStrip::RadioFrequencyStrip() :
-    RadioFrequencyStripBase(),
-    mUiEngine( NULL )
-{
-    RadioUtil::setFrequencyStrip( this );
-}
-
-/*!
- *
- */
-void RadioFrequencyStrip::init( RadioUiEngine* engine, RadioUiLoader& uiLoader )
-{
-    mUiEngine = engine;
-    initbase( mUiEngine->minFrequency(), mUiEngine->maxFrequency(),
-              mUiEngine->frequencyStepSize(), RadioUiEngine::lastTunedFrequency() );
-
-    createButtonsFromDocml( uiLoader, DOCML::MV_NAME_PREV_BUTTON, DOCML::MV_NAME_NEXT_BUTTON );
-
-    RadioStationModel* stationModel = &mUiEngine->stationModel();
-    Radio::connect( stationModel,   SIGNAL(rowsInserted(QModelIndex,int,int)),
-                    this,           SLOT(updateStation(QModelIndex,int,int)) );
-    Radio::connect( stationModel,   SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
-                    this,           SLOT(removeStation(QModelIndex,int,int)) );
-    Radio::connect( stationModel,   SIGNAL(modelReset()),
-                    this,           SLOT(initEmptyItems()) );
-}
-
-/*!
- *
- */
-void RadioFrequencyStrip::setFrequency( const uint newFrequency, int reason, Scroll::Direction direction )
-{
-    Q_UNUSED( reason );
-    if ( newFrequency != frequency() || reason == TuneReason::Skip ) {
-        RadioFrequencyStripBase::setFrequency( newFrequency, reason, direction );
-    }
-}
-
-/*!
- * \reimp
- */
-bool RadioFrequencyStrip::isInitialized() const
-{
-    return mUiEngine != NULL;
-}
-
-/*!
- * \reimp
- */
-QList<FrequencyStrip::StationMarker> RadioFrequencyStrip::stationsInRange( uint minFrequency, uint maxFrequency ) const
-{
-    QList<RadioStation> stations = mUiEngine->stationsInRange( minFrequency, maxFrequency );
-    QList<FrequencyStrip::StationMarker> markers;
-    foreach ( const RadioStation& station, stations ) {
-        markers.append( FrequencyStrip::StationMarker( station.frequency(), station.isFavorite() ) );
-    }
-    return markers;
-}
-
-/*!
- * \reimp
- */
-void RadioFrequencyStrip::emitFrequencyChanged( uint frequency, int reason, int direction )
-{
-    int tuneReason = TuneReason::Unspecified;
-    if ( reason == FrequencyStrip::ManualSeekUpdate ) {
-        tuneReason = TuneReason::ManualSeekUpdate;
-    } else if ( reason == FrequencyStrip::ManualSeekTune ) {
-        tuneReason = TuneReason::ManualSeekTune;
-    }
-
-    emit frequencyChanged( frequency, tuneReason, direction );
-}
-
-/*!
- *
- */
-void RadioFrequencyStrip::skipToPrevious()
-{
-    emit skipRequested( StationSkip::Previous );
-}
-
-/*!
- *
- */
-void RadioFrequencyStrip::skipToPreviousFavorite()
-{
-    emit skipRequested( StationSkip::PreviousFavorite );
-}
-
-/*!
- *
- */
-void RadioFrequencyStrip::skipToNext()
-{
-    emit skipRequested( StationSkip::Next );
-}
-
-/*!
- *
- */
-void RadioFrequencyStrip::skipToNextFavorite()
-{
-    emit skipRequested( StationSkip::NextFavorite );
-}
-
-/*!
- *
- */
-void RadioFrequencyStrip::seekDown()
-{
-    emit seekRequested( Seek::Down );
-}
-
-
-/*!
- *
- */
-void RadioFrequencyStrip::seekUp()
-{
-    emit seekRequested( Seek::Up );
-}
-
-/*!
- * \reimp
- */
-bool RadioFrequencyStrip::isScanning() const
-{
-    return RadioUtil::scanStatus() == Scan::ScanningInMainView;
-}
-
-/*!
- * \reimp
- */
-uint RadioFrequencyStrip::frequencyAtIndex( int index ) const
-{
-    RadioStationModel& model = mUiEngine->stationModel();
-    return model.data( model.index( index, 0, QModelIndex() ),
-                       RadioRole::RadioStationRole ).value<RadioStation>().frequency();
-}
--- a/radioapp/radiowidgets/src/radiofrequencystripbase.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,836 +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:
-*
-*/
-
-// System includes
-#include <HbDocumentLoader>
-#include <HbEffect>
-#include <QPainter>
-#include <QStringListModel>
-#include <QGraphicsSceneResizeEvent>
-#include <QPen>
-#include <HbPushButton>
-#include <QTimer>
-#include <HbColorScheme>
-#include <HbEvent>
-#include <HbSwipeGesture>
-#include <HbDeviceProfile>
-#include <QDebug>
-
-// User includes
-#include "radiofrequencystripbase.h"
-#include "radiofrequencystripdef.h"
-#include "radiofrequencyitem.h"
-
-/*!
- * Convenience function to check signal-slot connections
- */
-//#define CHECK_SIGNAL_CONNECTIONS
-static bool connectAndCheck( const QObject* sender, const char* signal,
-                             const QObject* receiver, const char* member,
-                             Qt::ConnectionType type = Qt::AutoConnection )
-{
-    bool connected = QObject::connect( sender, signal, receiver, member, type );
-
-    #ifdef CHECK_SIGNAL_CONNECTIONS
-
-    if ( !connected ) {
-        qDebug() << "Failed to make a signal-slot connection!";
-        qDebug() << "sender: " << sender->metaObject()->className();
-        qDebug() << "signal: " << signal;
-        qDebug() << "receiver: " << receiver->metaObject()->className();
-        qDebug() << "slot/signal: " << signal;
-
-        Q_ASSERT( false );
-
-        // ----------------------------------------------------------------
-        // SIGNAL-SLOT CONNECT FAILED!
-        // ----------------------------------------------------------------
-    }
-
-    #endif // CHECK_SIGNAL_CONNECTIONS
-
-    return connected;
-}
-
-/*!
- *
- */
-RadioFrequencyStripBase::RadioFrequencyStripBase( QGraphicsItem* parent ) :
-    RadioStripBase( parent ),
-    mItemHeight( 8 ),
-    mMinFrequency( 87500000 ),
-    mMaxFrequency( 108000000 ),
-    mFrequencyStepSize( 100000 ),
-    mFrequency( 87500000 ),
-    mSelectorImage( new QGraphicsPixmapItem( this ) ),
-    mSeparatorPos( 0.0 ),
-    mMaxWidth( 0 ),
-    mSelectorPos( 0.0 ),
-    mLeftButton( 0 ),
-    mRightButton( 0 ),
-    mManualSeekTimer( NULL ),
-    mManualSeekMode( false ),
-    mLastReportedFrequency( 0 ),
-    mManualSeekTimerId( 0 ),
-    mForegroundColor( Qt::white )//HbColorScheme::color( FrequencyStrip::TEXT_COLOR_ATTRIBUTE ) )
-{
-    setScrollingStyle( HbScrollArea::PanWithFollowOn );
-    setItemSize( QSizeF( FrequencyStrip::ITEM_WIDTH + FrequencyStrip::PIXMAP_OVERLAP / 2, mItemHeight ) );
-    setOverlap( FrequencyStrip::PIXMAP_OVERLAP / 2 );
-}
-
-/*!
- * Property
- */
-void RadioFrequencyStripBase::setItemHeight( int itemHeight )
-{
-    mItemHeight = itemHeight;
-}
-
-/*!
- * Property
- */
-int RadioFrequencyStripBase::itemHeight() const
-{
-    return mItemHeight;
-}
-
-/*!
- *
- */
-void RadioFrequencyStripBase::initbase( uint minFrequency, uint maxFrequency, uint stepSize, uint frequency )
-{
-    mMinFrequency       = minFrequency;
-    mMaxFrequency       = maxFrequency;
-    mFrequencyStepSize  = stepSize;
-    mFrequency          = frequency;
-
-    initModel();
-    initEmptyItems();
-    initPositions();
-
-    HbDeviceProfile deviceProfile;
-    mItemHeight = static_cast<int>( mItemHeight * deviceProfile.unitValue() );
-
-    mManualSeekTimer = new QTimer( this );
-    mManualSeekTimer->setInterval( FrequencyStrip::MANUALSEEK_START_TIMEOUT );
-    mManualSeekTimer->setSingleShot( true );
-    connectAndCheck( mManualSeekTimer,   SIGNAL(timeout()),
-                     this,               SLOT(toggleManualSeek()) );
-
-    connectAndCheck( this,           SIGNAL(scrollingEnded()),
-                     this,           SLOT(handleScrollingEnd()) );
-
-    grabGesture( Qt::SwipeGesture );
-
-    //TODO: Remove. Stepsize temporarily hardcoded to 100 Khz in europe region
-    if ( mFrequencyStepSize < FrequencyStrip::ONE_HUNDRED_KHZ ) {
-        mFrequencyStepSize = FrequencyStrip::ONE_HUNDRED_KHZ;
-    }
-
-    updateAllItems();
-
-    showButtons();
-}
-
-/*!
- *
- */
-void RadioFrequencyStripBase::createButtonsFromDocml( HbDocumentLoader& uiLoader, const QString& leftButtonName, const QString& rightButtonName )
-{
-    Q_ASSERT( !mLeftButton && !mRightButton );
-    mLeftButton = qobject_cast<HbPushButton*>( uiLoader.findWidget( leftButtonName ) );
-    mRightButton = qobject_cast<HbPushButton*>( uiLoader.findWidget( rightButtonName ) );
-
-    initButtons();
-}
-
-/*!
- *
- */
-void RadioFrequencyStripBase::createButtons()
-{
-    Q_ASSERT( !mLeftButton && !mRightButton );
-    mLeftButton = new HbPushButton( this );
-    mRightButton = new HbPushButton( this );
-
-    mLeftButton->setIcon( HbIcon( "qtg_mono_previous" ) );
-    mRightButton->setIcon( HbIcon( "qtg_mono_next" ) );
-
-    initButtons();
-}
-
-/*!
- *
- */
-void RadioFrequencyStripBase::setFrequency( const uint frequency, int reason, Scroll::Direction direction )
-{
-    if ( mFrequencies.contains( frequency ) ) {
-        scrollToFrequency( frequency, direction, mAutoScrollTime );
-    }
-}
-
-/*!
- *
- */
-uint RadioFrequencyStripBase::frequency() const
-{
-    return mFrequency;
-}
-
-/*!
- *
- */
-bool RadioFrequencyStripBase::isInManualSeekMode() const
-{
-    return mManualSeekMode;
-}
-
-/*!
- *
- */
-void RadioFrequencyStripBase::cancelManualSeek()
-{
-    mManualSeekTimer->stop();
-    if ( mManualSeekMode ) {
-        toggleManualSeek();
-    }
-}
-
-/*!
- *
- */
-void RadioFrequencyStripBase::addScannedStation( uint frequency )
-{
-    FrequencyPos pos = mFrequencies.value( frequency );
-    updateItem( pos.mItem, frequency );
-}
-
-/*!
- *
- */
-void RadioFrequencyStripBase::updateFavorite( uint frequency )
-{
-    FrequencyPos pos = mFrequencies.value( frequency );
-    updateItem( pos.mItem );
-}
-
-/*!
- * Public slot
- *
- */
-void RadioFrequencyStripBase::setScanningMode( bool isScanning )
-{
-    mManualSeekTimer->stop();
-    if ( isScanning ) {
-        initEmptyItems();
-        hideButtons();
-        scrollToFrequency( mMinFrequency, Scroll::Shortest, mAutoScrollTime );
-    } else {
-        showButtons();
-    }
-    setEnabled( !isScanning );
-}
-
-/*!
- * Private slot
- *
- */
-void RadioFrequencyStripBase::initEmptyItems()
-{
-    //TODO: Remove the weird hack of checking the sender
-    if ( !sender() || !isScanning() ) {
-        QList<FrequencyStrip::StationMarker> emptyList;
-        foreach ( RadioFrequencyItem* item, mFrequencyItems ) {
-            QPixmap pixmap = drawPixmap( item->frequency(), emptyList, item );
-            item->setPixmap( pixmap );
-        }
-    }
-}
-
-/*!
- * Private slot
- *
- */
-void RadioFrequencyStripBase::removeStation( const QModelIndex& parent, int first, int last )
-{
-    Q_UNUSED( parent );
-    updateStationsInRange( first, last, true );
-}
-
-/*!
- * Private slot
- *
- */
-void RadioFrequencyStripBase::updateStation( const QModelIndex& parent, int first, int last )
-{
-    Q_UNUSED( parent );
-    updateStationsInRange( first, last );
-}
-
-/*!
- * Private slot
- */
-void RadioFrequencyStripBase::handleLeftButton()
-{
-    skipToPrevious();
-}
-
-/*!
- * Private slot
- */
-void RadioFrequencyStripBase::handleRightButton()
-{
-    skipToNext();
-}
-
-/*!
- * Private slot
- */
-void RadioFrequencyStripBase::handleLongLeftButton()
-{
-    seekDown();
-}
-
-/*!
- * Private slot
- */
-void RadioFrequencyStripBase::handleLongRightButton()
-{
-    seekUp();
-}
-
-/*!
- * Private slot
- *
- */
-void RadioFrequencyStripBase::toggleManualSeek()
-{
-    mManualSeekMode = !mManualSeekMode;
-    emit manualSeekChanged( mManualSeekMode );
-
-    if ( mManualSeekMode ) {
-        grabMouse();
-        hideButtons();
-        mManualSeekTimerId = startTimer( FrequencyStrip::MANUALSEEK_SIGNAL_DELAY );
-    } else {
-        ungrabMouse();
-        showButtons();
-        killTimer( mManualSeekTimerId );
-        mManualSeekTimerId = 0;
-    }
-}
-
-/*!
- * Private slot
- */
-void RadioFrequencyStripBase::handleScrollingEnd()
-{
-    // Check if the selector is in the invalid area where the strip loops around
-    const int selectorPosition = selectorPos();
-    if ( mManualSeekMode ) {
-        if ( !mPositions.contains( selectorPosition ) ) {
-            if ( selectorPosition < mMaxWidth - FrequencyStrip::ITEM_WIDTH + mSeparatorPos ) {
-                scrollToFrequency( mMaxFrequency, Scroll::Shortest, 500 );
-                emitFrequencyChanged( mMaxFrequency, FrequencyStrip::ManualSeekUpdate, Scroll::Shortest );
-            } else {
-                scrollToFrequency( mMinFrequency, Scroll::Shortest, 500 );
-                emitFrequencyChanged( mMinFrequency, FrequencyStrip::ManualSeekUpdate, Scroll::Shortest );
-            }
-        }
-
-        mManualSeekTimer->start( FrequencyStrip::MANUALSEEK_END_TIMEOUT );
-    }
-}
-
-/*!
- * \reimp
- */
-void RadioFrequencyStripBase::updateItemPrimitive( QGraphicsItem* itemToUpdate, int itemIndex )
-{
-    QGraphicsPixmapItem* item = static_cast<QGraphicsPixmapItem*>( itemToUpdate );
-    if ( itemIndex < mFrequencyItems.count() ) {
-        item->setPixmap( mFrequencyItems.at( itemIndex )->updatePrimitive( item ) );
-    }
-}
-
-/*!
- * \reimp
- */
-QGraphicsItem* RadioFrequencyStripBase::createItemPrimitive( QGraphicsItem* parent )
-{
-    return new QGraphicsPixmapItem( parent );
-}
-
-/*!
- * \reimp
- */
-void RadioFrequencyStripBase::scrollPosChanged()
-{
-    if ( mManualSeekMode ) {
-        const int pos = selectorPos();
-        const uint frequency = mPositions.value( pos );
-        if ( frequency > 0 ) {
-            mFrequency = mPositions.value( pos );
-            emitFrequencyChanged( mFrequency, FrequencyStrip::ManualSeekUpdate, Scroll::Shortest );
-        }
-    }
-}
-
-/*!
- * \reimp
- */
-void RadioFrequencyStripBase::resizeEvent ( QGraphicsSceneResizeEvent* event )
-{
-    RadioStripBase::resizeEvent( event );
-
-    initSelector();
-
-    const qreal height = event->newSize().height();
-    const qreal width = event->newSize().width();
-
-    mSelectorPos = width / 2;
-    mSelectorImage->setOffset( mSelectorPos - ( FrequencyStrip::INDICATOR_WIDTH / 2 ), 0.0 );
-
-    if ( mLeftButton && mRightButton ) {
-        mLeftButton->resize( height, height );
-        mRightButton->resize( height, height );
-        mRightButton->setPos( QPointF( width - height, 0 ) );
-    }
-
-    scrollToFrequency( mFrequency );
-}
-
-/*!
- * \reimp
- */
-void RadioFrequencyStripBase::changeEvent( QEvent* event )
-{
-    if ( event->type() == HbEvent::ThemeChanged ) {
-        // Update the foreground color and redraw each item
-        mForegroundColor = Qt::white;// HbColorScheme::color( FrequencyStrip::TEXT_COLOR_ATTRIBUTE );
-        updateAllItems();
-    }
-
-    return RadioStripBase::changeEvent(event);
-}
-
-/*!
- * \reimp
- */
-void RadioFrequencyStripBase::mousePressEvent( QGraphicsSceneMouseEvent* event )
-{
-    RadioStripBase::mousePressEvent( event );
-
-    mManualSeekTimer->stop();
-    if ( mManualSeekMode ) {
-        const bool insideStrip = rect().contains( event->pos() );
-        if ( !insideStrip ) {
-            toggleManualSeek();
-        }
-    } else {
-        mManualSeekTimer->start( FrequencyStrip::MANUALSEEK_START_TIMEOUT );
-    }
-}
-
-/*!
- * \reimp
- */
-void RadioFrequencyStripBase::mouseReleaseEvent( QGraphicsSceneMouseEvent* event )
-{
-    RadioStripBase::mouseReleaseEvent( event );
-
-    mManualSeekTimer->stop();
-    if ( mManualSeekMode ) {
-        mManualSeekTimer->start( FrequencyStrip::MANUALSEEK_END_TIMEOUT );
-    }
-}
-
-/*!
- * \reimp
- */
-void RadioFrequencyStripBase::gestureEvent( QGestureEvent* event )
-{
-    HbSwipeGesture* swipeGesture = static_cast<HbSwipeGesture*>( event->gesture( Qt::SwipeGesture ) );
-    if ( swipeGesture && !mManualSeekMode ) {
-        if ( swipeGesture->state() == Qt::GestureFinished ) {
-            if ( swipeGesture->horizontalDirection() == QSwipeGesture::Left ) {
-                skipToNext();
-            } else if ( swipeGesture->horizontalDirection() == QSwipeGesture::Right ) {
-                skipToPrevious();
-            }
-        }
-    } else if ( mManualSeekMode ) {
-        RadioStripBase::gestureEvent( event );
-    }
-}
-
-/*!
- * \reimp
- */
-void RadioFrequencyStripBase::timerEvent( QTimerEvent* event )
-{
-    Q_UNUSED( event );
-    if ( mLastReportedFrequency != mFrequency ) {
-        mLastReportedFrequency = mFrequency;
-        emitFrequencyChanged( mFrequency, FrequencyStrip::ManualSeekTune, Scroll::Shortest );
-    }
-}
-
-/*!
- *
- */
-void RadioFrequencyStripBase::initModel()
-{
-    const uint minFreq = uint( qreal(mMinFrequency) / FrequencyStrip::ONE_HERTZ + FrequencyStrip::ROUNDER );
-    const uint maxFreq = uint( qreal(mMaxFrequency) / FrequencyStrip::ONE_HERTZ + 0.9 ); // always round up
-
-    QStringList list;
-    QString freqText;
-    for ( uint i = minFreq; i <= maxFreq; ++i ) {
-        freqText = QString::number( i );
-        list.append( freqText );
-        mFrequencyItems.append( new RadioFrequencyItem( freqText ) );
-    }
-    mFrequencyItems.append( new RadioFrequencyItem( "" ) );
-    list.append( "" );
-
-    mMaxWidth = list.count() * FrequencyStrip::ITEM_WIDTH;
-
-    mSeparatorPos = qreal(FrequencyStrip::ITEM_WIDTH) / 2;
-    const uint minDrawableFreq = minFreq * FrequencyStrip::ONE_HERTZ - FrequencyStrip::HALF_HERTZ;;
-    const uint maxDrawableFreq = maxFreq * FrequencyStrip::ONE_HERTZ + FrequencyStrip::HALF_HERTZ;
-    mSeparatorPos += qreal( ( mMinFrequency  - minDrawableFreq ) / 2 ) / FrequencyStrip::PIXEL_IN_HZ;
-    mSeparatorPos -= qreal( ( maxDrawableFreq - mMaxFrequency ) / 2 ) / FrequencyStrip::PIXEL_IN_HZ;
-
-    setModel( new QStringListModel( list, this ) );
-}
-
-/*!
- *
- */
-void RadioFrequencyStripBase::initSelector()
-{
-    QPixmap selectorPixmap = QPixmap( QSize( FrequencyStrip::SELECTOR_WIDTH, (int)size().height() ) );
-    selectorPixmap.fill( Qt::red );
-    mSelectorImage->setPixmap( selectorPixmap );
-    mSelectorImage->setZValue( FrequencyStrip::SELECTOR_Z_POS );
-}
-
-/*!
- *
- */
-void RadioFrequencyStripBase::initPositions()
-{
-    int prevPos = 0;
-    int nextPos = 0;
-    const int lastPos = mFrequencies.value( mMaxFrequency ).mPosition;
-    for ( int i = mFrequencies.value( mMinFrequency ).mPosition; i < lastPos; ++i ) {
-        if ( mPositions.contains( i ) ) {
-            prevPos = i;
-            const uint freq = mPositions.value( prevPos ) + mFrequencyStepSize;
-            if ( mFrequencies.contains( freq ) ) {
-                nextPos = mFrequencies.value( freq ).mPosition;
-            } else {
-                nextPos = prevPos;
-            }
-        } else {
-            const int nearestHit = ( i - prevPos ) < ( nextPos - i ) ? prevPos : nextPos;
-            mPositions.insert( i, mPositions.value( nearestHit ) );
-        }
-    }
-}
-
-/*!
- *
- */
-void RadioFrequencyStripBase::initButtons()
-{
-    Q_ASSERT( mLeftButton && mRightButton );
-    connectAndCheck( mLeftButton,    SIGNAL(clicked()),
-                     this,           SLOT(handleLeftButton()) );
-    connectAndCheck( mRightButton,   SIGNAL(clicked()),
-                     this,           SLOT(handleRightButton()) );
-    connectAndCheck( mLeftButton,    SIGNAL(longPress(QPointF)),
-                     this,           SLOT(handleLongLeftButton()) );
-    connectAndCheck( mRightButton,   SIGNAL(longPress(QPointF)),
-                     this,           SLOT(handleLongRightButton()) );
-
-    mLeftButton->setZValue( FrequencyStrip::SELECTOR_Z_POS );
-    mLeftButton->setObjectName( FrequencyStrip::LEFT_BUTTON );
-    mRightButton->setZValue( FrequencyStrip::SELECTOR_Z_POS );
-    mRightButton->setObjectName( FrequencyStrip::RIGHT_BUTTON );
-
-    const qreal height = size().height();
-    const qreal width = size().width();
-    mLeftButton->resize( height, height );
-    mRightButton->resize( height, height );
-    mRightButton->setPos( QPointF( width - height, 0 ) );
-
-    // Add left button effects
-    QStringList pathList;
-    pathList << ":/effects/slide_to_left.fxml" << ":/effects/slide_from_left.fxml";
-    QStringList eventList;
-    eventList << FrequencyStrip::SLIDE_TO_LEFT << FrequencyStrip::SLIDE_FROM_LEFT;
-    HbEffect::add( mLeftButton, pathList, eventList );
-
-    // Add right button effects
-    pathList.clear();
-    pathList << ":/effects/slide_to_right.fxml" << ":/effects/slide_from_right.fxml";
-    eventList.clear();
-    eventList << FrequencyStrip::SLIDE_TO_RIGHT << FrequencyStrip::SLIDE_FROM_RIGHT;
-    HbEffect::add( mRightButton, pathList, eventList );
-}
-
-/*!
- *
- */
-void RadioFrequencyStripBase::addFrequencyPos( int pos, uint frequency, RadioFrequencyItem* item )
-{
-    mFrequencies.insert( frequency, FrequencyPos( pos, item ) );
-    mPositions.insert( pos, frequency );
-}
-
-/*!
- *
- */
-void RadioFrequencyStripBase::updateStationsInRange( int first, int last, bool stationRemoved )
-{
-    if ( !isScanning() ) {
-        uint frequency = 0;
-        for ( int i = first; i <= last; ++i ) {
-            frequency = frequencyAtIndex( i );
-            if ( mFrequencies.contains( frequency ) ) {
-                FrequencyPos pos = mFrequencies.value( frequency );
-                updateItem( pos.mItem, 0, stationRemoved ? frequency : 0 );
-            }
-        }
-    }
-}
-
-/*!
- *
- */
-void RadioFrequencyStripBase::updateItem( RadioFrequencyItem* item, uint upperRange, uint ignoredFrequency )
-{
-    if ( item ) {
-        uint frequency = item->frequency();
-        QList<FrequencyStrip::StationMarker> markers;
-
-        if ( upperRange == 0 ) {
-            upperRange = frequency + FrequencyStrip::HALF_HERTZ;
-        }
-
-        if ( isInitialized() ) {
-            markers = stationsInRange( frequency - FrequencyStrip::HALF_HERTZ, upperRange );
-            for ( int i = markers.count() - 1; ignoredFrequency > 0 && i >= 0; --i ) {
-                if ( markers[i].mFrequency == ignoredFrequency ) {
-                    markers.removeAt( i );
-                    break;
-                }
-            }
-        }
-
-        QPixmap pixmap = drawPixmap( frequency, markers, item );
-        item->setPixmap( pixmap );
-
-        foreach ( const FrequencyStrip::StationMarker& marker, markers ) {
-            FrequencyPos pos = mFrequencies.value( marker.mFrequency );
-            mFrequencies.insert( marker.mFrequency, pos );
-        }
-    }
-}
-
-/*!
- *
- */
-void RadioFrequencyStripBase::updateAllItems()
-{
-    foreach ( RadioFrequencyItem* item, mFrequencyItems ) {
-        updateItem( item );
-    }
-}
-
-/*!
- *
- */
-QPixmap RadioFrequencyStripBase::drawPixmap( uint frequency, QList<FrequencyStrip::StationMarker> stations, RadioFrequencyItem* item )
-{
-    QPixmap pixmap( FrequencyStrip::PIXMAP_WIDTH, mItemHeight );
-    pixmap.fill( Qt::transparent );
-    QPainter painter( &pixmap );
-    QPen normalPen = painter.pen();
-    QPen favoritePen = normalPen;
-    normalPen.setColor( mForegroundColor );
-    painter.setPen( normalPen );
-
-    if ( frequency == 0 ) {
-        painter.drawLine( makeTab( mSeparatorPos - 1 + FrequencyStrip::ROUNDER, mItemHeight ) );
-        painter.drawLine( makeTab( mSeparatorPos + FrequencyStrip::ROUNDER, mItemHeight ) );
-        return pixmap;
-    }
-
-    const QString itemText = QString::number( frequency / FrequencyStrip::ONE_HERTZ );
-    const uint startFrequency = frequency - FrequencyStrip::HALF_HERTZ;
-    const uint endFrequency = startFrequency + FrequencyStrip::ONE_HERTZ;
-    const uint  roundedMin = int( qreal(mMinFrequency) / FrequencyStrip::ONE_HERTZ + FrequencyStrip::ROUNDER );
-    const uint freq = frequency / FrequencyStrip::ONE_HERTZ;
-    const int diff = freq - roundedMin;
-    const qreal startPixel = diff * FrequencyStrip::ITEM_WIDTH;
-    qreal pixels = 0.0;
-    const qreal leftOverlap = FrequencyStrip::PIXMAP_OVERLAP / 2;
-
-    for ( uint frequency = startFrequency; frequency <= endFrequency; frequency += mFrequencyStepSize ) {
-
-        if ( frequency < mMinFrequency || frequency > mMaxFrequency ) {
-            continue;
-        }
-
-        pixels = qreal( frequency - startFrequency ) / FrequencyStrip::PIXEL_IN_HZ;
-        if ( frequency % FrequencyStrip::ONE_HERTZ == 0 ) {
-
-            // Draw the high frequency tab and the frequency text for the even number
-            normalPen.setWidth( 3 );
-            painter.setPen( normalPen );
-            painter.drawLine( makeTab( pixels + leftOverlap - 1, FrequencyStrip::TAB_HEIGHT_BIG ) );
-            normalPen.setWidth( 1 );
-            painter.setPen( normalPen );
-
-            // Draw the frequency text and its 00 decimals
-            painter.setFont( FrequencyStrip::DECIMAL_FONT );
-            const int decimalWidth = painter.fontMetrics().width( FrequencyStrip::DECIMAL_TEXT );
-            const int decimalSpace = painter.fontMetrics().leftBearing( '.' );
-            painter.setFont( FrequencyStrip::FREQUENCY_FONT );
-            const int frequencyWidth = painter.fontMetrics().width( itemText );
-            const int textPosX = int( pixels + leftOverlap - ( frequencyWidth + decimalSpace + decimalWidth ) / 2 );
-            painter.drawText( QPoint( textPosX, FrequencyStrip::FREQUENCY_TEXT_Y_POS ), itemText );
-            painter.setFont( FrequencyStrip::DECIMAL_FONT );
-            painter.drawText( QPoint( textPosX + frequencyWidth + decimalSpace, FrequencyStrip::FREQUENCY_TEXT_Y_POS ), FrequencyStrip::DECIMAL_TEXT );
-
-        } else if ( frequency % FrequencyStrip::ONE_TAB_IN_HZ == 0 ) {
-
-            // Draw the low frequency tab for the uneven number
-            painter.drawLine( makeTab( pixels + leftOverlap, FrequencyStrip::TAB_HEIGHT_SMALL ) );
-
-        }
-
-        addFrequencyPos( int( startPixel + pixels + FrequencyStrip::ROUNDER ), frequency, item );
-    }
-
-    // Draw favorites and local stations
-    favoritePen.setColor( Qt::yellow );
-
-    foreach ( const FrequencyStrip::StationMarker& station, stations ) {
-        const uint frequency = station.mFrequency;
-        pixels = qreal( frequency - startFrequency ) / FrequencyStrip::PIXEL_IN_HZ;
-
-        if ( station.mIsFavorite ) {
-            favoritePen.setWidth( FrequencyStrip::PEN_WIDTH_FAVORITE );
-            painter.setPen( favoritePen );
-            painter.drawEllipse( int( pixels + leftOverlap - 3 ), FrequencyStrip::STATION_MARKER_Y_POS - 3, 6, 6 );
-        } else {
-            favoritePen.setWidth( 1 );
-            painter.setPen( favoritePen );
-            painter.drawEllipse( int( pixels + leftOverlap - 4 ), FrequencyStrip::STATION_MARKER_Y_POS - 4, 8, 8 );
-        }
-    }
-
-    return pixmap;
-}
-
-/*!
- *
- */
-QLineF RadioFrequencyStripBase::makeTab( qreal pos, int height )
-{
-    return QLineF( pos, mItemHeight - height, pos, mItemHeight );
-}
-
-/*!
- *
- */
-int RadioFrequencyStripBase::selectorPos() const
-{
-    const int pos = int( -contentWidget()->x() + mSelectorPos + FrequencyStrip::ROUNDER );
-    return pos % mMaxWidth;
-}
-
-/*!
- *
- */
-void RadioFrequencyStripBase::scrollToFrequency( uint frequency, Scroll::Direction direction, int time )
-{
-    int targetFreqPos = mFrequencies.value( frequency ).mPosition;
-    const int currentFreqPos = mFrequencies.value( mFrequency ).mPosition;
-    const int currentPos = int( -contentWidget()->x() + mSelectorPos + FrequencyStrip::ROUNDER );
-    const bool isInSecondHalf = currentPos >= mMaxWidth - FrequencyStrip::ITEM_WIDTH + mSeparatorPos;
-
-    // Special case: When there is only one favorite and the user presses skip
-    // the strip must scroll around to the same frequency.
-    if ( mFrequency == frequency && direction != Scroll::Shortest ) {
-        if ( direction == Scroll::Left ) {
-            targetFreqPos += mMaxWidth;
-        } else {
-            targetFreqPos -= mMaxWidth;
-        }
-    }
-
-    mFrequency = frequency;
-
-    qreal newPos = targetFreqPos;
-    if ( direction == Scroll::Left ) {
-
-        if ( currentFreqPos > targetFreqPos ) {
-            newPos += mMaxWidth;
-        }
-
-    } else if ( direction == Scroll::Right ) {
-
-        if ( currentFreqPos < targetFreqPos ) {
-            newPos -= mMaxWidth;
-        }
-
-    }
-
-    if ( isInSecondHalf ) {
-        newPos += mMaxWidth;
-    }
-
-    newPos -= mSelectorPos - FrequencyStrip::ROUNDER;
-
-//    scrollContentsTo( QPointF( newPos, 0 ), time );
-// TODO: Remove this and uncomment the above line. This is a temporary workaround to get the strip to move
-    scrollContentsTo( QPointF( newPos, 0 ), 0 );
-}
-
-/*!
- *
- */
-void RadioFrequencyStripBase::hideButtons()
-{
-    HbEffect::start( mLeftButton, FrequencyStrip::SLIDE_TO_LEFT );
-    HbEffect::start( mRightButton, FrequencyStrip::SLIDE_TO_RIGHT );
-}
-
-/*!
- *
- */
-void RadioFrequencyStripBase::showButtons()
-{
-    HbEffect::start( mLeftButton, FrequencyStrip::SLIDE_FROM_LEFT );
-    HbEffect::start( mRightButton, FrequencyStrip::SLIDE_FROM_RIGHT );
-}
--- a/radioapp/radiowidgets/src/radiohistoryview.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,341 +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:
-*
-*/
-
-// System includes
-#include <HbListView>
-#include <HbAction>
-#include <HbAbstractViewItem>
-#include <HbMenu>
-#include <HbMessageBox>
-
-// User includes
-#include "radiohistoryview.h"
-#include "radiowindow.h"
-#include "radiologger.h"
-#include "radiouiloader.h"
-#include "radiouiengine.h"
-#include "radiohistorymodel.h"
-#include "radiohistoryitem.h"
-
-// BEGIN TEMPORARY TEST CODE CODE
-#include <QTimer>
-#include "radiostationmodel.h"
-
-struct Song
-{
-    const char* mArtist;
-    const char* mTitle;
-};
-const Song KRecognizedSongs[] = {
-    { "Red Hot Chili Peppers", "Under The Bridge" },
-    { "Queens Of The Stone Age", "No One Knows" },
-    { "The Presidents of the United States of America", "Dune Buggy" },
-    { "System of a Down", "Aerials" },
-    { "The White Stripes", "Seven Nation Army" },
-    { "Alice In Chains", "When The Sun Rose Again" },
-    { "Bullet For My Valentine", "Tears Don't Fall" }
-};
-const int KSongsCount = sizeof( KRecognizedSongs ) / sizeof( KRecognizedSongs[0] );
-// END TEMPORARY TEST CODE CODE
-
-/*!
- *
- */
-RadioHistoryView::RadioHistoryView() :
-    RadioViewBase(),
-    mHistoryList( 0 ),
-    mAllSongsButton( 0 ),
-    mTaggedSongsButton( 0 ),
-    mSelectedItem( new RadioHistoryItem() ),
-    mCurrentRow( -1 ),
-    mSongIndex( 0 )
-{
-}
-
-/*!
- *
- */
-RadioHistoryView::~RadioHistoryView()
-{
-}
-
-/*!
- *
- */
-void RadioHistoryView::setNonTaggedIcon( const HbIcon& nonTaggedIcon )
-{
-    mNonTaggedIcon = nonTaggedIcon;
-    mNonTaggedIcon.setColor( Qt::white );
-}
-
-/*!
- *
- */
-HbIcon RadioHistoryView::nonTaggedIcon() const
-{
-    return mNonTaggedIcon;
-}
-
-/*!
- *
- */
-void RadioHistoryView::setTaggedIcon( const HbIcon& taggedIcon )
-{
-    mTaggedIcon = taggedIcon;
-}
-
-/*!
- *
- */
-HbIcon RadioHistoryView::taggedIcon() const
-{
-    return mTaggedIcon;
-}
-
-/*!
- * Private slot
- *
- */
-void RadioHistoryView::updateViewMode()
-{
-    QString section = DOCML::HV_SECTION_HISTORY_MODE;
-    bool showTagged = false;
-
-    if ( sender() == mTaggedSongsButton ) {
-        section = DOCML::HV_SECTION_FAVORITE_MODE;
-        showTagged = true;
-    }
-
-    loadSection( DOCML::FILE_HISTORYVIEW, section );
-    historyModel().setShowTagged( showTagged );
-
-    updateVisibilities();
-}
-
-/*!
- * Private slot
- *
- */
-void RadioHistoryView::clearList()
-{
-    const bool showingTagged = mTaggedSongsButton->isChecked();
-    askQuestion( hbTrId( showingTagged ? "txt_rad_info_clear_tagged_songs_list" :
-                                         "txt_rad_info_clear_recently_played_songs_list" ) );
-}
-
-/*!
- * Private slot
- *
- */
-void RadioHistoryView::updateVisibilities()
-{
-    const int itemCount = mUiEngine->historyModel().rowCount();
-    loadSection( DOCML::FILE_HISTORYVIEW, itemCount ? DOCML::HV_SECTION_SHOW_LIST : DOCML::HV_SECTION_HIDE_LIST );
-}
-
-/*!
- * Private slot
- *
- */
-void RadioHistoryView::showContextMenu( const QModelIndex& index )
-{
-    *mSelectedItem = historyModel().itemAtIndex( index );
-    mCurrentRow = index.row();
-
-    HbMenu* menu = mUiLoader->findObject<HbMenu>( DOCML::HV_NAME_CONTEXT_MENU );
-
-    if ( HbAction* tagAction = mUiLoader->findObject<HbAction>( DOCML::HV_NAME_CONTEXT_TAG ) ) {
-        if ( mSelectedItem->isTagged() ) {
-            tagAction->setText( hbTrId( "txt_rad_menu_remove_tag" ) );
-        } else {
-            tagAction->setText( hbTrId( "txt_rad_menu_tag_song" ) );
-        }
-    }
-
-    if ( HbAction* searchAction = mUiLoader->findObject<HbAction>( DOCML::HV_NAME_CONTEXT_SEARCH ) ) {
-        //TODO: Add support for other music store
-        searchAction->setVisible( false );
-    }
-
-    HbAbstractViewItem* item =  mHistoryList->itemByIndex( index );
-    QPointF coords = item->pos();
-    coords.setY( mHistoryList->contentWidget()->pos().y() + coords.y() );
-    menu->setPreferredPos( QPointF( size().width() / 2 - menu->size().width() / 2, coords.y() + menu->size().height() / 2 ) );
-
-    menu->show();
-}
-
-/*!
- * Private slot
- *
- */
-void RadioHistoryView::handleLongPress( HbAbstractViewItem* item )
-{
-    showContextMenu( item->modelIndex() );
-}
-
-/*!
- * Private slot
- *
- */
-void RadioHistoryView::toggleTagging()
-{
-    historyModel().toggleTagging( *mSelectedItem, mCurrentRow );
-    mSelectedItem->reset();
-    mCurrentRow = -1;
-    updateVisibilities();
-}
-
-/*!
- * Private slot
- *
- */
-void RadioHistoryView::openOviStore()
-{
-    QString msg = "To be implemented: Open ovi store. Artist: %1, Title: %2";
-    HbMessageBox::information( msg.arg( mSelectedItem->artist() ).arg( mSelectedItem->title() ) );
-    mUiEngine->openMusicStore( *mSelectedItem );
-}
-
-/*!
- * Private slot
- *
- */
-void RadioHistoryView::openOtherStore()
-{
-    mUiEngine->openMusicStore( *mSelectedItem, RadioUiEngine::OtherStore );
-}
-
-/*!
- * Private slot
- * TEMPORARY TEST CODE
- */
-void RadioHistoryView::addSongs()
-{
-    for ( int i = 0; i < KSongsCount; ++i ) {
-        QTimer::singleShot( 1000 + i * 1500, this, SLOT(addOneSong()) );
-    }
-}
-
-/*!
- * Private slot
- * TEMPORARY TEST CODE
- */
-void RadioHistoryView::addOneSong()
-{
-    Song song = KRecognizedSongs[mSongIndex++];
-    mSongIndex %= KSongsCount;
-
-    RadioStation station = mUiEngine->stationModel().currentStation();
-    mUiEngine->historyModel().addItem( song.mArtist, song.mTitle, station );
-}
-
-/*!
- * \reimp
- *
- */
-void RadioHistoryView::init()
-{
-    LOG_METHOD;
-    loadSection( DOCML::FILE_HISTORYVIEW, DOCML::SECTION_LAZY_LOAD );
-
-    RadioHistoryModel* historyModel = &mUiEngine->historyModel();
-    historyModel->setShowDetails( mOrientation == Qt::Horizontal );
-
-    if ( !mNonTaggedIcon.isNull() && !mTaggedIcon.isNull() ) {
-        historyModel->setIcons( mNonTaggedIcon.qicon(), mTaggedIcon.qicon() );
-    }
-
-    mHistoryList = mUiLoader->findObject<HbListView>( DOCML::HV_NAME_HISTORY_LIST );
-    mHistoryList->setScrollingStyle( HbListView::PanOrFlick );
-    mHistoryList->setModel( historyModel );
-    mHistoryList->setSelectionMode( HbListView::NoSelection );
-    mHistoryList->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
-    //TODO: Uncomment after MCL wk28 release to improve scrolling FPS rate
-    //mHistoryList->setItemPixmapCacheEnabled( true );
-
-    mAllSongsButton = mUiLoader->findObject<HbAction>( DOCML::HV_NAME_ALL_SONGS_BUTTON );
-    mTaggedSongsButton = mUiLoader->findObject<HbAction>( DOCML::HV_NAME_TAGGED_SONGS_BUTTON );
-
-    if ( HbAction* clearListAction = mUiLoader->findObject<HbAction>( DOCML::HV_NAME_CLEAR_LIST_ACTION ) ) {
-        Radio::connect( clearListAction,    SIGNAL(triggered()),
-                        this,               SLOT(clearList()) );
-    }
-
-    Radio::connect( mTaggedSongsButton,     SIGNAL(triggered()),
-                    this,                   SLOT(updateViewMode()) );
-    Radio::connect( mAllSongsButton,        SIGNAL(triggered()),
-                    this,                   SLOT(updateViewMode()) );
-    Radio::connect( historyModel,           SIGNAL(itemAdded()),
-                    this,                   SLOT(updateVisibilities()) );
-    Radio::connect( mHistoryList,           SIGNAL(activated(QModelIndex)),
-                    this,                   SLOT(showContextMenu(QModelIndex)) );
-    Radio::connect( mHistoryList,           SIGNAL(longPressed(HbAbstractViewItem*,QPointF)),
-                    this,                   SLOT(handleLongPress(HbAbstractViewItem*)) );
-
-    connectCommonMenuItem( MenuItem::Exit );
-    connectCommonMenuItem( MenuItem::UseLoudspeaker );
-
-    // Context menu actions
-    connectXmlElement( DOCML::HV_NAME_TOGGLE_TAG_ACTION,    SIGNAL(triggered()),
-                       this,                                SLOT(toggleTagging()) );
-    connectXmlElement( DOCML::HV_NAME_OVI_STORE_ACTION,     SIGNAL(triggered()),
-                       this,                                SLOT(openOviStore()) );
-    connectXmlElement( DOCML::HV_NAME_OTHER_STORE_ACTION,   SIGNAL(triggered()),
-                       this,                                SLOT(openOtherStore()) );
-    initBackAction();
-
-    updateViewMode();
-
-    // BEGIN TEMPORARY TEST CODE
-    if ( HbAction* addSongsAction = mUiLoader->findObject<HbAction>( "hv:add_songs_action" ) ) {
-        Radio::connect( addSongsAction,     SIGNAL(triggered()),
-                        this,               SLOT(addSongs()) );
-    }
-    // END TEMPORARY TEST CODE
-}
-
-/*!
- * \reimp
- *
- */
-void RadioHistoryView::setOrientation()
-{
-    if ( mUiEngine ) {
-        RadioHistoryModel& model = mUiEngine->historyModel();
-        model.setShowDetails( mOrientation == Qt::Horizontal );
-    }
-}
-
-/*!
- * \reimp
- *
- */
-void RadioHistoryView::userAccepted()
-{
-    const bool removeTagged = mTaggedSongsButton->isChecked();
-    mUiEngine->historyModel().removeAll( removeTagged );
-    updateVisibilities();
-}
-
-/*!
- *
- */
-RadioHistoryModel& RadioHistoryView::historyModel() const
-{
-    return *static_cast<RadioHistoryModel*>( mHistoryList->model() );
-}
--- a/radioapp/radiowidgets/src/radiomainview.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,491 +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:
-*
-*/
-
-// System includes
-#include <QTimer>
-#include <HbPushButton>
-#include <HbAction>
-#include <HbMenu>
-#include <HbApplication>
-#include <HbActivityManager>
-#include <QPixmap>
-#include <HbLabel>
-#include <HbFrameItem>          // Temporarily here until docml supports frame items
-
-// User includes
-#include "radiowindow.h"
-#include "radiomainview.h"
-#include "radiofrequencystrip.h"
-#include "radiouiengine.h"
-#include "radiologger.h"
-#include "radiostationcarousel.h"
-#include "radiouiloader.h"
-#include "radioutil.h"
-#include "radiostationmodel.h"
-#include "radiofrequencyscanner.h"
-
-// Constants
-const QLatin1String RADIO_MAINVIEW_ACTIVITY_ID( "FMRadioMainView" );
-
-/*!
- * Temporary convenience function to set frame background until DOCML supports frame items
- */
-static void initFrameBackground( RadioUiLoader& uiLoader,
-                                 const QString backgroundName,
-                                 HbFrameDrawer::FrameType frameType )
-{
-    if ( HbLabel* backgroundLabel = uiLoader.findObject<HbLabel>( backgroundName ) ) {
-        QString backgroundName = backgroundLabel->icon().iconName();
-        HbFrameItem* frameItem = new HbFrameItem( backgroundName, frameType, backgroundLabel );
-        backgroundLabel->setBackgroundItem( frameItem );
-    }
-}
-
-
-/*!
- *
- */
-RadioMainView::RadioMainView() :
-    RadioViewBase( false ),
-    mCarousel( NULL ),
-    mFrequencyStrip( NULL ),
-    mSkippingAction( NULL ),
-    mAlternateSkipping( false )
-{
-}
-
-/*!
- *
- */
-RadioMainView::~RadioMainView()
-{
-}
-
-/*!
- * \reimp
- *
- */
-void RadioMainView::setScanningMode( bool scanning )
-{
-    if ( scanning ) {
-        loadSection( DOCML::FILE_MAINVIEW, DOCML::MV_SECTION_SCANNING );
-    } else {
-        loadSection( DOCML::FILE_MAINVIEW, DOCML::MV_SECTION_NORMAL );
-        updateFavoriteButton();
-        mFrequencyScanner.take();
-
-        const bool firsTimeStart = mUiEngine->isFirstTimeStart();
-        const int rowCount = mUiEngine->stationModel().rowCount();
-        if ( firsTimeStart && rowCount != 0 ) {
-            mUiEngine->setFirstTimeStartPerformed( true );
-        }
-    }
-}
-
-/*!
- * \reimp
- *
- */
-void RadioMainView::preLazyLoadInit()
-{
-    initFrameBackground( *mUiLoader, DOCML::MV_NAME_FREQUENCY_BACKGROUND, HbFrameDrawer::NinePieces );
-
-    initFrameBackground( *mUiLoader, DOCML::MV_NAME_CAROUSEL_BACKGROUND, HbFrameDrawer::NinePieces );
-}
-
-/*!
- * \reimp
- *
- */
-void RadioMainView::init()
-{
-    LOG_METHOD;
-    loadSection( DOCML::FILE_MAINVIEW, DOCML::SECTION_LAZY_LOAD );
-    initFrameBackground( *mUiLoader, DOCML::MV_NAME_CAROUSEL_OVERLAY, HbFrameDrawer::NinePieces );
-
-    mCarousel = mUiLoader->findObject<RadioStationCarousel>( DOCML::MV_NAME_STATION_CAROUSEL );
-    mCarousel->init( *mUiLoader, mUiEngine.data() );
-    mCarousel->setLandscape( mMainWindow->orientation() == Qt::Horizontal );
-
-    mFrequencyStrip = mUiLoader->findObject<RadioFrequencyStrip>( DOCML::MV_NAME_FREQUENCY_STRIP );
-    mFrequencyStrip->init( mUiEngine.data(), *mUiLoader );
-
-    RadioStationModel* stationModel = &mUiEngine->stationModel();
-
-    Radio::connect( mFrequencyStrip,            SIGNAL(frequencyChanged(uint,int,int)),
-                    this,                       SLOT(setFrequencyFromWidget(uint,int,int)) );
-    Radio::connect( mCarousel,                  SIGNAL(frequencyChanged(uint,int,int)),
-                    this,                       SLOT(setFrequencyFromWidget(uint,int,int)) );
-    Radio::connect( mUiEngine.data(),           SIGNAL(tunedToFrequency(uint,int)),
-                    this,                       SLOT(setFrequencyFromEngine(uint,int)) );
-    Radio::connect( mFrequencyStrip,            SIGNAL(manualSeekChanged(bool)),
-                    this,                       SLOT(setManualSeekMode(bool)) );
-
-    Radio::connect( mFrequencyStrip,            SIGNAL(skipRequested(int)),
-                    this,                       SLOT(skip(int)) );
-    Radio::connect( mCarousel,                  SIGNAL(skipRequested(int)),
-                    this,                       SLOT(skip(int)) );
-    Radio::connect( mFrequencyStrip,            SIGNAL(seekRequested(int)),
-                    mUiEngine.data(),           SLOT(seekStation(int)) );
-
-    Radio::connect( mUiEngine.data(),           SIGNAL(seekingStarted(int)),
-                    this,                       SLOT(seekingStarted()) );
-    Radio::connect( mUiEngine.data(),           SIGNAL(antennaStatusChanged(bool)),
-                    this,                       SLOT(updateAntennaStatus(bool)) );
-    Radio::connect( mUiEngine.data(),           SIGNAL(audioRouteChanged(bool)),
-                    this,                       SLOT(updateAudioRoute(bool)) );
-
-    Radio::connect( stationModel,               SIGNAL(favoriteChanged(RadioStation)),
-                    this,                       SLOT(handleFavoriteChange(RadioStation)) );
-
-    connectXmlElement( DOCML::MV_NAME_STATIONS_BUTTON,  SIGNAL(clicked()),
-                       mMainWindow,                     SLOT(activateStationsView()) );
-
-    connectXmlElement( DOCML::MV_NAME_FAVORITE_BUTTON,  SIGNAL(clicked()),
-                       this,                            SLOT(toggleFavorite()) );
-
-    connectXmlElement( DOCML::MV_NAME_SPEAKER_BUTTON,   SIGNAL(clicked()),
-                       mUiEngine.data(),                SLOT(toggleAudioRoute()) );
-
-    connectXmlElement( DOCML::MV_NAME_SCAN_ACTION,      SIGNAL(triggered()),
-                       this,                            SLOT(toggleScanning()) );
-
-    updateFavoriteButton();
-
-    connectCommonMenuItem( MenuItem::Exit );
-
-    // "Play history" menu item
-    connectViewChangeMenuItem( DOCML::MV_NAME_HISTORYVIEW_ACTION, SLOT(activateHistoryView()) );
-
-    updateAudioRoute( mUiEngine->isUsingLoudspeaker() );
-
-    // Add "back" navigation action to put the application to background
-    HbAction* backAction = new HbAction( Hb::BackNaviAction, this );
-#ifdef BUILD_WIN32
-    Radio::connect( backAction,     SIGNAL(triggered()),
-                    this,           SLOT(quit()) );
-#else
-    Radio::connect( backAction,     SIGNAL(triggered()),
-                    mMainWindow,    SLOT(lower()) );
-#endif // BUILD_WIN32
-    setNavigationAction( backAction );
-
-    const bool firsTimeStart = mUiEngine->isFirstTimeStart();
-    const int rowCount = mUiEngine->stationModel().rowCount();
-
-   if ( firsTimeStart && rowCount == 0 ){
-            QTimer::singleShot( 4500, this, SLOT(startFirstTimeScanning()) );
-        }
-
-
-    Radio::connect( static_cast<HbApplication*>( qApp ),    SIGNAL(aboutToQuit()),
-                    this,                                   SLOT(saveActivity()) );
-
-    emit applicationReady();
-}
-
-/*!
- * \reimp
- *
- */
-void RadioMainView::setOrientation()
-{
-    loadSection( DOCML::FILE_MAINVIEW, mMainWindow->orientationSection() );
-    if ( mCarousel && mFrequencyStrip ) {
-        mCarousel->setFrequency( mFrequencyStrip->frequency(), TuneReason::Unspecified );
-        mCarousel->setLandscape( mMainWindow->orientation() == Qt::Horizontal );
-    }
-}
-
-/*!
- * \reimp
- *
- */
-void RadioMainView::userAccepted()
-{
-    mFrequencyScanner.reset( new RadioFrequencyScanner( *mUiEngine, this ) );
-    mFrequencyScanner->startScanning();
-}
-
-/*!
- * \reimp
- *
- */
-bool RadioMainView::eventFilter( QObject* watched, QEvent* event )
-{
-    if ( event->type() == QEvent::ApplicationDeactivate ) {
-        mFrequencyStrip->cancelManualSeek();
-    }
-
-    return RadioViewBase::eventFilter( watched, event );
-}
-
-/*!
- * Private slot
- */
-void RadioMainView::setFrequencyFromWidget( uint frequency, int reason, int direction )
-{
-//    LOG_FORMAT( "RadioMainView::setFrequencyFromWidget: %u, reason = %d", frequency, reason );
-    if ( !RadioUtil::isScannerAlive() ) {
-        if ( reason == TuneReason::FrequencyStrip ) {
-//            mCarousel->setFrequency( frequency, reason, direction );
-//            mUiEngine->tuneWithDelay( frequency, reason );
-        } else if ( reason == TuneReason::ManualSeekUpdate ) {
-            mCarousel->setFrequency( frequency, reason, RadioUtil::scrollDirection( direction ) );
-        } else if ( reason == TuneReason::ManualSeekTune ) {
-            LOG_FORMAT( "--------Manual seek tune: %u", frequency );
-            mUiEngine->setFrequency( frequency, reason );
-        } else if ( reason == TuneReason::StationCarousel ) {
-            mFrequencyStrip->setFrequency( frequency, reason, RadioUtil::scrollDirection( direction ) );
-            mUiEngine->setFrequency( frequency, reason );
-        }
-    }
-}
-
-/*!
- * Private slot
- */
-void RadioMainView::setFrequencyFromEngine( uint frequency, int reason )
-{
-    LOG_FORMAT( "RadioMainView::setFrequencyFromEngine reason: %d", reason );
-    if ( RadioUtil::scanStatus() != Scan::ScanningInMainView && !mFrequencyStrip->isInManualSeekMode() ) {
-        mCarousel->clearInfoText();
-        updateFavoriteButton();
-        if ( reason != TuneReason::FrequencyStrip &&
-             reason != TuneReason::StationCarousel &&
-             reason != TuneReason::Skip ) {
-            mCarousel->setFrequency( frequency, reason, Scroll::Shortest );
-            mFrequencyStrip->setFrequency( frequency, reason, Scroll::Shortest );
-        }
-    }
-}
-
-/*!
- * Private slot
- */
-void RadioMainView::skip( int skipMode )
-{
-//    if ( !mAlternateSkipping && ( skipMode == StationSkip::PreviousFavorite || skipMode == StationSkip::NextFavorite ) &&
-//        mUiEngine->stationModel().favoriteCount() == 0 ) {
-//        mCarousel->setInfoText( CarouselInfoText::NoFavorites );
-//    } else {
-        const uint currentFrequency = mFrequencyStrip->frequency();
-        RadioStation station;
-        mUiEngine->stationModel().findFrequency( currentFrequency, station );
-
-        if ( mAlternateSkipping ) { //TODO: Remove. Temporary test code
-            if ( sender() == mFrequencyStrip ) {
-                if ( skipMode == StationSkip::NextFavorite ) {
-                    skipMode = StationSkip::Next;
-                } else if ( skipMode == StationSkip::PreviousFavorite ) {
-                    skipMode = StationSkip::Previous;
-                }
-            } else if ( sender() == mCarousel ) {
-                if ( skipMode == StationSkip::Next ) {
-                    skipMode = StationSkip::NextFavorite;
-                } else if ( skipMode == StationSkip::Previous ) {
-                    skipMode = StationSkip::PreviousFavorite;
-                }
-            }
-        }
-
-        const uint frequency = mUiEngine->skipStation( static_cast<StationSkip::Mode>( skipMode ),
-                                                                currentFrequency);
-
-        if ( currentFrequency != frequency || station.isFavorite() ) {
-            const Scroll::Direction direction = RadioUtil::scrollDirectionFromSkipMode( skipMode );
-            mCarousel->setFrequency( frequency, TuneReason::Skip, direction );
-            mFrequencyStrip->setFrequency( frequency, TuneReason::Skip, direction );
-        }
-//    }
-}
-
-/*!
- * Private slot
- */
-void RadioMainView::openStationsView()
-{
-    mFrequencyStrip->cancelManualSeek();
-    mMainWindow->activateStationsView();
-}
-
-/*!
- * Private slot
- */
-void RadioMainView::startFirstTimeScanning()
-{
-    if ( mUiEngine->isAntennaAttached() ){
-        QTimer::singleShot( 100, this, SLOT(toggleScanning()) );
-    }
-}
-
-/*!
- * Private slot
- */
-void RadioMainView::toggleScanning()
-{
-    mFrequencyStrip->cancelManualSeek();
-    if ( mFrequencyScanner ) {
-        mFrequencyScanner->cancelScanning();
-    } else {
-        const int rowCount =  mUiEngine->stationModel().rowCount();
-        if ( rowCount > 0 ) {
-            askQuestion( hbTrId( "txt_rad_info_all_stations_in_stations_list_will_be" ) );
-        } else {
-            userAccepted();
-        }
-    }
-}
-
-/*!
- * Private slot
- */
-void RadioMainView::toggleFavorite()
-{
-    if ( RadioUtil::isScannerAlive() ) {
-        toggleScanning();
-    } else {
-        mUiEngine->stationModel().setData( QModelIndex(), mFrequencyStrip->frequency(), RadioRole::ToggleFavoriteRole );
-    }
-}
-
-/*!
- * Private slot
- */
-void RadioMainView::seekingStarted()
-{
-    if ( !RadioUtil::isScannerAlive() ) {
-        mCarousel->setInfoText( CarouselInfoText::Seeking );
-    }
-}
-
-/*!
- * Private slot
- */
-void RadioMainView::updateAntennaStatus( bool connected )
-{
-    if ( !connected ) {
-        mFrequencyStrip->cancelManualSeek();
-    }
-
-    HbAction* scanAction = mUiLoader->findObject<HbAction>( DOCML::MV_NAME_SCAN_ACTION );
-    scanAction->setEnabled( connected );
-    mCarousel->updateAntennaStatus( connected );
-    const bool firsTimeStart = mUiEngine->isFirstTimeStart();
-    const int rowCount = mUiEngine->stationModel().rowCount();
-    if ( firsTimeStart && rowCount == 0 && connected ){
-            QTimer::singleShot( 100, this, SLOT(toggleScanning()) );
-        }
-}
-
-/*!
- * Private slot
- */
-void RadioMainView::updateAudioRoute( bool loudspeaker )
-{
-    HbPushButton* loudspeakerButton = mUiLoader->findWidget<HbPushButton>( DOCML::MV_NAME_SPEAKER_BUTTON );
-    if ( loudspeaker ) {
-        loudspeakerButton->setIcon( HbIcon( "qtg_mono_speaker_off" ) );
-        loudspeakerButton->setText( hbTrId( "txt_rad_button_deactivate_loudspeaker" ) );
-    } else {
-        loudspeakerButton->setIcon( HbIcon( "qtg_mono_speaker" ) );
-        loudspeakerButton->setText( hbTrId( "txt_rad_button_activate_loudspeaker" ) );
-    }
-}
-
-/*!
- * Private slot
- */
-void RadioMainView::setManualSeekMode( bool manualSeekActive )
-{
-    if ( manualSeekActive ) {
-        qApp->installEventFilter( this );
-
-        mUiLoader->findWidget<HbPushButton>( DOCML::MV_NAME_FAVORITE_BUTTON )->setText( hbTrId( "txt_rad_button_add_to_favourites" ) );
-    } else {
-        qApp->removeEventFilter( this );
-
-        updateFavoriteButton();
-    }
-
-    mUiEngine->setManualSeekMode( manualSeekActive );
-
-    mCarousel->setManualSeekMode( manualSeekActive );
-}
-
-/*!
- * Private slot
- */
-void RadioMainView::handleFavoriteChange( const RadioStation& station )
-{
-    mFrequencyStrip->updateFavorite( station.frequency() );
-    updateFavoriteButton();
-}
-
-/*!
- * Private slot
- */
-void RadioMainView::saveActivity()
-{
-    HbActivityManager* activityManager = qobject_cast<HbApplication*>(qApp)->activityManager();
-
-    // Get a screenshot for saving to the activity manager
-    QSize screenShotSize = mCarousel->size().toSize();
-    QPixmap screenShot( screenShotSize );
-    QPainter painter( &screenShot );
-
-    // Draw the background and overlay
-    HbLabel* backgroundLabel = mUiLoader->findWidget<HbLabel>( DOCML::MV_NAME_CAROUSEL_BACKGROUND );
-    painter.drawPixmap( 0, 0, backgroundLabel->icon().pixmap().scaled( screenShotSize ) );
-    backgroundLabel = mUiLoader->findWidget<HbLabel>( DOCML::MV_NAME_CAROUSEL_OVERLAY );
-    painter.drawPixmap( 0, 0, backgroundLabel->icon().pixmap().scaled( screenShotSize ) );
-
-    mCarousel->drawOffScreen( painter );
-
-    QVariantHash metadata;
-    metadata.insert( "screenshot", screenShot );
-
-    #ifdef __WINS__
-        screenShot.save( "c:\\radio.bmp" );
-    #elif defined BUILD_WIN32
-        screenShot.save( "radio.bmp" );
-    #endif
-
-    // Update the activity to the activity manager
-    bool ok = activityManager->removeActivity( RADIO_MAINVIEW_ACTIVITY_ID );
-    LOG_ASSERT( ok, LOG( "Failed to remove old activity from Activity Manager!" ) );
-    ok = activityManager->addActivity( RADIO_MAINVIEW_ACTIVITY_ID, QVariant(), metadata );
-    LOG_ASSERT( ok, LOG( "Failed to update activity to Activity Manager!" ) );
-}
-
-/*!
- *
- */
-void RadioMainView::updateFavoriteButton()
-{
-    RadioStation station;
-    RadioStationModel& model = mUiEngine->stationModel();
-    model.findFrequency( mUiEngine->currentFrequency(), station );
-    HbPushButton* favoriteButton = mUiLoader->findWidget<HbPushButton>( DOCML::MV_NAME_FAVORITE_BUTTON );
-    if ( station.isFavorite() ) {
-        favoriteButton->setText( hbTrId( "txt_fmradio_button_remove_from_favourites" ) );
-        favoriteButton->setIcon( HbIcon( "qtg_mono_favourites_remove" ) );
-    } else {
-        favoriteButton->setText( hbTrId( "txt_rad_button_add_to_favourites" ) );
-        favoriteButton->setIcon( HbIcon( "qtg_mono_add_to_favourites" ) );
-    }
-}
--- a/radioapp/radiowidgets/src/radiostationcarousel.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,950 +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:
-*
-*/
-
-// System includes
-#include <QGraphicsLinearLayout>
-#include <QGraphicsSceneResizeEvent>
-#include <QTimer>
-#include <HbPanGesture>
-#include <HbSwipeGesture>
-#include <HbFontSpec>
-#include <HbMenu>
-#include <QPainter>
-
-// User includes
-#include "radiostationcarousel.h"
-#include "radiocarouselanimator.h"
-#include "radiouiloader.h"
-#include "radiocarouselitem.h"
-#include "radiostation.h"
-#include "radiouiengine.h"
-#include "radiostationmodel.h"
-#include "radiofadinglabel.h"
-#include "radiologger.h"
-#include "radioutil.h"
-#include "radio_global.h"
-
-// Constants
-const int RTPLUS_CHECK_TIMEOUT = 700;
-const int INFOTEXT_NOFAVORITES_TIMEOUT = 5000;
-const int SET_FREQUENCY_TIMEOUT = 500;
-const int FAVORITE_HINT_SHOW_DELAY = 1000;
-const int FAVORITE_HINT_HIDE_DELAY = 2000;
-
-// Matti testing constants
-const QLatin1String LEFT_ITEM_NAME      ( "carousel_left" );
-const QLatin1String CENTER_ITEM_NAME    ( "carousel_center" );
-const QLatin1String RIGHT_ITEM_NAME     ( "carousel_right" );
-
-#ifdef BUILD_WIN32
-#   define SCROLLBAR_POLICY ScrollBarAlwaysOn
-#else
-#   define SCROLLBAR_POLICY ScrollBarAlwaysOff
-#endif // BUILD_WIN32
-
-#define CALL_TO_ALL_ITEMS( expr ) \
-    mItems[LeftItem]->expr; \
-    mItems[CenterItem]->expr; \
-    mItems[RightItem]->expr;
-
-/*!
- *
- */
-RadioStationCarousel::RadioStationCarousel( QGraphicsItem* parent ) :
-    HbScrollArea( parent ),
-    mUiEngine( NULL ),
-    mAutoScrollTime( 300 ),
-    mGenericTimer( new QTimer( this ) ),
-    mTimerMode( NoTimer ),
-    mInfoText( NULL ),
-    mRadiotextPopup( NULL ),
-    mContainer( new HbWidget( this ) ),
-    mMidScrollPos( 0 ),
-    mMaxScrollPos( 0 ),
-    mCurrentIndex( 0 ),
-    mTargetIndex( -1 ),
-    mIsCustomFreq( false ),
-    mInfoTextType( CarouselInfoText::None ),
-    mModel( NULL ),
-    mPosAdjustmentDisabled( false ),
-    mScrollDirection( Scroll::Shortest ),
-    mManualSeekMode( false )
-#ifdef USE_DEBUGGING_CONTROLS
-    ,mRdsLabel( new RadioFadingLabel( this ) )
-#endif // USE_DEBUGGING_CONTROLS
-{
-}
-
-/*!
- * Property
- *
- */
-void RadioStationCarousel::setFavoriteIcon( const HbIcon& favoriteIcon )
-{
-    mFavoriteIcon = favoriteIcon;
-}
-
-/*!
- * Property
- *
- */
-HbIcon RadioStationCarousel::favoriteIcon() const
-{
-    return mFavoriteIcon;
-}
-
-/*!
- * Property
- *
- */
-void RadioStationCarousel::setNonFavoriteIcon( const HbIcon& nonFavoriteIcon )
-{
-    mNonFavoriteIcon = nonFavoriteIcon;
-}
-
-/*!
- * Property
- *
- */
-HbIcon RadioStationCarousel::nonFavoriteIcon() const
-{
-    return mNonFavoriteIcon;
-}
-
-/*!
- *
- */
-void RadioStationCarousel::setAutoScrollTime( const int time )
-{
-    mAutoScrollTime = time;
-}
-
-/*!
- *
- */
-int RadioStationCarousel::autoScrollTime() const
-{
-    return mAutoScrollTime;
-}
-
-/*!
- *
- */
-void RadioStationCarousel::init( RadioUiLoader& uiLoader, RadioUiEngine* uiEngine )
-{
-    mUiEngine = uiEngine;
-    RadioUtil::setCarousel( this );
-
-    mItems[CenterItem] = new RadioCarouselItem( *this, this, true );
-    mItems[LeftItem] = new RadioCarouselItem( *this, this );
-    mItems[RightItem] = new RadioCarouselItem( *this, this );
-
-    // Matti testing needs the objects to have names
-    mItems[LeftItem]->setObjectName( LEFT_ITEM_NAME );
-    mItems[CenterItem]->setObjectName( CENTER_ITEM_NAME );
-    mItems[RightItem]->setObjectName( RIGHT_ITEM_NAME );
-
-    QGraphicsLinearLayout* layout = new QGraphicsLinearLayout( Qt::Horizontal );
-    layout->setContentsMargins( 0, 0, 0, 0 );
-    layout->setSpacing( 0 );
-    layout->addItem( mItems[LeftItem] );
-    layout->addItem( mItems[CenterItem] );
-    layout->addItem( mItems[RightItem] );
-    mContainer->setLayout( layout );
-    setContentWidget( mContainer );
-
-    setClampingStyle( HbScrollArea::NoClamping );
-    setScrollDirections( Qt::Horizontal );
-
-    setFrictionEnabled( true );
-    setHorizontalScrollBarPolicy( HbScrollArea::SCROLLBAR_POLICY );
-    setVerticalScrollBarPolicy( HbScrollArea::ScrollBarAlwaysOff );
-
-    mInfoText = uiLoader.findWidget<HbLabel>( DOCML::MV_NAME_INFO_TEXT );
-    mInfoText->setTextWrapping( Hb::TextWordWrap );
-
-    mRadiotextPopup = uiLoader.findObject<HbMenu>( DOCML::MV_NAME_CAROUSEL_RT_MENU );
-
-#ifdef BUILD_WIN32
-    HbFontSpec spec = mInfoText->fontSpec();
-    spec.setRole( HbFontSpec::Secondary );
-    mInfoText->setFontSpec( spec );
-#endif
-
-    setScrollDirections( Qt::Horizontal );
-
-    Radio::connect( this,           SIGNAL(scrollingEnded()),
-                    this,           SLOT(adjustAfterScroll()) );
-
-    mModel = &mUiEngine->stationModel();
-    Radio::connect( mModel,         SIGNAL(favoriteChanged(RadioStation)),
-                    this,           SLOT(update(RadioStation)) );
-    Radio::connect( mModel,         SIGNAL(stationDataChanged(RadioStation)),
-                    this,           SLOT(update(RadioStation)));
-    Radio::connect( mModel,         SIGNAL(radioTextReceived(RadioStation)),
-                    this,           SLOT(updateRadioText(RadioStation)));
-    Radio::connect( mModel,         SIGNAL(dynamicPsChanged(RadioStation)),
-                    this,           SLOT(update(RadioStation)));
-
-    mGenericTimer->setSingleShot( true );
-    Radio::connect( mGenericTimer,  SIGNAL(timeout()),
-                    this,           SLOT(timerFired()));
-
-    Radio::connect( mModel,         SIGNAL(rowsInserted(QModelIndex,int,int)),
-                    this,           SLOT(updateStations()) );
-    Radio::connect( mModel,         SIGNAL(modelReset()),
-                    this,           SLOT(updateStations()) );
-    Radio::connect( mModel,         SIGNAL(rowsRemoved(QModelIndex,int,int)),
-                    this,           SLOT(updateStations()) );
-
-    setFrequency( mUiEngine->currentFrequency(), TuneReason::Unspecified );
-
-#ifdef USE_DEBUGGING_CONTROLS
-    mRdsLabel->setPos( QPoint( 300, 10 ) );
-    mRdsLabel->setText( "RDS" );
-    mRdsLabel->setElideMode( Qt::ElideNone );
-    HbFontSpec spec = mRdsLabel->fontSpec();
-    spec.setTextPaneHeight( 10 );
-    spec.setRole( HbFontSpec::Secondary );
-    mRdsLabel->setFontSpec( spec );
-    mRdsLabel->setTextColor( Qt::gray );
-    if ( mUiEngine ) {
-        Radio::connect( mUiEngine,      SIGNAL(rdsAvailabilityChanged(bool)),
-                        this,           SLOT(setRdsAvailable(bool)) );
-    }
-#endif // USE_DEBUGGING_CONTROLS
-}
-
-/*!
- *
- */
-void RadioStationCarousel::setFrequency( uint frequency, int reason, Scroll::Direction direction )
-{
-    if ( mModel ) {
-        if ( !mManualSeekMode ) {
-
-            if ( mModel->rowCount() <= 1 ) {
-                mItems[LeftItem]->setStation( RadioStation() );
-                mItems[RightItem]->setStation( RadioStation() );
-            }
-
-            mIsCustomFreq = false;
-            if ( reason == TuneReason::Skip || reason == TuneReason::StationScanFinalize ) {
-                const int newIndex = mModel->indexFromFrequency( frequency );
-                scrollToIndex( newIndex, direction, NoSignal );
-                mCurrentIndex = newIndex;
-            } else {
-                if ( mModel->contains( frequency ) ) {
-                    mCurrentIndex = mModel->indexFromFrequency( frequency );
-                } else {
-                    const RadioStation prevStation = mModel->findClosest( frequency, StationSkip::Previous );
-                    if ( prevStation.isValid() ) {
-                        mCurrentIndex = mModel->indexFromFrequency( prevStation.frequency() );
-                    } else {
-                        mCurrentIndex = -1;
-                    }
-
-                    mIsCustomFreq = true;
-                }
-
-                mItems[CenterItem]->setFrequency( frequency );
-                mTimerMode = SetFrequency;
-                mGenericTimer->stop();
-                mGenericTimer->start( SET_FREQUENCY_TIMEOUT );
-            }
-        } else {
-            mItems[CenterItem]->setFrequency( frequency );
-        }
-    }
-}
-
-/*!
- *
- */
-RadioUiEngine* RadioStationCarousel::uiEngine()
-{
-    return mUiEngine;
-}
-
-/*!
- *
- */
-bool RadioStationCarousel::isAntennaAttached() const
-{
-    return mUiEngine->isAntennaAttached();
-}
-
-/*!
- *
- */
-void RadioStationCarousel::setScanningMode( bool scanning )
-{
-    CALL_TO_ALL_ITEMS( setSeekLayout( scanning ) );
-
-    if ( scanning ) {
-        setInfoText( CarouselInfoText::Scanning );
-        if ( !mAnimator ) {
-            mAnimator = new RadioCarouselAnimator( *this );
-        }
-        mAnimator.data()->startFlashingText();
-    } else {
-        if ( mAnimator ) {
-            mAnimator.data()->stopFlashingText();
-        }
-        clearInfoText();
-        setCenterIndex( 0 );
-        mTimerMode = FavoriteHintShow;
-        mGenericTimer->start( FAVORITE_HINT_SHOW_DELAY );
-    }
-
-    setEnabled( !scanning );
-}
-
-/*!
- *
- */
-bool RadioStationCarousel::isInScanningMode() const
-{
-    return RadioUtil::scanStatus() == Scan::ScanningInMainView;
-}
-
-/*!
- *
- */
-void RadioStationCarousel::cleanRdsData()
-{
-    mItems[CenterItem]->cleanRdsData();
-}
-
-/*!
- *
- */
-void RadioStationCarousel::animateNewStation( const RadioStation& station )
-{
-    if ( mAnimator && mUiEngine ) {
-        const uint previousFrequency = mItems[CenterItem]->frequency();
-
-        mItems[RightItem]->setFrequency( previousFrequency );
-        mCurrentIndex = mModel->indexFromFrequency( station.frequency() );
-
-        mAnimator.data()->startNumberScroll( previousFrequency, station.frequency() );
-    }
-}
-
-/*!
- *
- */
-void RadioStationCarousel::cancelAnimation()
-{
-    if ( mAnimator ) {
-        mAnimator.data()->stopAll();
-    }
-}
-
-/*!
- *
- */
-void RadioStationCarousel::setInfoText( CarouselInfoText::Type type )
-{
-    mInfoTextType = type;
-    if ( type == CarouselInfoText::NoFavorites || type == CarouselInfoText::FavoriteIconHint ) {
-//        mInfoText->setPlainText( hbTrId( "txt_rad_dialog_long_press_arrow_keys_to_search_str" ) );
-    //TODO: Remove hardcoding. Temporarily hardcoded for usability testing
-        mInfoText->setPlainText( "Tap star to mark favourites" );
-        mInfoText->setAlignment( Qt::AlignCenter );
-        mItems[CenterItem]->setItemVisibility( RadioCarouselItem::IconVisible );
-        mTimerMode = InfoText;
-        mGenericTimer->setInterval( INFOTEXT_NOFAVORITES_TIMEOUT );
-        mGenericTimer->start();
-
-        if ( !mAnimator ) {
-            mAnimator = new RadioCarouselAnimator( *this );
-        }
-        mAnimator.data()->startFlashingIcon();
-
-    } else if ( type == CarouselInfoText::ConnectAntenna ) {
-        cleanRdsData();
-        mInfoText->setPlainText( hbTrId( "txt_rad_info_connect_wired_headset1" ) );
-        mInfoText->setAlignment( Qt::AlignBottom | Qt::AlignHCenter );
-    } else if ( type == CarouselInfoText::Seeking ) {
-        cleanRdsData();
-        mInfoText->setAlignment( Qt::AlignBottom | Qt::AlignHCenter );
-        mInfoText->setPlainText( hbTrId( "txt_rad_list_seeking" ) );
-    } else if ( type == CarouselInfoText::Scanning ) {
-        cleanRdsData();
-        mInfoText->setAlignment( Qt::AlignBottom | Qt::AlignHCenter );
-        mInfoText->setPlainText( hbTrId( "txt_rad_list_searching_all_available_stations_ple" ) );
-    }
-
-    mInfoText->setVisible( true );
-}
-
-/*!
- *
- */
-void RadioStationCarousel::clearInfoText()
-{
-    if ( mInfoTextType != CarouselInfoText::None ) {
-        if ( mAnimator ) {
-            mAnimator.data()->stopFlashingIcon();
-        }
-
-        mGenericTimer->stop();
-        mInfoTextType = CarouselInfoText::None;
-        mInfoText->setVisible( false );
-        mInfoText->clear();
-        mItems[CenterItem]->setItemVisibility( RadioCarouselItem::AllVisible );
-    }
-}
-
-/*!
- *
- */
-void RadioStationCarousel::setManualSeekMode( bool manualSeekActive )
-{
-    mManualSeekMode = manualSeekActive;
-    setEnabled( !manualSeekActive );
-
-    mItems[CenterItem]->setSeekLayout( manualSeekActive );
-    if ( !manualSeekActive ) {
-        clearInfoText();
-        setFrequency( mUiEngine->currentFrequency(), TuneReason::Unspecified );
-    }
-}
-
-/*!
- *
- */
-void RadioStationCarousel::drawOffScreen( QPainter& painter )
-{
-    mItems[CenterItem]->drawOffScreen( painter );
-}
-
-/*!
- *
- */
-void RadioStationCarousel::setLandscape( bool landscape )
-{
-    CALL_TO_ALL_ITEMS( setLandscape( landscape ) );
-}
-
-/*!
- * Private slot
- *
- */
-void RadioStationCarousel::scrollPosChanged( const QPointF& newPosition )
-{
-    Q_UNUSED( newPosition );
-//    const int xPos = static_cast<int>( newPosition.x() );
-//    mItems[CenterItem]->setPos( xPos - mMidScrollPos, 0 );
-}
-
-/*!
- * Private slot
- ''
- */
-void RadioStationCarousel::adjustAfterScroll()
-{
-    if ( isInScanningMode() ) {
-        return;
-    }
-
-    if ( mTargetIndex != -1 ) {
-        setCenterIndex( mTargetIndex );
-    }
-}
-
-/*!
- * Private slot
- *
- */
-void RadioStationCarousel::update( const RadioStation& station )
-{
-    if ( !mManualSeekMode && !isInScanningMode() ) {
-        for ( int i = LeftItem; i <= RightItem; ++i ) {
-            if ( mItems[i]->frequency() == station.frequency() ) {
-                mItems[i]->update( &station );
-            }
-        }
-    }
-}
-
-/*!
- * Private slot
- */
-void RadioStationCarousel::updateRadioText( const RadioStation& station )
-{
-    if ( isAntennaAttached() && !isInScanningMode() ) {
-        if ( station.radioText().isEmpty() ) {
-            mItems[CenterItem]->setRadioText( "" );
-        } else {
-            mRadioTextHolder = station.radioText();
-            mTimerMode = RtPlusCheck;
-            mGenericTimer->stop();
-            mGenericTimer->setInterval( RTPLUS_CHECK_TIMEOUT );
-            mGenericTimer->start();
-        }
-    }
-}
-
-/*!
- * Private slot
- */
-void RadioStationCarousel::updateStations()
-{
-    if ( isInScanningMode() ) {
-        return;
-    }
-
-    setFrequency( mUiEngine->currentFrequency(), TuneReason::Unspecified );
-}
-
-/*!
- * Private slot
- */
-void RadioStationCarousel::timerFired()
-{
-    if ( mTimerMode == SetFrequency ) {
-        setCenterIndex( mCurrentIndex, NoSignal | IgnoreCenter );
-        mTimerMode = NoTimer;
-    } else if ( mTimerMode == RtPlusCheck ) {
-        //mItems[CenterItem]->mRadiotextLabel->setText( mRadioTextHolder );
-        mRadioTextHolder = "";
-        mTimerMode = NoTimer;
-    } else if ( mTimerMode == InfoText ) {
-        clearInfoText();
-        mTimerMode = NoTimer;
-    } else if ( mTimerMode == FavoriteHintShow ) {
-        setInfoText( CarouselInfoText::FavoriteIconHint );
-        mTimerMode = FavoriteHintHide;
-        mGenericTimer->start( FAVORITE_HINT_HIDE_DELAY );
-    } else if ( mTimerMode == FavoriteHintHide ) {
-        clearInfoText();
-        mTimerMode = NoTimer;
-    }
-}
-
-#ifdef USE_DEBUGGING_CONTROLS
-/*!
- * Public slot
- */
-void RadioStationCarousel::setRdsAvailable( bool available )
-{
-    QColor color = Qt::green;
-    if ( !available && mUiEngine ) {
-        LOG_FORMAT( "No RDS signal: Station has sent RDS earlier: %d", mUiEngine.model().currentStation().hasSentRds() );
-        color = mUiEngine.model().currentStation().hasSentRds() ? Qt::yellow : Qt::gray;
-        mRdsLabel->setText( "RDS" );
-    } else {
-        mRdsLabel->setText( "-RDS-" );
-    }
-    mRdsLabel->setTextColor( color );
-}
-#endif // USE_DEBUGGING_CONTROLS
-
-/*!
- * Public slot
- */
-void RadioStationCarousel::updateAntennaStatus( bool connected )
-{
-    mGenericTimer->stop();
-
-    if ( !connected ) {
-        setInfoText( CarouselInfoText::ConnectAntenna );
-    } else {
-        clearInfoText();
-    }
-}
-
-/*!
- * \reimp
- */
-void RadioStationCarousel::mousePressEvent( QGraphicsSceneMouseEvent* event )
-{
-    if ( mInfoTextType == CarouselInfoText::NoFavorites || mInfoTextType == CarouselInfoText::FavoriteIconHint ) {
-        clearInfoText();
-    }
-
-    HbScrollArea::mousePressEvent( event );
-}
-
-/*!
- * \reimp
- */
-void RadioStationCarousel::resizeEvent( QGraphicsSceneResizeEvent* event )
-{
-    HbScrollArea::resizeEvent( event );
-
-    const int width = (int)event->newSize().width();
-
-    mMidScrollPos = -width;
-    mMaxScrollPos = mMidScrollPos * 2;
-
-    if ( isInitialized() ) {
-        mItems[LeftItem]->setMinimumWidth( width );
-        mItems[CenterItem]->setMinimumWidth( width );
-        mItems[RightItem]->setMinimumWidth( width );
-    }
-}
-
-/*!
- * \reimp
- */
-void RadioStationCarousel::showEvent( QShowEvent* event )
-{
-    HbScrollArea::showEvent( event );
-//    mContainer->setPos( mMidScrollPos, 0 );
-}
-
-/*!
- * \reimp
- */
-void RadioStationCarousel::gestureEvent( QGestureEvent* event )
-{
-//    if ( HbSwipeGesture* swipeGesture = static_cast<HbSwipeGesture*>( event->gesture( Qt::SwipeGesture ) ) ) {
-//        if ( swipeGesture->state() == Qt::GestureFinished ) {
-//            if ( swipeGesture->horizontalDirection() == QSwipeGesture::Left ) {
-//                emit skipRequested( StationSkip::Next );
-//            } else if ( swipeGesture->horizontalDirection() == QSwipeGesture::Right ) {
-//                emit skipRequested( StationSkip::Previous );
-//            }
-//            mIsCustomFreq = false;
-//        }
-//        return;
-//    }
-
-    HbScrollArea::gestureEvent( event );
-
-    if ( HbPanGesture* gesture = qobject_cast<HbPanGesture*>( event->gesture( Qt::PanGesture ) ) ) {
-        if ( gesture->state() == Qt::GestureFinished ) {
-            adjustPos( (int)gesture->offset().x() );
-        }
-    }
-}
-
-/*!
- * \reimp
- */
-void RadioStationCarousel::handleIconClicked( const RadioStation& station )
-{
-    if ( mModel ) {
-        mModel->setData( QModelIndex(), station.frequency(), RadioRole::ToggleFavoriteRole );
-    }
-}
-
-/*!
- * \reimp
- */
-void RadioStationCarousel::handleRadiotextClicked( const RadioStation& station )
-{
-    Q_UNUSED( station );
-    mRadiotextPopup->show();
-}
-
-/*!
- * \reimp
- */
-void RadioStationCarousel::handleUrlClicked( const RadioStation& station )
-{
-    mUiEngine->launchBrowser( station.url() );
-}
-
-/*!
- * \reimp
- */
-QString RadioStationCarousel::localizeGenre( int genre )
-{
-    return mUiEngine->genreToString( genre, GenreTarget::Carousel );
-}
-
-/*!
- * \reimp
- */
-bool RadioStationCarousel::isInManualSeek() const
-{
-    return mManualSeekMode;
-}
-
-/*!
- *
- */
-RadioStation RadioStationCarousel::findStation( uint frequency )
-{
-    return mModel->findStation( frequency, FindCriteria::IncludeManualStation );
-}
-
-/*!
- *
- */
-bool RadioStationCarousel::isInitialized() const
-{
-    return mUiEngine != NULL;
-}
-
-/*!
- *
- */
-void RadioStationCarousel::setCenterIndex( int index, ScrollMode mode )
-{
-    Q_UNUSED( mode );
-    if ( mModel ) {
-        const int newIndex = trimIndex( index );
-        mCurrentIndex = newIndex;
-        mTargetIndex = -1;
-
-        if ( !mIsCustomFreq ) {
-            mItems[CenterItem]->setStation( mModel->stationAt( mCurrentIndex ) );
-        }
-
-        if ( mModel->rowCount() > 1 ) {
-            const int leftIndex = prevIndex( mCurrentIndex );
-            const int rightIndex = nextIndex( mCurrentIndex );
-            mItems[LeftItem]->setStation( mModel->stationAt( leftIndex ) );
-            mItems[RightItem]->setStation( mModel->stationAt( rightIndex ) );
-        } else {
-
-            if ( mIsCustomFreq ) {
-                const uint frequency = mItems[CenterItem]->frequency();
-                mItems[LeftItem]->setStation( mModel->findClosest( frequency, StationSkip::Previous ) );
-                mItems[RightItem]->setStation( mModel->findClosest( frequency, StationSkip::Next ) );
-            } else {
-                mItems[LeftItem]->setStation( RadioStation() );
-                mItems[RightItem]->setStation( RadioStation() );
-            }
-        }
-
-        scrollContentsTo( QPointF( -mMidScrollPos /* + delta */, 0 ), 0 );
-
-//        if ( !mode.testFlag( NoSignal ) ) {
-//            uint frequency = mModel->stationAt( mCurrentIndex ).frequency();
-//            emit frequencyChanged( frequency, TuneReason::StationCarousel, mScrollDirection );
-//            mScrollDirection = Scroll::Shortest;
-//        }
-    }
-}
-
-/*!
- *
- */
-void RadioStationCarousel::scrollToIndex( int index, Scroll::Direction direction, ScrollMode mode )
-{
-    if ( mModel && index >= 0  ) {
-        mTargetIndex = index;
-        const int difference = calculateDifference( index, direction );
-        int scrollTime = mAutoScrollTime;
-
-        int posX = direction == Scroll::Left ? -mMaxScrollPos : 0;
-        if ( difference == 1 ) {
-            if ( direction == Scroll::Right ) {
-                posX = 0;
-            } else if ( direction == Scroll::Left ) {
-                posX = -mMaxScrollPos;
-            }
-        } else {
-            if ( direction == Scroll::Right ) {
-                // Item where the scrolling starts
-                mItems[RightItem]->setStation( mModel->stationAt( mCurrentIndex ) );
-
-                // Item that is skipped over
-                const uint centerFreq = mModel->stationAt( nextIndex( index ) ).frequency();
-                mItems[CenterItem]->setFrequency( centerFreq );
-
-                // Item where the scrolling ends
-                const RadioStation station = mModel->stationAt( index );
-                mItems[LeftItem]->setStation( station );
-
-                mContainer->setPos( mMaxScrollPos, 0 );
-                posX = 0;
-            } else if ( direction == Scroll::Left ) {
-                // Item where the scrolling starts
-                mItems[LeftItem]->setStation( mModel->stationAt( mCurrentIndex ) );
-
-                // Item that is skipped over
-                const uint centerFreq = mModel->stationAt( prevIndex( index ) ).frequency();
-                mItems[CenterItem]->setFrequency( centerFreq );
-
-                // Item where the scrolling ends
-                const RadioStation station = mModel->stationAt( index );
-                mItems[RightItem]->setStation( station );
-
-                mContainer->setPos( 0, 0 );
-                posX = -mMaxScrollPos;
-            }
-        }
-
-        if ( mode.testFlag( UpdateItem ) ) {
-            //item->update();
-        }
-
-        if ( mode.testFlag( NoAnim ) ) {
-            scrollTime = 0;
-        } else if ( mode.testFlag( FromPanGesture ) ) {
-            scrollTime = 500;
-        } else if ( mode.testFlag( FromSwipeGesture ) ) {
-            scrollTime = 100;
-        }
-
-        scrollContentsTo( QPointF( posX, 0 ), scrollTime );
-    }
-}
-
-/*!
- *
- */
-int RadioStationCarousel::calculateDifference( int targetIndex, Scroll::Direction& direction )
-{
-    int difference = 0;
-    const int rowCount = mModel->rowCount();
-
-    int diffToLeft = 0;
-    int diffToRight = 0;
-    if ( targetIndex > mCurrentIndex ) {
-        const int loopedDiff = mCurrentIndex + rowCount - targetIndex;
-        const int directDiff = targetIndex - mCurrentIndex;
-        diffToLeft = loopedDiff;
-        diffToRight = directDiff;
-    } else {
-        const int loopedDiff = targetIndex + rowCount - mCurrentIndex;
-        const int directDiff = mIsCustomFreq ? 1 : mCurrentIndex - targetIndex;
-        diffToLeft = directDiff;
-        diffToRight = loopedDiff;
-    }
-
-    if ( direction == Scroll::Right ) {
-        difference = diffToLeft;
-    } else if ( direction == Scroll::Left ) {
-        difference = diffToRight;
-    } else {
-        if ( diffToLeft < diffToRight ) {
-            difference = diffToLeft;
-            direction = Scroll::Right;
-        } else {
-            difference = diffToRight;
-            direction = Scroll::Left;
-        }
-    }
-
-    return difference;
-}
-
-/*!
- *
- */
-bool RadioStationCarousel::isScrollingAllowed() const
-{
-    const int rowCount = mModel->rowCount();
-    return rowCount > 1 || ( rowCount == 1 && mIsCustomFreq );
-}
-
-/*!
- *
- */
-void RadioStationCarousel::adjustPos( int offset )
-{
-    int newPos = mMidScrollPos;
-    const int threshold = (int)size().width() / 5;
-    int newIndex = mCurrentIndex;
-    bool needsToScroll = false;
-
-    if ( isScrollingAllowed() && abs( offset ) >= threshold ) {
-        needsToScroll = true;
-        if ( offset > 0 ) {
-            newPos = 0;
-            mScrollDirection = Scroll::Right;
-            if ( !mIsCustomFreq ) {
-                const uint newFreq = mModel->findClosest( mItems[CenterItem]->frequency(), StationSkip::PreviousFavorite ).frequency();
-                if ( newFreq > 0 ) {
-                    newIndex = mModel->indexFromFrequency( newFreq );
-                } else {
-                    needsToScroll = false;
-                    newPos = mMidScrollPos;
-                }
-            }
-        } else {
-            mScrollDirection = Scroll::Left;
-            newPos = mMaxScrollPos;
-
-            const uint newFreq = mModel->findClosest( mItems[CenterItem]->frequency(), StationSkip::NextFavorite ).frequency();
-            if ( newFreq > 0 ) {
-                newIndex = mModel->indexFromFrequency( newFreq );
-            } else {
-                needsToScroll = false;
-                newPos = mMidScrollPos;
-            }
-        }
-    }
-
-    newIndex = trimIndex( newIndex );
-    if ( needsToScroll ) {
-        const uint frequency = mModel->stationAt( newIndex ).frequency();
-        emit frequencyChanged( frequency, TuneReason::StationCarousel, mScrollDirection );
-        scrollToIndex( newIndex, mScrollDirection, RadioStationCarousel::FromPanGesture );
-        mIsCustomFreq = false;
-    } else {
-        scrollContentsTo( QPointF( -newPos, 0 ), 300 );
-    }
-}
-
-/*!
- *
- */
-int RadioStationCarousel::trimIndex( int index )
-{
-    const int count = mModel ? mModel->rowCount() : 0;
-
-    if ( count == 0 ) {
-        return -1;
-    }
-
-    if ( index < 0 ) {
-        index = count - 1;
-    }
-    index %= count;
-    return index;
-}
-
-/*!
- *
- */
-int RadioStationCarousel::prevIndex( int index )
-{
-    if ( !mIsCustomFreq ) {
-        --index;
-    }
-    return trimIndex( index );
-}
-
-/*!
- *
- */
-int RadioStationCarousel::nextIndex( int index )
-{
-    return trimIndex( index + 1 );
-}
-
-/*!
- *
- */
-void RadioStationCarousel::skip( StationSkip::Mode mode )
-{
-    if ( mModel ) {
-        const uint frequency = mModel->findClosest( mItems[CenterItem]->frequency(), mode ).frequency();
-        const int index = mModel->indexFromFrequency( frequency );
-        const Scroll::Direction direction = RadioUtil::scrollDirectionFromSkipMode( mode );
-        scrollToIndex( index, direction, RadioStationCarousel::NoSignal );
-    }
-}
--- a/radioapp/radiowidgets/src/radiostationsview.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,399 +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:
-*
-*/
-
-// System includes
-#include <HbListView>
-#include <HbAbstractViewItem>
-#include <HbPushButton>
-#include <HbEffect>
-#include <HbAction>
-#include <HbInputDialog>
-#include <HbMenu>
-#include <QSortFilterProxyModel>
-
-// User includes
-#include "radiostationsview.h"
-#include "radiologger.h"
-#include "radiowindow.h"
-#include "radiouiengine.h"
-#include "radiofrequencyscanner.h"
-#include "radiouiloader.h"
-#include "radiostationmodel.h"
-#include "radiostation.h"
-
-// Constants
-const char* REGEX_SHOW_FAVORITES = "true";
-const char* REGEX_SHOW_ALL = ".+";
-
-/*!
- *
- */
-RadioStationsView::RadioStationsView() :
-    RadioViewBase( false ),
-    mModel( 0 ),
-    mScanStationsAction( 0 ),
-    mClearListAction( 0 ),
-    mStationsList( 0 ),
-    mFavoritesButton( 0 ),
-    mLocalStationsButton( 0 ),
-    mSelectedStation( new RadioStation ),
-    mCurrentQuestion( NoQuestion )
-{
-}
-
-/*!
- *
- */
-RadioStationsView::~RadioStationsView()
-{
-}
-
-/*!
- *
- */
-void RadioStationsView::setNowPlayingIcon( const HbIcon& nowPlayingIcon )
-{
-    mNowPlayingIcon = nowPlayingIcon;
-}
-
-/*!
- *
- */
-HbIcon RadioStationsView::nowPlayingIcon() const
-{
-    return mNowPlayingIcon;
-}
-
-/*!
- *
- */
-void RadioStationsView::setFavoriteIcon( const HbIcon& favoriteIcon )
-{
-    mFavoriteIcon = favoriteIcon;
-}
-
-/*!
- *
- */
-HbIcon RadioStationsView::favoriteIcon() const
-{
-    return mFavoriteIcon;
-}
-
-/*!
- * Private slot
- *
- */
-void RadioStationsView::handleClick( const QModelIndex& index )
-{
-    LOG_TIMESTAMP( "Channel change started" );
-    QModelIndex sourceIndex = mFilterModel->mapToSource( index );
-    *mSelectedStation = mModel->stationAt( sourceIndex.row() );
-    mUiEngine->setFrequency( mSelectedStation->frequency(), TuneReason::StationsList );
-}
-
-/*!
- * Private slot
- *
- */
-void RadioStationsView::handleLongPress( HbAbstractViewItem* item, const QPointF& coords )
-{
-    Q_UNUSED( item );
-
-    HbMenu* menu = mUiLoader->findObject<HbMenu>( DOCML::NAME_CONTEXT_MENU );
-
-    *mSelectedStation = mFilterModel->data( item->modelIndex(), RadioRole::RadioStationRole ).value<RadioStation>();
-
-    HbAction* favoriteAction = mUiLoader->findObject<HbAction>( DOCML::NAME_CONTEXT_FAVORITE );
-
-    if ( mSelectedStation->isFavorite() ) {
-        favoriteAction->setText( hbTrId( "txt_rad_menu_remove_favourite" ) );
-    } else {
-        favoriteAction->setText( hbTrId( "txt_rad_menu_add_to_favourites" ) );
-    }
-
-    HbAction* playAction = mUiLoader->findObject<HbAction>( DOCML::SV_NAME_PLAY_ACTION );
-
-    if ( mSelectedStation->frequency() == mUiEngine->currentFrequency() ) {
-        playAction->setVisible( false );
-    } else {
-        playAction->setVisible( true );
-    }
-
-    menu->setPreferredPos( QPointF( size().width() / 2 - menu->size().width() / 2, coords.y() - menu->size().height() / 2 ) );
-    menu->show();
-}
-
-/*!
- * Private slot
- *
- */
-void RadioStationsView::updateAntennaStatus( bool connected )
-{
-    Q_UNUSED( connected );
-    updateVisibilities();
-}
-
-/*!
- * Private slot
- *
- */
-void RadioStationsView::updateViewMode()
-{
-    QString section = DOCML::SV_SECTION_SHOW_ALL_STATIONS;
-    QString filter = REGEX_SHOW_ALL;
-
-    if ( sender() == mFavoritesButton ) {
-        section = DOCML::SV_SECTION_SHOW_FAVORITES;
-        filter = REGEX_SHOW_FAVORITES;
-    }
-
-    loadSection( DOCML::FILE_STATIONSVIEW, section );
-    mFilterModel->setFilterRegExp( filter );
-
-    updateVisibilities();
-}
-
-/*!
- * Private slot
- *
- */
-void RadioStationsView::startScanning()
-{
-    const int rowCount =  mUiEngine->stationModel().rowCount();
-    mCurrentQuestion = StartScanning;
-    if ( rowCount > 0 ) {
-        askQuestion( hbTrId( "txt_rad_info_all_stations_in_stations_list_will_be" ) );
-    } else {
-        userAccepted();
-    }
-}
-
-/*!
- * Private slot
- *
- */
-void RadioStationsView::finishScanning()
-{
-    updateVisibilities();
-    mFrequencyScanner.take();
-}
-
-/*!
- * Private slot
- *
- */
-void RadioStationsView::updateVisibilities()
-{
-    LOG_SLOT_CALLER;
-    bool listEmpty = mModel->rowCount() == 0;
-    const bool localStationsMode = !mFavoritesButton->isChecked();
-
-    if ( !localStationsMode ) {
-        listEmpty = mModel->favoriteCount() == 0;
-    }
-
-    mClearListAction->setEnabled( !listEmpty );
-
-    const bool scanAvailable = mUiEngine->isAntennaAttached() && localStationsMode;
-    mScanStationsAction->setEnabled( scanAvailable );
-    HbPushButton* scanButton = mUiLoader->findWidget<HbPushButton>( DOCML::SV_NAME_SCAN_BUTTON );
-    scanButton->setEnabled( scanAvailable );
-
-    loadSection( DOCML::FILE_STATIONSVIEW, listEmpty ? DOCML::SV_SECTION_SHOW_SCAN_TEXT : DOCML::SV_SECTION_HIDE_SCAN_TEXT );
-}
-
-/*!
- * Private slot
- *
- */
-void RadioStationsView::clearList()
-{
-    const bool favoriteMode = mFavoritesButton->isChecked();
-    mCurrentQuestion = ClearList;
-    askQuestion( hbTrId( favoriteMode ? "txt_rad_info_clear_favourite_stations_list"
-                                      : "txt_rad_info_clear_all_stations_list" ) );
-}
-
-/*!
- * Private slot
- *
- */
-void RadioStationsView::play()
-{
-    LOG("Play from context menu");
-    mUiEngine->setFrequency( mSelectedStation->frequency(), TuneReason::StationsList );
-}
-
-/*!
- * Private slot
- *
- */
-void RadioStationsView::rename()
-{
-    HbInputDialog* nameQuery = new HbInputDialog();
-    nameQuery->setAttribute( Qt::WA_DeleteOnClose, true );
-    nameQuery->setDismissPolicy( HbDialog::TapOutside );
-    nameQuery->setPromptText( hbTrId( "txt_rad_dialog_new_name" ) );
-    nameQuery->setInputMode( HbInputDialog::TextInput );
-    nameQuery->setValue( mSelectedStation->name() );
-    nameQuery->setObjectName( DOCML::NAME_INPUT_QUERY );
-    nameQuery->open( this, SLOT(renameDone(HbAction*)) );
-}
-
-/*!
- * Private slot
- *
- */
-void RadioStationsView::toggleFavorite()
-{
-    mModel->setFavoriteByPreset( mSelectedStation->presetIndex(), !mSelectedStation->isFavorite() );
-}
-
-/*!
- * Private slot
- *
- */
-void RadioStationsView::deleteStation()
-{
-    mCurrentQuestion = DeleteStation;
-    askQuestion( hbTrId( "txt_rad_info_delete_station" ) );
-}
-
-/*!
- * Private slot
- *
- */
-void RadioStationsView::renameDone( HbAction* action )
-{
-    HbInputDialog* dlg = static_cast<HbInputDialog*>( sender() );
-
-    if( action ) {
-        mModel->renameStation( mSelectedStation->presetIndex(), dlg->value().toString() );
-    }
-}
-
-/*!
- * From RadioViewBase
- *
- */
-void RadioStationsView::init()
-{
-    LOG_METHOD;
-    mModel = &mUiEngine->stationModel();
-
-    mFilterModel = new QSortFilterProxyModel( this );
-    mFilterModel->setDynamicSortFilter( true );
-    mFilterModel->setFilterRole( RadioRole::IsFavoriteRole );
-    mFilterModel->setSourceModel( &mUiEngine->stationModel() );
-
-    loadSection( DOCML::FILE_STATIONSVIEW, DOCML::SV_SECTION_SHOW_ALL_STATIONS );
-
-    if ( !mFavoriteIcon.isNull() && !mNowPlayingIcon.isNull() ) {
-        mModel->setIcons( mFavoriteIcon.qicon(), mNowPlayingIcon.qicon() );
-    }
-    mModel->setDetail( RadioStationModel::ShowIcons | RadioStationModel::ShowGenre );
-
-    mStationsList           = mUiLoader->findObject<HbListView>( DOCML::SV_NAME_STATIONS_LIST );
-    mFavoritesButton        = mUiLoader->findObject<HbAction>( DOCML::SV_NAME_FAVORITES_BUTTON );
-    mLocalStationsButton    = mUiLoader->findObject<HbAction>( DOCML::SV_NAME_LOCALS_BUTTON );
-
-    Radio::connect( mUiEngine.data(),       SIGNAL(antennaStatusChanged(bool)),
-                    this,                   SLOT(updateAntennaStatus(bool)) );
-    Radio::connect( mModel,                 SIGNAL(rowsInserted(QModelIndex,int,int)),
-                    this,                   SLOT(updateVisibilities()) );
-    Radio::connect( mModel,                 SIGNAL(rowsRemoved(QModelIndex,int,int)),
-                    this,                   SLOT(updateVisibilities()) );
-    Radio::connect( mModel,                 SIGNAL(modelReset()),
-                    this,                   SLOT(updateVisibilities()) );
-    Radio::connect( mFavoritesButton,       SIGNAL(triggered()),
-                    this,                   SLOT(updateViewMode()) );
-    Radio::connect( mLocalStationsButton,   SIGNAL(triggered() ),
-                    this,                   SLOT(updateViewMode()) );
-    Radio::connect( mStationsList,          SIGNAL(activated(QModelIndex)),
-                    this,                   SLOT(handleClick(QModelIndex)) );
-    Radio::connect( mStationsList,          SIGNAL(longPressed(HbAbstractViewItem*,QPointF)),
-                    this,                   SLOT(handleLongPress(HbAbstractViewItem*,QPointF)) );
-
-    connectCommonMenuItem( MenuItem::Exit );
-    connectXmlElement( DOCML::SV_NAME_SCAN_BUTTON,      SIGNAL(clicked()),
-                       this,                            SLOT(startScanning()) );
-
-    // Context menu actions
-    connectXmlElement( DOCML::SV_NAME_PLAY_ACTION,      SIGNAL(triggered()),
-                       this,                            SLOT(play()) );
-    connectXmlElement( DOCML::SV_NAME_RENAME_ACTION,    SIGNAL(triggered()),
-                       this,                            SLOT(rename()) );
-    connectXmlElement( DOCML::SV_NAME_FAVORITE_ACTION,  SIGNAL(triggered()),
-                       this,                            SLOT(toggleFavorite()) );
-    connectXmlElement( DOCML::SV_NAME_DELETE_ACTION,    SIGNAL(triggered()),
-                       this,                            SLOT(deleteStation()) );
-
-    // "Scan local stations" menu item
-    mScanStationsAction = mUiLoader->findObject<HbAction>( DOCML::SV_NAME_SCAN_ACTION );
-    Radio::connect( mScanStationsAction,   SIGNAL(triggered() ),
-                    this,                   SLOT(startScanning() ) );
-
-    // "Remove all presets" menu item
-    mClearListAction = mUiLoader->findObject<HbAction>( DOCML::SV_NAME_CLEAR_LIST_ACTION );
-    Radio::connect( mClearListAction,   SIGNAL(triggered() ),
-                    this,               SLOT(clearList() ) );
-
-    connectCommonMenuItem( MenuItem::UseLoudspeaker );
-
-    initListView();
-
-    initBackAction();
-
-    updateViewMode();
-}
-
-/*!
- * \reimp
- */
-void RadioStationsView::userAccepted()
-{
-    if ( mCurrentQuestion == StartScanning ) {
-        mFrequencyScanner.reset( new RadioFrequencyScanner( *mUiEngine, this ) );
-
-        Radio::connect( mFrequencyScanner.data(),   SIGNAL(frequencyScannerFinished()),
-                        this,                       SLOT(finishScanning()) );
-
-        mFrequencyScanner->startScanning();
-    } else if ( mCurrentQuestion == ClearList ){
-        const bool favoriteMode = mFavoritesButton->isChecked();
-        mModel->removeAll( favoriteMode ? RadioStationModel::RemoveFavorites : RadioStationModel::RemoveAll );
-        updateVisibilities();
-    } else if ( mCurrentQuestion == DeleteStation ) {
-        mModel->removeStation( *mSelectedStation );
-    }
-
-    mCurrentQuestion = NoQuestion;
-}
-
-/*!
- *
- */
-void RadioStationsView::initListView()
-{
-    mStationsList->setScrollingStyle( HbListView::PanOrFlick );
-    mStationsList->setModel( mFilterModel );
-    mStationsList->setSelectionMode( HbListView::NoSelection );
-    mStationsList->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
-    //TODO: Uncomment after MCL wk28 release to improve scrolling FPS rate
-    //mStationsList->setItemPixmapCacheEnabled( true );
-}
--- a/radioapp/radiowidgets/src/radiostripbase.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,495 +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:
-*
-*/
-
-// System includes
-#include <QGraphicsSceneEvent>
-
-// User includes
-#include "radiostripbase.h"
-
-// Constants
-
-/*!
- *
- */
-RadioStripBase::RadioStripBase( QGraphicsItem* parent ) :
-    HbScrollArea( parent ),
-    mAutoScrollTime( 0 ),
-    mStripContainer( new HbWidget( this ) ),
-    mModel( 0 ),
-    mIsCyclic( true ),
-    mAutoCenter( false ),
-    mOverlap( 0 ),
-    mItemPoolParent( new QGraphicsWidget( NULL ) ),
-    mCurrentIndex( 0 ),
-    mPressedIndex( 0 ),
-    mStripLength( 0 ),
-    mContentsLength( 0 )
-{
-    setClampingStyle( HbScrollArea::NoClamping );
-    setScrollDirections( Qt::Horizontal );
-    setFlag( QGraphicsItem::ItemClipsChildrenToShape, true );
-    setContentWidget( mStripContainer );
-    setFrictionEnabled( true );
-    setLongPressEnabled( false );
-    setHorizontalScrollBarPolicy( HbScrollArea::ScrollBarAlwaysOff );
-    setVerticalScrollBarPolicy( HbScrollArea::ScrollBarAlwaysOff );
-
-    // mItemParent is used to hold the unused QGraphicsItem's in the pool.  It's visibility is set to false
-    // so the visibility of the items doesn't need to be modified.
-    mItemPoolParent->setVisible( false );
-}
-
-/*!
- *
- */
-RadioStripBase::~RadioStripBase()
-{
-}
-
-/*!
- *
- */
-void RadioStripBase::setAutoScrollTime( const int time )
-{
-    mAutoScrollTime = time;
-}
-
-/*!
- *
- */
-int RadioStripBase::autoScrollTime() const
-{
-    return mAutoScrollTime;
-}
-
-/*!
- *
- */
-void RadioStripBase::setModel( QAbstractItemModel* model )
-{
-    if ( mModel != model )
-    {
-    //    if ( mModel )
-    //    {
-    //        disconnectDataModel();
-    //    }
-
-        mModel = model;
-
-        if ( mModel )
-        {
-    //        connectDataModel();
-
-            mCurrentIndex = 0;
-            populateAndLayout();
-        }
-    }
-}
-
-/*!
- *
- */
-QAbstractItemModel* RadioStripBase::model() const
-{
-    return mModel;
-}
-
-/*!
- *
- */
-void RadioStripBase::setCyclic( bool isCyclic )
-{
-    mIsCyclic = isCyclic;
-}
-
-/*!
- *
- */
-void RadioStripBase::setOverlap( qreal overlap )
-{
-    mOverlap = overlap;
-}
-
-/*!
- *
- */
-void RadioStripBase::setAutoCenter( bool autoCenter )
-{
-    mAutoCenter = autoCenter;
-}
-
-/*!
- *
- */
-void RadioStripBase::setItemSize( const QSizeF& size )
-{
-    if ( mItemSize != size ) {
-        mItemSize = size;
-
-        prepareGeometryChange();
-
-        populateAndLayout();
-
-        update();
-        updateGeometry();
-    }
-}
-
-/*!
- *
- */
-void RadioStripBase::setIndex( int index, bool animateToCenter )
-{
-    Q_UNUSED( animateToCenter )
-    // Sanity checks
-    if ( !mModel || ( !mIsCyclic && ( index < 0 || index >= mModel->rowCount() ) ) ) {
-        return;
-    }
-
-    const int oldIndex = mCurrentIndex;
-    if ( mIsCyclic )
-    {
-        int numRows = mModel->rowCount();
-        index = (index + numRows) % numRows;
-    }
-    Q_ASSERT( index >= 0 );
-
-    mCurrentIndex = index;
-
-    updateItemWithIndex( mCurrentIndex );
-    updateItemWithIndex( oldIndex );
-}
-
-/*!
- * \reimp
- */
-void RadioStripBase::resizeEvent( QGraphicsSceneResizeEvent* event )
-{
-    HbScrollArea::resizeEvent( event );
-    populateAndLayout();
-}
-
-/*!
- * \reimp
- */
-void RadioStripBase::mousePressEvent( QGraphicsSceneMouseEvent* event )
-{
-    if ( event->button() != Qt::LeftButton || !mModel || !mModel->rowCount() )
-    {
-        event->ignore();
-        return;
-    }
-
-    HbScrollArea::mousePressEvent( event );
-}
-
-/*!
- * \reimp
- */
-void RadioStripBase::mouseReleaseEvent( QGraphicsSceneMouseEvent* event )
-{
-    if ( event->button() != Qt::LeftButton )
-    {
-        event->ignore();
-        return;
-    }
-
-    HbScrollArea::mouseReleaseEvent( event );
-}
-
-/*!
- *
- */
-void RadioStripBase::moveAllItemsToPool()
-{
-    // set parent of all items to pool
-    foreach( QGraphicsItem* item, mItemAtSlot )
-    {
-        item->setParentItem( mItemPoolParent );
-    }
-
-    // move all items to pool
-    mItemPool += mItemAtSlot;
-    mItemAtSlot.clear();
-    mIndexAtSlot.clear();
-}
-
-/*!
- *
- */
-void RadioStripBase::populateAndLayout()
-{
-    moveAllItemsToPool();
-
-    if ( !mModel || mModel->rowCount() == 0 )
-    {
-        return;
-    }
-
-    mStripLength = boundingRect().width();
-    qreal itemSize = mItemSize.width();
-    mContentsLength = mModel->rowCount() * (itemSize - mOverlap);
-
-    if ( mIsCyclic )
-    {
-        // if treating the items cyclically, double the content area so it can
-        // be shifted back and forth as you scroll
-        mContentsLength *= 2;
-    }
-
-    qreal currPos = -mOverlap;
-    for ( int i = 0; i < mModel->rowCount(); ++i ) {
-        if ( currPos > mStripLength )
-        {
-            break;
-        }
-
-        QGraphicsItem* item = constructItem( i, true );
-        if ( item )
-        {
-            item->setPos( QPointF( currPos, 0 ) );
-            currPos += itemSize - mOverlap;
-        }
-    }
-
-    mStripContainer->setPreferredSize( mContentsLength, mItemSize.height() );
-
-    if ( mCurrentIndex >= 0 )
-    {
-        setIndex( mCurrentIndex, false );
-    }
-}
-
-/*!
- *
- */
-QGraphicsItem* RadioStripBase::constructItem( int index, bool append )
-{
-    QGraphicsItem* item = getFromPool();
-
-    if ( mIsCyclic )
-    {
-        Q_ASSERT( index >= 0 && index < 2 * mModel->rowCount() );
-
-        updateItemPrimitive( item, index % mModel->rowCount() );
-    }
-    else
-    {
-        Q_ASSERT( index >= 0 && index < mModel->rowCount() );
-
-        updateItemPrimitive( item, index );
-    }
-
-    item->setParentItem( mStripContainer );
-
-    if ( append )
-    {
-        mItemAtSlot.append( item );
-        mIndexAtSlot.append( index );
-    }
-    else
-    {
-        mItemAtSlot.prepend( item );
-        mIndexAtSlot.prepend( index );
-    }
-
-    return item;
-}
-
-/*!
- *
- */
-QGraphicsItem* RadioStripBase::getFromPool()
-{
-    QGraphicsItem* item = 0;
-
-    if ( mItemPool.isEmpty() )
-    {
-        item = createItemPrimitive( this );
-    }
-    else
-    {
-        item = mItemPool.takeFirst();
-    }
-
-    return item;
-}
-
-/*!
- *
- */
-void RadioStripBase::returnToPool( QGraphicsItem* item )
-{
-    // Unparent the item so it doesn't get deleted
-    item->setParentItem( mItemPoolParent );
-    mItemPool.append( item );
-}
-
-/*!
- * Returns starting coordinate of the item with the specified index
- */
-qreal RadioStripBase::indexToOffset( int index )
-{
-    return index * ( mItemSize.width() - mOverlap ) - mOverlap;
-}
-
-/*!
- * Returns item index for specified offset amount into the content
- */
-int RadioStripBase::offsetToIndex( qreal offset )
-{
-    const int rows = mModel->rowCount();
-    int index = (int)( offset / ( mItemSize.width() - mOverlap ) );
-
-    if ( mIsCyclic )
-    {
-       return qBound( 0, index, 2 * rows - 1 );
-    }
-
-    return qBound( 0, index, rows - 1 );
-}
-
-/*!
- * updates items with specified index value
- */
-void RadioStripBase::updateItemWithIndex( int index )
-{
-    if( index >= 0 )
-    {
-        QList<QGraphicsItem *>::const_iterator item = mItemAtSlot.constBegin();
-        QList<QGraphicsItem *>::const_iterator itemsEnd = mItemAtSlot.constEnd();
-        QList<int>::const_iterator itemIndex = mIndexAtSlot.constBegin();
-        const int rowCount = mModel->rowCount();
-
-        // Find all items with this index (can be 2 in special cycling case)
-        for( ; item != itemsEnd; ++item, ++itemIndex )
-        {
-            if( index == *itemIndex || index == *itemIndex - rowCount )
-            {
-                // update those items
-                updateItemPrimitive( *item, index );
-            }
-        }
-    }
-}
-
-/*!
- * Updates items during scrolling: removing invisible items and adding items that became visible
- */
-void RadioStripBase::adjustItems()
-{
-    qreal contentPos = mStripContainer->pos().x();
-
-    if ( mIsCyclic )
-    {
-        if ( -contentPos < 0 )
-        {
-            // trying  to display off the left end of the strip, so
-            // shift the strip one length to the left
-            contentPos -= mContentsLength * 0.5;
-            mStripContainer->setPos( QPointF ( contentPos, mStripContainer->pos().y() ) );
-        } else if (-contentPos > mContentsLength * 0.5) {
-            // trying to display off the right end of the strip, so
-            // shift the strip one length to the right
-            contentPos += mContentsLength * 0.5;
-            mStripContainer->setPos( QPointF ( contentPos, mStripContainer->pos().y() ) );
-        }
-    }
-
-    // find the first and last indices of the visible items
-    int firstVisibleIndex = offsetToIndex( -contentPos );
-    int lastVisibleIndex = offsetToIndex( -contentPos + mStripLength );
-
-    // remove items at the start that are no longer visible
-    while ( !mIndexAtSlot.isEmpty() )
-    {
-        int firstSlotIndex = mIndexAtSlot.first();
-        if ( firstVisibleIndex <= firstSlotIndex )
-        {
-            break;
-        }
-
-        returnToPool( mItemAtSlot.first() );
-        mItemAtSlot.removeFirst();
-        mIndexAtSlot.removeFirst();
-    }
-
-    // remove items at the end that are no longer visible
-    while ( !mIndexAtSlot.isEmpty() )
-    {
-        int lastSlotIndex = mIndexAtSlot.last();
-        if ( lastVisibleIndex >= lastSlotIndex )
-        {
-            break;
-        }
-
-        returnToPool( mItemAtSlot.last() );
-        mItemAtSlot.removeLast();
-        mIndexAtSlot.removeLast();
-    }
-
-    if ( mItemAtSlot.isEmpty() )
-    {
-        // fill area with all needed items
-        for ( int i = firstVisibleIndex; i <= lastVisibleIndex; ++i )
-        {
-            QGraphicsItem* item = constructItem( i, true );
-            if ( item )
-            {
-                item->setPos( QPointF( indexToOffset( i ), 0 ) );
-            }
-        }
-    }
-    else
-    {
-        // add missing items at the front
-        int firstItemToCreate = mIndexAtSlot.first()-1;
-        for ( int i = firstItemToCreate; i >= firstVisibleIndex; --i )
-        {
-            QGraphicsItem* item = constructItem( i, false );
-            if ( item )
-            {
-                item->setPos( QPointF( indexToOffset( i ), 0 ) );
-            }
-        }
-
-        // add missing items at the end
-        firstItemToCreate = mIndexAtSlot.last()+1;
-        for ( int i = firstItemToCreate; i <= lastVisibleIndex; ++i )
-        {
-            QGraphicsItem* item = constructItem( i, true );
-            if ( item )
-            {
-                item->setPos( QPointF( indexToOffset( i ), 0 ) );
-            }
-        }
-    }
-}
-
-/*!
- * \reimp
- */
-bool RadioStripBase::scrollByAmount( const QPointF& delta )
-{
-    bool ret = HbScrollArea::scrollByAmount( delta );
-
-    adjustItems();
-    scrollPosChanged();
-
-    return ret;
-}
--- a/radioapp/radiowidgets/src/radiouiloader.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +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:
-*
-*/
-
-// User includes
-#include "radiouiloader.h"
-
-/*!
- *
- */
-RadioUiLoader::RadioUiLoader() :
-    HbDocumentLoader()
-{
-}
--- a/radioapp/radiowidgets/src/radioutil.cpp	Tue Aug 31 15:15:02 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:
-*
-*/
-
-// System includes
-#include <HbEffect>
-#include <HbNotificationDialog>
-
-// User includes
-#include "radioutil.h"
-#include "radiofrequencystrip.h"
-#include "radiostationcarousel.h"
-#include "radiofrequencyscanner.h"
-#include "radiologger.h"
-
-// Constants
-
-static RadioUtil* theInstance = 0;
-
-/*!
- *
- */
-RadioUtil::RadioUtil() :
-    mScanStatus( Scan::NotScanning )
-{
-}
-
-/*!
- *
- */
-RadioUtil::~RadioUtil()
-{
-}
-
-/*!
- *
- */
-bool RadioUtil::addEffects( QEffectList list )
-{
-    bool allAvailable = true;
-    QEffectList added;
-    foreach ( EffectInfo info, list ) {
-        if ( HbEffect::add( info.mItem, info.mPath, info.mEvent ) ) {
-            added.append( info );
-        } else {
-            allAvailable = false;
-            break;
-        }
-    }
-
-    if ( !allAvailable ) {
-        foreach ( const EffectInfo& info, added ) {
-            HbEffect::remove( info.mItem, info.mPath, info.mEvent );
-        }
-    }
-
-    return allAvailable;
-}
-
-
-/*!
- *
- */
-RadioFrequencyStrip* RadioUtil::frequencyStrip()
-{
-    return instance().mFrequencyStrip.data();
-}
-
-/*!
- *
- */
-RadioStationCarousel* RadioUtil::carousel()
-{
-    return instance().mCarousel.data();
-}
-
-/*!
- *
- */
-bool RadioUtil::isScannerAlive()
-{
-    RadioFrequencyScanner* scanner = instance().mScanner.data();
-    if ( scanner ) {
-        return scanner->isAlive();
-    }
-    return false;
-}
-
-/*!
- *
- */
-Scan::Status RadioUtil::scanStatus()
-{
-    return instance().mScanStatus;
-}
-
-/*!
- *
- */
-void RadioUtil::setFrequencyStrip( RadioFrequencyStrip* frequencyStrip )
-{
-    instance().mFrequencyStrip = frequencyStrip;
-}
-
-/*!
- *
- */
-void RadioUtil::setCarousel( RadioStationCarousel* carousel )
-{
-    instance().mCarousel = carousel;
-}
-
-/*!
- *
- */
-void RadioUtil::setFrequencyScanner( RadioFrequencyScanner* scanner )
-{
-    instance().mScanner = scanner;
-}
-
-/*!
- *
- */
-void RadioUtil::setScanStatus( Scan::Status status )
-{
-    instance().mScanStatus = status;
-}
-
-/*!
- *
- */
-Scroll::Direction RadioUtil::scrollDirectionFromSkipMode( int skipMode )
-{
-    return ( skipMode == StationSkip::Next || skipMode == StationSkip::NextFavorite )
-           ? Scroll::Left : Scroll::Right;
-}
-
-/*!
- *
- */
-Scroll::Direction RadioUtil::scrollDirection( int direction )
-{
-    return static_cast<Scroll::Direction>( direction );
-}
-
-/*!
- *
- */
-TuneReason::Reason RadioUtil::tuneReason( int tuneReason )
-{
-    return static_cast<TuneReason::Reason>( tuneReason );
-}
-
-/*!
- *
- */
-void RadioUtil::showDiscreetNote( const QString& text )
-{
-    RadioUtil& self = instance();
-    if ( !self.mNotificationDialog ) {
-        self.mNotificationDialog = new HbNotificationDialog();
-    }
-    self.mNotificationDialog.data()->setAttribute( Qt::WA_DeleteOnClose );
-    self.mNotificationDialog.data()->setTitle( text );
-    self.mNotificationDialog.data()->show();
-}
-
-/*!
- *
- */
-RadioUtil& RadioUtil::instance()
-{
-    if ( !::theInstance ) {
-        ::theInstance = new RadioUtil;
-    }
-    return *::theInstance;
-}
-
--- a/radioapp/radiowidgets/src/radioviewbase.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,247 +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 <HbMenu>
-#include <HbAction>
-#include <HbEffect>
-#include <QCoreApplication>
-#include <HbMessageBox>
-
-#include "radioviewbase.h"
-#include "radiowindow.h"
-#include "radiostationmodel.h"
-#include "radiouiloader.h"
-#include "radiouiengine.h"
-#include "radiologger.h"
-
-/*!
- *
- */
-RadioViewBase::RadioViewBase( bool transient ) :
-    HbView( 0 ),
-    mMainWindow( 0 ),
-    mUiLoader( 0 ),
-    mTransientView( transient ),
-    mUseLoudspeakerAction( 0 ),
-    mOrientation( Qt::Vertical )
-{
-}
-
-/*!
- *
- */
-RadioViewBase::~RadioViewBase()
-{
-    if ( mUiLoader ) {
-        mUiLoader->reset();
-    }
-}
-
-/*!
- *
- */
-void RadioViewBase::setMembers( RadioWindow* mainWindow, RadioUiLoader* uiLoader )
-{
-    mMainWindow = mainWindow;
-    mUiLoader.reset( uiLoader );
-}
-
-/*!
- *
- */
-void RadioViewBase::preLazyLoadInit()
-{
-    // Default implementation does nothing
-}
-
-/*!
- *
- */
-void RadioViewBase::initialize( QSharedPointer<RadioUiEngine> uiEngine )
-{
-    mUiEngine = uiEngine;
-    init();
-}
-
-/*!
- *
- */
-bool RadioViewBase::isInitialized() const
-{
-    return mUiEngine;
-}
-
-/*!
- *
- */
-bool RadioViewBase::isTransient() const
-{
-    return mTransientView;
-}
-
-/*!
- *
- */
-void RadioViewBase::updateOrientation( Qt::Orientation orientation, bool forceUpdate )
-{
-    if ( orientation != mOrientation || forceUpdate ) {
-        mOrientation = orientation;
-        setOrientation();
-    }
-}
-
-/*!
- *
- */
-void RadioViewBase::bringToForeground()
-{
-    mMainWindow->raise();
-}
-
-/*!
- * Protected slot
- *
- */
-void RadioViewBase::updateAudioRouting( bool loudspeaker )
-{
-    if ( mUseLoudspeakerAction ) {
-        mUseLoudspeakerAction->setText( loudspeaker ? hbTrId( "txt_common_opt_deactivate_loudspeaker" )
-                                                    : hbTrId( "txt_common_opt_activate_loudspeaker" ) );
-    }
-}
-
-/*!
- * Protected slot
- *
- */
-void RadioViewBase::activatePreviousView()
-{
-    mMainWindow->activateMainView();
-}
-
-/*!
- * Protected slot
- *
- */
-void RadioViewBase::quit()
-{
-    qApp->quit();
-}
-
-/*!
- * Private slot
- */
-void RadioViewBase::handleUserAnswer( HbAction* answer )
-{
-    HbMessageBox* dlg = static_cast<HbMessageBox*>( sender() );
-    if( dlg->actions().first() == answer ) {
-        userAccepted();
-    }
-}
-
-/*!
- *
- */
-void RadioViewBase::initBackAction()
-{
-    // The default back button activates the tuning view
-    HbAction* backAction = new HbAction( Hb::BackNaviAction, this );
-    Radio::connect( backAction,     SIGNAL(triggered()),
-                    mMainWindow,    SLOT(activateMainView()) );
-    setNavigationAction( backAction );
-}
-
-/*!
- *
- */
-void RadioViewBase::connectCommonMenuItem( int menuItem )
-{
-    switch ( menuItem ) {
-        case MenuItem::UseLoudspeaker:
-            mUseLoudspeakerAction = mUiLoader->findObject<HbAction>( DOCML::NAME_LOUDSPEAKER_ACTION );
-            if ( mUseLoudspeakerAction ) {
-                Radio::connect( mUseLoudspeakerAction, SIGNAL(triggered()), mUiEngine.data(), SLOT(toggleAudioRoute()) );
-                updateAudioRouting( mUiEngine->isUsingLoudspeaker() );
-                Radio::connect( mUiEngine.data(), SIGNAL(audioRouteChanged(bool)), this, SLOT(updateAudioRouting(bool)) );
-            }
-            break;
-
-        case MenuItem::Exit:
-            if ( HbAction* exitAction = mUiLoader->findObject<HbAction>( DOCML::NAME_EXIT_ACTION ) ) {
-                Radio::connect( exitAction, SIGNAL(triggered()), this, SLOT(quit()) );
-            }
-            break;
-
-        default:
-            break;
-    }
-}
-
-/*!
- *
- */
-void RadioViewBase::connectXmlElement( const QString& name, const char* signal, QObject* receiver, const char* slot )
-{
-    if ( QObject* action = mUiLoader->findObject<QObject>( name ) ) {
-        Radio::connect( action, signal, receiver, slot );
-    }
-}
-
-/*!
- *
- */
-void RadioViewBase::connectViewChangeMenuItem( QString name, const char* slot )
-{
-    if ( QObject* action = mUiLoader->findObject<QObject>( name ) ) {
-        Radio::connect( action, SIGNAL(triggered()), mMainWindow, slot );
-    }
-}
-
-/*!
- *
- */
-void RadioViewBase::loadSection( const QString& docml, const QString& section )
-{
-    LOG_FORMAT( "RadioViewBase::loadSection: Docml: %s, section: %s", GETSTRING( docml ), GETSTRING( section ) );
-    bool ok = false;
-    mUiLoader->load( docml, section, &ok );
-    LOG_ASSERT( ok, LOG_FORMAT( "Loading of section %s failed!", GETSTRING( section ) ) );
-}
-
-/*!
- *
- */
-void RadioViewBase::askQuestion( const QString& question )
-{
-    HbMessageBox::question( question, this, SLOT(handleUserAnswer(HbAction*)), HbMessageBox::Yes | HbMessageBox::No );
-}
-
-/*!
- *
- */
-void RadioViewBase::setOrientation()
-{
-    // Default implementation does nothing
-}
-
-/*!
- *
- */
-void RadioViewBase::userAccepted()
-{
-    // Default implementation does nothing
-}
--- a/radioapp/radiowidgets/src/radiowindow.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,257 +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:
-*
-*/
-
-// System includes
-#include <HbInstance>
-#include <HbAction>
-#include <HbDeviceMessageBox>
-#include <HbVolumeSliderPopup>
-
-// User includes
-#include "radiowindow.h"
-#include "radiomainview.h"
-#include "radiostationsview.h"
-#include "radiohistoryview.h"
-#include "radiouiengine.h"
-#include "radiostationmodel.h"
-#include "radiologger.h"
-#include "radiouiloader.h"
-
-// Constants
-
-/**
- * Timeout for volumesliderpopup
- */
-const int VOLUME_POPUP_TIMEOUT = 5000;
-
-/*!
- *
- */
-RadioWindow::RadioWindow( QWidget* parent ) :
-    HbMainWindow( parent )
-{
-}
-
-/*!
- *
- */
-RadioWindow::~RadioWindow()
-{
-    // Destructor needs to be defined. See explanation from RadioEngineWrapperPrivate destructor.
-}
-
-/*!
- *
- */
-void RadioWindow::showErrorMessage( const QString& text )
-{
-    HbDeviceMessageBox box( text, HbMessageBox::MessageTypeWarning );
-    box.setTimeout( HbPopup::NoTimeout );
-    box.setDismissPolicy( HbPopup::NoDismiss );
-    box.show();
-}
-
-/*!
- *
- */
-void RadioWindow::init()
-{
-    Radio::connect( this,                   SIGNAL(viewReady()),
-                    this,                   SLOT(initView()) );
-
-    activateMainView();
-}
-
-/*!
- * Returns the XML layout section that corresponds to the view orientation
- */
-QString RadioWindow::orientationSection()
-{
-    return orientation() == Qt::Vertical ? DOCML::SECTION_PORTRAIT : DOCML::SECTION_LANDSCAPE;
-}
-
-/*!
- *
- */
-void RadioWindow::activateMainView()
-{
-    if ( !mMainView ) {
-        mMainView = ViewPtr( new RadioMainView() );
-    }
-    activateView( mMainView.data(), DOCML::FILE_MAINVIEW, Hb::ViewSwitchUseBackAnim );
-}
-
-/*!
- *
- */
-void RadioWindow::activateStationsView()
-{
-    if ( !mStationsView ) {
-        mStationsView = ViewPtr( new RadioStationsView() );
-    }
-    activateView( mStationsView.data(), DOCML::FILE_STATIONSVIEW );
-}
-
-/*!
- *
- */
-void RadioWindow::activateHistoryView()
-{
-    if ( !mHistoryView ) {
-        mHistoryView = ViewPtr( new RadioHistoryView() );
-    }
-    activateView( mHistoryView.data(), DOCML::FILE_HISTORYVIEW );
-}
-
-/*!
- * Private slot
- *
- */
-void RadioWindow::initView()
-{
-    if ( !mUiEngine ) {
-        mUiEngine = QSharedPointer<RadioUiEngine>( new RadioUiEngine( this ) );
-
-        // Start the engine
-        if ( !mUiEngine->init() ) {
-            showErrorMessage( hbTrId( "txt_fmradio_info_fm_radio_could_not_be_started" ) );
-            qApp->quit();
-            return;
-        }
-
-        // MainWindow is the one that always listens for orientation changes and then delegates
-        // the updates to the views
-        Radio::connect( this,               SIGNAL(orientationChanged(Qt::Orientation)),
-                        this,               SLOT(updateOrientation(Qt::Orientation)) );
-
-        Radio::connect( mUiEngine.data(),   SIGNAL(volumeChanged(int)),
-                        this,               SLOT(showVolumeLevel(int)) );
-        Radio::connect( mUiEngine.data(),   SIGNAL(antennaStatusChanged(bool)),
-                        this,               SLOT(updateAntennaStatus(bool)) );
-        Radio::connect( mUiEngine.data(),   SIGNAL(powerOffRequested()),
-                        qApp,               SLOT(quit()) );
-    }
-
-    RadioViewBase* view = static_cast<RadioViewBase*>( currentView() );
-    if ( !view->isInitialized() ) {
-        view->initialize( mUiEngine );
-    }
-}
-
-/*!
- * Private slot
- *
- */
-void RadioWindow::updateOrientation( Qt::Orientation orientation )
-{
-    HbView* view = currentView();
-    RADIO_ASSERT( view, "RadioWindow::updateOrientation", "Current view not found!" );
-    if ( view ) {
-        static_cast<RadioViewBase*>( view )->updateOrientation( orientation );
-    }
-}
-
-/*!
- * Private slot
- *
- */
-void RadioWindow::showVolumeLevel( int volume )
-{
-    if ( !mVolSlider ) {
-        mVolSlider.reset( new HbVolumeSliderPopup() );
-        mVolSlider->setRange( 0, MAXIMUM_VOLUME_LEVEL );
-        mVolSlider->setSingleStep( 1 );
-        mVolSlider->setTimeout( VOLUME_POPUP_TIMEOUT );
-        Radio::connect( mVolSlider.data(),  SIGNAL(valueChanged(int)),
-                        mUiEngine.data(),   SLOT(setVolume(int)) );
-    }
-
-    mVolSlider->setValue( volume );
-    //TODO: Check if this should be localized
-    mVolSlider->setText( QString( "%L1%" ).arg( volume * 100 / MAXIMUM_VOLUME_LEVEL ) );
-    mVolSlider->show();
-}
-
-/*!
- * Private slot
- *
- */
-void RadioWindow::updateAntennaStatus( bool connected )
-{
-    if ( !connected ) {
-        if ( !mMessageBox ) {
-            mMessageBox.reset( new HbMessageBox() );
-        }
-        mMessageBox->setText( hbTrId( "txt_rad_dpophead_connect_wired_headset" ) );
-        mMessageBox->setDismissPolicy( HbPopup::NoDismiss );
-        mMessageBox->setTimeout( HbPopup::NoTimeout );
-//        mMessageBox->setAttribute( Qt::WA_DeleteOnClose, true );
-        mMessageBox->open();
-    } else {
-        mMessageBox.reset();
-    }
-}
-
-/*!
- *
- */
-void RadioWindow::activateView( RadioViewBase* aMember, const QString& docmlFile, Hb::ViewSwitchFlags flags )
-{
-    LOG_METHOD;
-    if ( aMember && aMember == currentView() ) {
-        return;
-    }
-
-    RadioViewBase* previousView = static_cast<RadioViewBase*>( currentView() );
-    if ( previousView && previousView->isTransient() ) {
-        removeView( previousView );
-        previousView->deleteLater();
-    }
-
-    bool viewCreated = false;
-    if ( !aMember->isInitialized() ) {
-        viewCreated = true;
-
-        QScopedPointer<RadioUiLoader> uiLoader( new RadioUiLoader() );
-
-        // By default the document loader would create a new HbView instance for our view so we need
-        // to use a silly little hack to prevent it. We call our view "view" and pass it to the document loader
-        // so it already exists.
-        aMember->setObjectName( DOCML::NAME_VIEW );
-        QObjectList objectList;
-        objectList.append( aMember );
-        uiLoader->setObjectTree( objectList );
-
-        bool ok = false;
-        uiLoader->load( docmlFile, &ok );
-
-        RADIO_ASSERT( ok , "FMRadio", "invalid DocML file" );
-        if ( !ok ) {
-            uiLoader.reset();
-            return;
-        }
-
-        aMember->setMembers( this, uiLoader.take() );
-        aMember->preLazyLoadInit();
-
-        addView( aMember );
-    }
-
-    aMember->updateOrientation( orientation(), viewCreated );
-
-    setCurrentView( aMember, true, flags );
-}
--- a/radioapp/radiowidgetsplugin/main.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +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:
-*
-*/
-
-// System includes
-#include <QtPlugin>
-#include <hbdocumentloaderplugin>
-
-// User includes
-#include "radiostationcarousel.h"
-#include "radiofrequencystrip.h"
-#include "radiofadinglabel.h"
-
-// Class declaration
-class RadioWidgetsPlugin : public HbDocumentLoaderPlugin
-{
-public:
-
-    QObject* createObject(const QString& type, const QString& name);
-    QList<const QMetaObject*> supportedObjects();
-
-};
-
-Q_EXPORT_PLUGIN(RadioWidgetsPlugin)
-
-/*!
- *
- */
-QObject* RadioWidgetsPlugin::createObject( const QString& type, const QString& name )
-{
-    QObject* object = 0;
-
-    if ( type == RadioStationCarousel::staticMetaObject.className() ) {
-        object = new RadioStationCarousel();
-    } else if ( type == RadioFrequencyStrip::staticMetaObject.className() ) {
-        object = new RadioFrequencyStrip();
-    } else if ( type == RadioFadingLabel::staticMetaObject.className() ) {
-        object = new RadioFadingLabel();
-    }
-
-    if ( object ) {
-        object->setObjectName( name );
-    }
-
-    return object;
-}
-
-/*!
- *
- */
-QList<const QMetaObject *> RadioWidgetsPlugin::supportedObjects()
-{
-    QList<const QMetaObject *> result;
-    result.append( &RadioFadingLabel::staticMetaObject );
-    result.append( &RadioFrequencyStrip::staticMetaObject );
-    result.append( &RadioStationCarousel::staticMetaObject );
-    return result;
-}
--- a/radioapp/radiowidgetsplugin/radiowidgetsplugin.pro	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +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:
-#
-
-TMP_DIR_NAME = widgetsplugin
-include(../buildflags.pri)
-
-TEMPLATE    = lib
-TARGET      = fmradiowidgetsplugin
-symbian:TARGET.UID3 = 0x2002FF4D
-
-CONFIG      += hb plugin
-QT          += core
-
-INCLUDEPATH += ../radiowidgets/inc
-INCLUDEPATH += ../../common
-
-symbian: {
-    pluginstub.sources      = fmradiowidgetsplugin.dll
-    pluginstub.path         = /resource/plugins
-    DEPLOYMENT              += pluginstub
-}
-
-SOURCES     += main.cpp
-
-LIBS        += -lfmradiowidgets
--- a/radioengine/engine/api/cradioengine.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,283 +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 CRADIOENGINE_H_
-#define CRADIOENGINE_H_
-
-// User includes
-#include "cradioroutableaudio.h"
-#include "radioenginedef.h"
-#include "radioengine.hrh"
-
-// Forward declarations
-class MRadioEngineInitializer;
-class CRadioAudioRouter;
-class CRadioSettings;
-class MRadioApplicationSettings;
-class MRadioEngineSettings;
-class CRadioSystemEventCollector;
-class CRadioRepositoryManager;
-class MRadioPresetSettings;
-class MRadioSettingsSetter;
-class MRadioEngineObserver;
-class MRadioRdsReceiver;
-
-/**
- * Convenience class to handle engine startup and the ownership of the related classes
- */
-NONSHARABLE_CLASS( CRadioEngine ) : public CRadioRoutableAudio
-    {
-public:
-
-    /**
-     * Starts the radio engine initialization.
-     * Asks the given initializer to create the member variables
-     */
-    IMPORT_C static CRadioEngine* NewL( MRadioEngineInitializer& aInitializer );
-
-    IMPORT_C ~CRadioEngine();
-
-    /**
-     * Returns a reference to the audio router
-     *
-     * @return  Reference to the audio router
-     */
-    virtual CRadioAudioRouter& AudioRouter() const = 0;
-
-    /**
-     * Returns the system event collector
-     *
-     * @return  The system event collector
-     */
-    virtual CRadioSystemEventCollector& SystemEventCollector() const = 0;
-
-    /**
-     * Returns a reference to the application settings
-     *
-     * @return  Reference to the application settings
-     */
-    virtual CRadioSettings& Settings() const = 0;
-
-    /**
-     * Determines radio region
-     */
-    virtual TRadioRegion DetermineRegion() = 0;
-
-    /**
-     * ( Re )initializes the radio.
-     *
-     * @param aRegionId Region id
-     */
-    virtual void InitRadioL( TInt aRegionId ) = 0;
-
-    /**
-     * Has the radio been initialized
-     *
-     * @return ETrue if radio is initialized, otherwise EFalse
-     */
-    virtual TBool RadioInitialized() const = 0;
-
-    /**
-     * Sets the state for radio audio
-     * This is the public interface to manage radio power state
-     * This method should be called before radio can turn itself on
-     *
-     * @param aEnable ETrue if radio audio can be played,
-     *                EFalse if audio should be disabled
-     * @param aDelay  ETrue if radio is played/disabled with delay
-     *                EFalse if radio is played/disabled without delay
-     */
-    virtual void EnableAudio( TBool aEnable, TBool aDelay = ETrue ) = 0;
-
-    /**
-     * Gets the state for radio audio.
-     *
-     * This returns the information if radio could be played when
-     * other conditions are valid. This should be false only when
-     * some other application has cause disabling of auto resume.
-     *
-     * @return ETrue if radio audio could be played,
-     *         EFalse if radio audio couldn't be played
-     */
-    virtual TBool RadioAudioEnabled() const = 0;
-
-    /**
-     * Sets the audio overriding flag
-     *
-     * @param aOverride ETrue if other audio resources are tried to be overriden.
-     */
-    virtual void SetAudioOverride( TBool aOverride ) = 0;
-
-    /**
-     * Adds an observer wich will be notified of the radio state changes
-     * If observer already exists, it is not added
-     *
-     * @param aObserver pointer of the observer instance.
-     */
-    virtual void AddObserverL( MRadioEngineObserver* aObserver ) = 0;
-
-    /**
-     * Removes a radio state change observer.
-     */
-    virtual void RemoveObserver( MRadioEngineObserver* aObserver ) = 0;
-
-    /**
-     * Sets audio mode ( Stereo/Mono )
-     *
-     * @param aAudioMode actual new radio mode
-     */
-    virtual void SetAudioMode( TInt aAudioMode ) = 0;
-
-    /**
-     * Compares if frequency is within limits range.
-     *
-     * @param aFrequency The frequency that is checked.
-     *                   If omitted, current frequency is checked.
-     * @return ETrue, if frequency is within radio range.
-     */
-    virtual TBool IsFrequencyValid( TUint32 aFrequency = 0 ) const = 0;
-
-    /**
-     * Sets or unsets the manual seek mode
-     *
-     * @param aManualSeekActive ETrue if active EFalse if not
-     */
-    virtual void SetManualSeekMode( TBool aManualSeekActive ) = 0;
-
-    /**
-     * Returns the manual seek mode status
-     */
-    virtual TBool IsInManualSeekMode() const = 0;
-
-    /**
-     * Tunes to frequency
-     * If radio is not initialized by InitRadioL, frequency is just
-     * set to settings.
-     *
-     * @param aFrequency frequency to tune to
-     * @param aReason reason for the frequency setting
-     */
-    virtual void SetFrequency( TUint32 aFrequency,
-            RadioEngine::TRadioFrequencyEventReason aReason = RadioEngine::ERadioFrequencyEventReasonUnknown ) = 0;
-
-    /**
-     * Performs seeking operation.
-     *
-     * @param aDirection direction of seeking operation.
-     */
-    virtual void Seek( RadioEngine::TRadioTuneDirection aDirection ) = 0;
-
-    /**
-     * Cancels an ongoing request to seek up/down.
-     */
-    virtual void CancelSeek() = 0;
-
-    /**
-     * Is the radio seeking up/down, or at all.
-     *
-     * @return Seeking state.
-     */
-    virtual RadioEngine::TRadioSeeking Seeking() const = 0;
-
-    /**
-     * Changes volume by one level.
-     *
-     * @param aDirection Direction of the volume change.
-     */
-    virtual void AdjustVolume( RadioEngine::TRadioVolumeSetDirection aDirection ) = 0;
-
-    /**
-     * Sets volume level
-     *
-     * @param aVolume new volume level.
-     */
-    virtual void SetVolume( TInt aVolume ) = 0;
-
-    /**
-     * Sets volume to be muted.
-     *
-     * @param aMute mute status.
-     */
-    virtual void SetVolumeMuted( TBool aMute, TBool aUpdateSettings = ETrue ) = 0;
-
-    /**
-     * Retrieves current antenna state.
-     *
-     * @return ETrue if antenna is attached, EFalse otherwise.
-     */
-    virtual TBool IsAntennaAttached() = 0;
-
-    /**
-     * Retrieves current state of fm transmitter.
-     *
-     * @return ETrue if fm transmitter is active, EFalse otherwise.
-     */
-    virtual TBool IsFmTransmitterActive() const = 0;
-
-    /**
-     * Changes the antenna state.
-     * This should only be used when faking the antenna
-     * state in emulator environment.
-     * Thus this should work only in WINS.
-     *
-     * @param aAntennaAttached The new antenna state.
-     */
-    virtual void SetAntennaAttached( TBool aAntennaAttached ) = 0;
-
-    /**
-     * Returns the maximum volume level
-     *
-     * @return maximum volume level
-     */
-    virtual TInt MaxVolumeLevel() const = 0;
-
-    /**
-     * Has the frequency been set by RDS AF search or not.
-     *
-     * @return ETrue if frequency was set by RDS AF, otherwise EFalse
-     */
-    virtual TBool FrequencySetByRdsAf() const = 0;
-
-    /**
-     * Getter for RDS receiver
-     *
-     * @return Reference to CRadioRdsReceiver
-     */
-     virtual MRadioRdsReceiver& RdsReceiver() = 0;
-
-    /**
-     * Is routing between loudspeaker and headset possible
-     *
-     * @return ETrue, if routing is possible
-     */
-     virtual TBool IsAudioRoutingPossible() const = 0;
-
-    /**
-     * Checks if the radio playing parameters are OK
-     *
-     * @param aFrequency The frequency that is wanted to play.
-     * @return ETrue if audio can be played, otherwise EFalse
-     */
-    virtual TBool OkToPlay( TUint32 aFrequency ) const = 0;
-
-protected:
-
-    CRadioEngine( CRadioAudioRouter* aAudioRouter );
-
-    };
-
-#endif // CRADIOENGINE_H_
--- a/radioengine/engine/api/mradioengineinitializer.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +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 MRADIOENGINEINITIALIZER_H_
-#define MRADIOENGINEINITIALIZER_H_
-
-// System includes
-#include <e32std.h>
-
-// Forward declarations
-class CRadioAudioRouter;
-class CRadioSystemEventCollector;
-class CRadioSettings;
-class CRadioEngine;
-
-NONSHARABLE_CLASS( MRadioEngineInitializer )
-    {
-public:
-
-    virtual CRadioAudioRouter* InitAudioRouterL() = 0;
-    virtual CRadioSystemEventCollector* InitSystemEventCollectorL() = 0;
-    virtual CRadioSettings* InitSettingsL() = 0;
-
-    };
-
-#endif // MRADIOENGINEINITIALIZER_H_
--- a/radioengine/engine/api/mradioengineobserver.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,74 +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 MRADIOENGINEOBSERVER_H
-#define MRADIOENGINEOBSERVER_H
-
-// User includes
-#include "radioenginedef.h"
-
-/**
-* Observer for radio state changes.
-*/
-NONSHARABLE_CLASS( MRadioEngineObserver )
-    {
-    public:
-
-    virtual void PowerEventL( TBool aPowerState, TInt aErrorCode ) = 0;
-
-    /**
-    * Notifies when frequency changes
-    * @param aFrequency The new frequency
-    * @param aReason reason why the frequency changed
-    * @param aErrorCode code related to state change
-    */
-    virtual void FrequencyEventL( TUint32 aFrequency, RadioEngine::TRadioFrequencyEventReason aReason, TInt aErrorCode ) = 0;
-    virtual void VolumeEventL( TInt aVolume, TInt aErrorCode ) = 0;
-    virtual void MuteEventL( TBool aMuteState, TInt aErrorCode ) = 0;
-    virtual void AudioModeEventL( TInt aAudioMode, TInt aErrorCode ) = 0;
-    virtual void AntennaEventL( TBool aAntennaAttached, TInt aErrorCode ) = 0;
-
-    /**
-    * Notifies when audio routing changes
-    * @param aAudioDestination The new output device
-    * @param aErrorCode Error code related to state change
-    */
-    virtual void AudioRoutingEventL( TInt aAudioDestination, TInt aErrorCode ) = 0;
-
-    /**
-    * Notifies about seeking events
-    * @param aSeekingState The seeking state
-    * @param aErrorCode KErrNone for successful starting or completion of seeking
-    */
-    virtual void SeekingEventL( TInt aSeekingState, TInt aErrorCode ) = 0;
-
-    /**
-     * Notifies about region changes
-     *
-     * @param aRegion The ID of the new region
-     * @param aErrorCode Region event error code
-     */
-    virtual void RegionEventL( TInt aRegion, TInt aErrorCode ) = 0;
-
-    /**
-     * Notifies about fm transmitter activating
-     */
-    virtual void FmTransmitterEventL( TBool aActive ) = 0;
-
-    };
-
-#endif // MRADIOENGINEOBSERVER_H
--- a/radioengine/engine/api/mradiordsdataobserver.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +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 MRADIORDSDATAOBSERVER_H
-#define MRADIORDSDATAOBSERVER_H
-
-// System includes
-#include <e32std.h>
-
-// Class declaration
-NONSHARABLE_CLASS( MRadioRdsDataObserver )
-    {
-public:
-
-    /**
-     * Notifies of the status of RDS signal
-     */
-    virtual void RdsAvailable( TUint32 aFrequency, TBool aAvailable ) = 0;
-
-    /**
-     * Notifies of the beginning of Alternate Frequency search
-     */
-    virtual void RdsAfSearchBegin() = 0;
-
-    /**
-     * Notifies of the completed Alternate Frequency search
-     *
-     * @param aFrequency The new frequency
-     * @param aError A standard system error code
-     */
-    virtual void RdsAfSearchEnd( TUint32 aFrequency, TInt aError ) = 0;
-
-    /**
-     * Notifies of the changed Alternate Frequency search state
-     *
-     * @param aEnabled ETrue if AF search was enabled, otherwise EFalse
-     */
-    virtual void RdsAfSearchStateChange( TBool aEnabled ) = 0;
-
-    /**
-     * Programme Service data available
-     *
-     * @param aProgramService The new Programme Service data
-     */
-    virtual void RdsDataProgrammeService( TUint32 aFrequency, const TDesC& aProgramService ) = 0;
-
-    /**
-     * Radio text data available
-     *
-     * @param aRt The new radio text data
-     */
-    virtual void RdsDataRadioText( TUint32 aFrequency, const TDesC& aRt ) = 0;
-
-    /**
-     * Radio text plus data available.
-     *
-     * @param aRtPlusClass The class of the radio text plus data. Radio text plus classes are
-     *                     specified in TRdsRTplusClass enumeration.
-     * @param aRtPlusData The new radio text plus data.
-     */
-    virtual void RdsDataRadioTextPlus( TUint32 aFrequency, const TInt aRtPlusClass, const TDesC& aRtPlusData ) = 0;
-
-    /**
-     * Radio genre available
-     */
-    virtual void RdsDataGenre( TUint32 aFrequency, const TInt aGenre ) = 0;
-
-    /**
-     * Radio PI code available
-     */
-    virtual void RdsDataPiCode( TUint32 aFrequency, const TInt aPiCode ) = 0;
-
-    };
-
-#endif // MRADIORDSDATAOBSERVER_H
--- a/radioengine/engine/api/mradiordsreceiver.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +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 MRADIORDSRECEIVER_H
-#define MRADIORDSRECEIVER_H
-
-// Forward declarations
-class CRadioUtility;
-class MRadioRdsDataObserver;
-
-NONSHARABLE_CLASS( MRadioRdsReceiver )
-    {
-public:
-
-    /**
-     * Initializes the RDS receiver
-     *
-     * @param aRadioUtility A reference to the radio utility
-     * @param aPubSub       Pointer to Publish&Subscribe object
-     */
-    virtual void InitL( CRadioUtility& aRadioUtility ) = 0;
-
-    /**
-     * Adds an observer wich will be notified of the new RDS data
-     * If observer already exists, it is not added
-     *
-     * @param aObserver pointer of the observer instance.
-     */
-    virtual void AddObserverL( MRadioRdsDataObserver* aObserver ) = 0;
-
-    /**
-     * Removes the rds observer.
-     */
-    virtual void RemoveObserver( MRadioRdsDataObserver* aObserver ) = 0;
-
-    /**
-     * Getter for automatic switching state of alternate frequencies
-     *
-     * @return ETrue if automatic switching is enabled
-     */
-    virtual TBool AutomaticSwitchingEnabled() const = 0;
-
-    /**
-     * Getter for the programme service name
-     *
-     * @return Programme service name
-     */
-    virtual const TDesC& ProgrammeService() const = 0;
-
-    /**
-     * Getter for the radio text.
-     *
-     * @return Radio text.
-     */
-    virtual const TDesC& RadioText() const = 0;
-
-    /**
-     * Getter for the RDS signal availability
-     *
-     * @return ETrue if RDS signal is available, otherwise EFalse
-     */
-    virtual TBool SignalAvailable() const = 0;
-
-    /**
-     * Setter for automatic switching of alternate frequencies
-     * If this method is overridden, the base implementation should be called
-     *
-     * @param aEnable ETrue, if automatic swithing is to be enabled
-     */
-    virtual void SetAutomaticSwitchingL( TBool aEnable ) = 0;
-
-    /**
-     * Starts receiving the RDS information
-     */
-    virtual void StartReceiver() = 0;
-
-    /**
-     * Stops receiving the RDS information
-     */
-    virtual void StopReceiver() = 0;
-
-    };
-
-#endif // MRADIORDSRECEIVER_H
--- a/radioengine/engine/bwins/fmradioengineu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-EXPORTS
-	??1CRadioEngine@@UAE@XZ @ 1 NONAME ; CRadioEngine::~CRadioEngine(void)
-	?NewL@CRadioEngine@@SAPAV1@AAVMRadioEngineInitializer@@@Z @ 2 NONAME ; class CRadioEngine * CRadioEngine::NewL(class MRadioEngineInitializer &)
-
--- a/radioengine/engine/eabi/fmradioengineu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-EXPORTS
-	_ZN12CRadioEngine4NewLER23MRadioEngineInitializer @ 1 NONAME
-	_ZN12CRadioEngineD0Ev @ 2 NONAME
-	_ZN12CRadioEngineD1Ev @ 3 NONAME
-	_ZN12CRadioEngineD2Ev @ 4 NONAME
-
--- a/radioengine/engine/group/bld.inf	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#include "../../group/buildflags.hrh"
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-WINSCW ARMV5
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-radioengine.mmp
--- a/radioengine/engine/group/radioengine.mmp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +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 "../../group/buildflags.hrh"
-
-#include <platform_paths.hrh>
-
-#include <data_caging_paths.hrh>
-
-TARGET                  fmradioengine.dll
-TARGETTYPE              DLL
-UID                     0x1000008D 0x2002FF4F
-VERSION                 11.0
-
-CAPABILITY              CAP_GENERAL_DLL
-VENDORID                VID_DEFAULT
-
-PAGED
-SMPSAFE
-
-SOURCEPATH              ../src
-SOURCE                  cradioengine.cpp
-SOURCE                  cradioengineimp.cpp
-SOURCE                  cradiordsreceiver.cpp
-SOURCE                  cradiordsreceiverbase.cpp
-SOURCE                  cradionetworkinfolistener.cpp
-
-USERINCLUDE             ../api
-USERINCLUDE             ../inc
-USERINCLUDE             ../../utils/api
-USERINCLUDE             ../../settings/api
-USERINCLUDE             ../../group
-
-// Default system include paths for application layer modules.
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY                 fmradioengineutils.lib
-LIBRARY                 fmradioenginesettings.lib
-
-LIBRARY                 AudioOutputRouting.lib
-LIBRARY                 euser.lib
-LIBRARY                 efsrv.lib
-LIBRARY                 Radio_Utility.lib
-LIBRARY                 cone.lib
-LIBRARY                 etel3rdparty.lib            // For CTelephony
-LIBRARY                 etel.lib                    // For RTelServer
-LIBRARY                 etelmm.lib                  // For RMobilePhone
-LIBRARY                 commsdat.lib                // For CommsDat
-LIBRARY                 timezonelocalization.lib    // For CTzLocalizer
-LIBRARY                 bafl.lib                    // For CDesCArray
--- a/radioengine/engine/inc/cradioengineimp.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,383 +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 CRADIOENGINEIMP_H
-#define CRADIOENGINEIMP_H
-
-// System includes
-#include <RadioFmTunerUtility.h>
-#include <RadioPlayerUtility.h>
-#include <RadioUtility.h>
-
-// User includes
-#include "cradioengine.h"
-#include "mradiosettingsobserver.h"
-#include "mradiordsdataobserver.h"
-#include "mradiosystemeventobserver.h"
-#include "radioenginedef.h"
-
-// Forward declarations
-class CRadioRdsReceiverBase;
-class CRadioNetworkInfoListener;
-class MRadioEngineSettings;
-class MRadioSettingsSetter;
-class MRadioEngineObserver;
-
-/**
- * Radio class takes care of the FM-radio side.
- */
-NONSHARABLE_CLASS( CRadioEngineImp ) : public CRadioEngine
-                                     , public MRadioSystemEventObserver
-                                     , public MRadioFmTunerObserver
-                                     , public MRadioPlayerObserver
-                                     , public MRadioSettingsObserver
-                                     , public MRadioRdsDataObserver
-    {
-    friend class CRadioEngine;
-
-public:
-
-    ~CRadioEngineImp();
-
-    void SetSystemEventCollector( CRadioSystemEventCollector* aCollector );
-    void SetRadioSettings( CRadioSettings* aSettings );
-
-private:
-
-    CRadioEngineImp( CRadioAudioRouter* aAudioRouter );
-
-// from base class CRadioEngine
-
-    CRadioAudioRouter& AudioRouter() const;
-    CRadioSystemEventCollector& SystemEventCollector() const;
-    CRadioSettings& Settings() const;
-    TRadioRegion DetermineRegion();
-    void InitRadioL( TInt aRegionId );
-    TBool RadioInitialized() const;
-    void EnableAudio( TBool aEnable, TBool aDelay = ETrue );
-    TBool RadioAudioEnabled() const;
-    void SetAudioOverride( TBool aOverride );
-    void AddObserverL( MRadioEngineObserver* aObserver );
-    void RemoveObserver( MRadioEngineObserver* aObserver );
-    void SetAudioMode( TInt aAudioMode );
-    TBool IsFrequencyValid( TUint32 aFrequency = 0 ) const;
-    void SetManualSeekMode( TBool aManualSeekActive );
-    TBool IsInManualSeekMode() const;
-    void SetFrequency( TUint32 aFrequency,
-            RadioEngine::TRadioFrequencyEventReason aReason = RadioEngine::ERadioFrequencyEventReasonUnknown );
-    void Seek( RadioEngine::TRadioTuneDirection aDirection );
-    void CancelSeek();
-    RadioEngine::TRadioSeeking Seeking() const;
-    void AdjustVolume( RadioEngine::TRadioVolumeSetDirection aDirection );
-    void SetVolume( TInt aVolume );
-    void SetVolumeMuted( TBool aMute, TBool aUpdateSettings = ETrue );
-    TBool IsAntennaAttached();
-    TBool IsFmTransmitterActive() const;
-    void SetAntennaAttached( TBool aAntennaAttached );
-    TInt MaxVolumeLevel() const;
-    TBool FrequencySetByRdsAf() const;
-    MRadioRdsReceiver& RdsReceiver();
-    TBool IsAudioRoutingPossible() const;
-    TBool OkToPlay( TUint32 aFrequency ) const;
-
-private:
-
-    /** Radio event notifications */
-    enum TRadioEventNotification
-        {
-        ERadioEventPower = 1,
-        ERadioEventFrequency,
-        ERadioEventVolume,
-        ERadioEventMute,
-        ERadioEventAudioMode,
-        ERadioEventAntenna,
-        ERadioEventAudioRouting,
-        ERadioEventSeeking,
-        ERadioEventRegion,
-        ERadioEventFmTransmitter
-        };
-
-    enum TRadioInitialisationState
-        {
-        ERadioNotInitialized,
-        ERadioUtilitiesConstructed,
-        ERadioTunerControlRequested,
-        ERadioTunerControlGranted
-        };
-
-    void ConstructL();
-
-    /**
-     * Switches power on/off after a delay
-     *
-     * @param aPowerOn ETrue if power is to be switched on,
-     *                 EFalse if power is to be switched off
-     */
-    void SwitchPower( TBool aPowerOn );
-
-    /**
-     * Callback for switching the radio power on
-     *
-     * @param aSelfPtr A pointer to CRadioEngineImp instance
-     * @return KErrNone
-     */
-    static TInt StaticPowerOnCallback( TAny* aSelfPtr );
-
-    /**
-     * Callback for switching the radio power off
-     *
-     * @param aSelfPtr A pointer to CRadioEngineImp instance
-     * @return KErrNone
-     */
-    static TInt StaticPowerOffCallback( TAny* aSelfPtr );
-
-    /**
-     * Switches radio power ON.
-     */
-    void PowerOn();
-
-    /**
-     * Switches radio power OFF.
-     */
-    void PowerOff();
-
-    /**
-     * Requests tuner control from tuner utility
-     */
-    void RequestTunerControl();
-
-    /**
-     * Converts region code used internally by Visual Radio
-     * in to a frequency range by tuner ( TFmRadioFrequencyRange )
-     *
-     * @param aRegionId VR region ID
-     * @return Frequency range
-     */
-    TFmRadioFrequencyRange TunerFrequencyRangeForRegionId( TInt aRegionId ) const;
-
-    /**
-     * Non-leaving version of DoNotifyRadioEventL.
-     * @param aRadioEvent event notification ( identification )
-     * @param aErrorCode error code related to state change
-     */
-    void NotifyRadioEvent( TInt aRadioEvent, TInt aErrorCode = KErrNone );
-
-    /**
-     * Leaving version of DoNotifyRadioEvent.
-     * @param aRadioEvent event notification ( identification )
-     * @param aErrorCode error code related to state change
-     */
-    void DoNotifyRadioEventL( TInt aRadioEvent, TInt aErrorCode = KErrNone );
-
-    /**
-     * Handles the change in audio routing
-     *
-     * @param aDestination The new routing destination
-     */
-    void HandleAudioRoutingEvent( RadioEngine::TRadioAudioRoute aDestination );
-
-    /**
-     * Handles the change in power state
-     *
-     * @param aPowerOn The power state
-     * @param aErrorCode Error code related to state change
-     */
-    void HandlePowerEvent( TBool aPowerOn, TInt aErrorCode = KErrNone );
-
-    /**
-     * Handles the change in power state
-     *
-     * @param aFrequency The current frequency
-     * @param aErrorCode Error code related to state change
-     */
-    void HandleFrequencyEvent( TUint32 aFrequency, TInt aErrorCode = KErrNone );
-
-    /**
-     * Converts the volume used by Visual Radio to volume used by Radio Utility
-     *
-     * @param aUiVolume The Volume used by Visual Radio
-     * @return The volume used by Radio Utility
-     */
-    TInt TunerVolumeForUiVolume( TInt aUiVolume );
-
-// from base class MRadioSystemEventObserver
-
-    void HandleSystemEventL( TRadioSystemEventType aEventType );
-
-// from base class MRadioFmTunerObserver
-
-    void MrftoRequestTunerControlComplete( TInt aError );
-    void MrftoSetFrequencyRangeComplete( TInt aError );
-    void MrftoSetFrequencyComplete( TInt aError );
-    void MrftoStationSeekComplete( TInt aError, TInt aFrequency );
-    void MrftoFmTransmitterStatusChange( TBool aActive );
-    void MrftoAntennaStatusChange( TBool aAttached );
-    void MrftoOfflineModeStatusChange( TBool aOfflineMode );
-    void MrftoFrequencyRangeChange( TFmRadioFrequencyRange aBand );
-    void MrftoFrequencyChange( TInt aNewFrequency );
-    void MrftoForcedMonoChange( TBool aForcedMono );
-    void MrftoSquelchChange( TBool aSquelch );
-
-// from base class MRadioPlayerObserver
-
-    void MrpoStateChange( TPlayerState aState, TInt aError );
-    void MrpoVolumeChange( TInt aVolume );
-    void MrpoMuteChange( TBool aMute );
-    void MrpoBalanceChange( TInt aLeftPercentage, TInt aRightPercentage );
-
-// from base class MRadioSettingsObserver
-
-    void RdsAfSearchSettingChangedL( TBool aEnabled );
-    void RegionSettingChangedL( TInt aRegion );
-
-// from base class MRadioRdsDataObserver
-
-    void RdsAvailable( TUint32 /*aFrequency*/, TBool /*aAvailable*/ ) {}
-    void RdsAfSearchBegin();
-    void RdsAfSearchEnd( TUint32 aFrequency, TInt aError );
-    void RdsAfSearchStateChange( TBool /*aEnabled*/ ) {}
-    void RdsDataProgrammeService( TUint32 /*aFrequency*/, const TDesC& /*aProgramService*/ ) {}
-    void RdsDataRadioText( TUint32 /*aFrequency*/, const TDesC& /*aRadioText*/ ) {}
-    void RdsDataRadioTextPlus( TUint32 /*aFrequency*/, const TInt /*aRadioTextPlusClass*/, const TDesC& /*aRadioText*/ ) {}
-    void RdsDataGenre( TUint32 /*aFrequency*/, const TInt /*aGenre*/ ) {}
-    void RdsDataPiCode( TUint32 /*aFrequency*/, const TInt /*aPiCode*/ ) {}
-
-// New functions
-
-    /**
-     * Tries to figure the region out based on current mobile network id
-     */
-    TRadioRegion RegionFromMobileNetwork() const;
-
-    /**
-     * Tries to figure the region out based on timezone selection
-     */
-    TRadioRegion RegionFromTimezone() const;
-
-    /**
-     * Performs the timezone-based check
-     */
-    TRadioRegion DoRegionFromTimezoneL() const;
-
-private: // data
-
-    /**
-     * Array of state change observers.
-     */
-    RPointerArray<MRadioEngineObserver>         iObservers;
-
-    /**
-     * A pointer to system event collector
-     * Own.
-     */
-    CRadioSystemEventCollector*                 iSystemEventCollector;
-
-    /**
-     * Radio settings
-     * Own.
-     */
-    CRadioSettings*                             iSettings;
-
-    /**
-     * Network info listener
-     * Own.
-     */
-    CRadioNetworkInfoListener*                  iNetworkInfoListener;
-
-    /**
-     * Controls the radio hardware
-     */
-    CRadioUtility*                              iRadioUtility;
-
-    /**
-     * Controls FM radio tuner. Not owned.
-     */
-    CRadioFmTunerUtility*                       iTunerUtility;
-
-    /**
-     * Controls the radio player. Not owned.
-     */
-    CRadioPlayerUtility*                        iPlayerUtility;
-
-    /**
-     * Receives and notifies of the RDS data
-     */
-    CRadioRdsReceiverBase*                      iRdsReceiver;
-
-    /**
-     * State for radio initialization
-     */
-    TRadioInitialisationState                   iRadioInitializationState;
-
-    /**
-     * Radio on/off timer.
-     */
-    CPeriodic*                                  iRadioTimer;
-
-    /**
-    * If this is true, audio resource availability is ignored on next radio power on
-    */
-    TBool                                       iOverrideAudioResources;
-
-    /**
-     * Direction of the previous seek request, needed for canceling
-     */
-    RadioEngine::TRadioSeeking                  iSeekingState;
-
-    /**
-     * Antenna state.
-     */
-    TBool                                       iAntennaAttached;
-
-    /**
-     * Radio enabling state
-     */
-    TBool                                       iRadioEnabled;
-
-    /**
-     * ETrue if frequency was set by RDS AF
-     */
-    TBool                                       iFrequencySetByRdsAf;
-
-    /**
-     * The state of the fm transmitter
-     */
-    TBool                                       iFmTransmitterActive;
-
-    /**
-     * Cause for the ongoing frequency change operation.
-     */
-    RadioEngine::TRadioFrequencyEventReason     iFreqEventReason;
-
-    /**
-     * The previously scanned frequency, or <code>KErrNotFound</code> if none.
-     */
-    TUint32                                     iPreviousScannedFrequency;
-
-    /**
-     * The state of mute before scan has been started.
-     */
-    TBool                                       iPreviousMuteState;
-
-    /**
-     * Manual seek mode flag
-     */
-    TBool                                       iManualSeekMode;
-
-    };
-
-#endif  // CRADIOENGINEIMP_H
-
--- a/radioengine/engine/inc/cradionetworkinfolistener.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef C_RADIONETWORKINFOLISTENER_H
-#define C_RADIONETWORKINFOLISTENER_H
-
-// System includes
-#include <e32base.h>
-#include <etel3rdparty.h>
-
-// Forward declarations
-class CTelephony;
-class MRadioSettingsSetter;
-
-/**
- * An interface for notifying about network id changes
- */
-NONSHARABLE_CLASS( MRadioNetworkChangeObserver )
-    {
-public:
-
-    /**
-     * Used for notifying that the network id has changed
-     */
-    virtual void NetworkIdChanged() = 0;
-
-    };
-
-/**
- * Listens changes in network ID and country code.
- */
-NONSHARABLE_CLASS( CRadioNetworkInfoListener ) : public CActive
-    {
-public:
-
-    static CRadioNetworkInfoListener* NewL( MRadioSettingsSetter& aSetter,
-                                            MRadioNetworkChangeObserver* aObserver );
-
-    ~CRadioNetworkInfoListener();
-
-    /**
-     * Return current combined network ID and country code as TInt.
-     * @return   An integer composed of the current network ID and country code.
-     */
-    TInt CompoundNetworkId() const;
-
-    /**
-     * Returns current country code.
-     * @return   The current country code.
-     */
-    TPtrC CountryCode() const;
-
-    /**
-     * SubscriberId
-     * @return subscriber id
-     */
-    TPtrC SubscriberId() const;
-
-private:
-
-    CRadioNetworkInfoListener( MRadioSettingsSetter& aSetter,
-                               MRadioNetworkChangeObserver* aObserver );
-
-    void ConstructL();
-
-// from base class CActive
-
-    void DoCancel();
-    void RunL();
-
-// New functions
-
-    void SaveNetworkInfoL();
-
-private: // data
-
-    MRadioSettingsSetter&           iSetter;
-
-    MRadioNetworkChangeObserver*    iObserver;
-
-#ifndef __WINS__
-    CTelephony*                     iTelephony;
-#endif
-
-    CTelephony::TSubscriberIdV1     iSubscriberId;
-    CTelephony::TSubscriberIdV1Pckg iSubscriberIdPckg;
-    CTelephony::TNetworkInfoV1      iNetworkInfo;
-    CTelephony::TNetworkInfoV1Pckg  iNetworkInfoPckg;
-
-    TInt                            iCompoundNetworkId;
-    TInt                            iPreviousCompoundNetworkId;
-
-    };
-
-#endif // C_RADIONETWORKINFOLISTENER_H
--- a/radioengine/engine/inc/cradiordsreceiver.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +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 CRADIORDSRECEIVER_H
-#define CRADIORDSRECEIVER_H
-
-// User includes
-#include "cradiordsreceiverbase.h"
-
-// Forward declarations
-class MRadioEngineSettings;
-
-// Class declaration
-NONSHARABLE_CLASS( CRadioRdsReceiver ) : public CRadioRdsReceiverBase
-    {
-public:
-
-    static CRadioRdsReceiver* NewL( MRadioEngineSettings& aSettings );
-
-    virtual ~CRadioRdsReceiver();
-
-private:
-
-    CRadioRdsReceiver( MRadioEngineSettings& aSettings );
-
-    void ConstructL();
-
-// from base class MRadioRdsReceiver
-
-    void InitL( CRadioUtility& aRadioUtility );
-    void SetAutomaticSwitchingL( TBool aEnable );
-    void StartReceiver();
-    void StopReceiver();
-
-// New functions
-
-    /**
-     * Logs the RDS receiver capabilities if logging is enabled
-     */
-    void LogReceiverCapabilities();
-
-private: // data
-
-    /** The RDS utility */
-    CRadioRdsUtility*   iRdsUtility;
-
-    /** State of the RDS receiver */
-    TBool               iStarted;
-
-    };
-
-#endif // CRADIORDSRECEIVER_H
--- a/radioengine/engine/inc/cradiordsreceiverbase.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,165 +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 CRADIORDSRECEIVERBASE_H
-#define CRADIORDSRECEIVERBASE_H
-
-// System includes
-#include <RadioRdsUtility.h>
-
-// User includes
-#include "mradioenginesettings.h"
-#include "mradiordsdataobserver.h"
-#include "mradiordsreceiver.h"
-
-// Forward declarations
-class CRadioUtility;
-
-// Class declaration
-NONSHARABLE_CLASS( CRadioRdsReceiverBase ) : public CBase
-                                           , public MRadioRdsReceiver
-                                           , public MRadioRdsObserver
-    {
-public:
-
-    /**
-     * The destructor
-     */
-    virtual ~CRadioRdsReceiverBase();
-
-    /**
-     * Adds an observer wich will be notified of the new RDS data
-     * If observer already exists, it is not added
-     *
-     * @param aObserver pointer of the observer instance.
-     */
-    void AddObserverL( MRadioRdsDataObserver* aObserver );
-
-    /**
-     * Removes the rds observer.
-     */
-    void RemoveObserver( MRadioRdsDataObserver* aObserver );
-
-    /**
-     * Getter for automatic switching state of alternate frequencies
-     *
-     * @return ETrue if automatic switching is enabled
-     */
-    TBool AutomaticSwitchingEnabled() const;
-
-    /**
-     * Getter for the programme service name
-     *
-     * @return Programme service name
-     */
-    const TDesC& ProgrammeService() const;
-
-    /**
-     * Getter for the radio text.
-     *
-     * @return Radio text.
-     */
-    const TDesC& RadioText() const;
-
-    /**
-     * Getter for the RDS signal availability
-     *
-     * @return ETrue if RDS signal is available, otherwise EFalse
-     */
-    TBool SignalAvailable() const;
-
-    /**
-     * Setter for automatic switching of alternate frequencies
-     * If this method is overridden, the base implementation should be called
-     *
-     * @param aEnable ETrue, if automatic swithing is to be enabled
-     */
-    virtual void SetAutomaticSwitchingL( TBool aEnable );
-
-    /**
-     * Clears the RDS information
-     */
-    void ClearRdsInformation();
-
-protected:
-
-    CRadioRdsReceiverBase( MRadioEngineSettings& aSettings );
-
-    void BaseConstructL();
-
-// from base class MRadioRdsObserver
-
-    void MrroStationSeekByPTYComplete( TInt aError, TInt aFrequency );
-    void MrroStationSeekByTAComplete( TInt aError, TInt aFrequency );
-    void MrroStationSeekByTPComplete( TInt aError, TInt aFrequency );
-    void MrroGetFreqByPTYComplete( TInt aError, RArray<TInt>& aFreqList );
-    void MrroGetFreqByTAComplete( TInt aError, RArray<TInt>& aFreqList );
-    void MrroGetPSByPTYComplete( TInt aError, RArray<TRdsPSName>& aPsList );
-    void MrroGetPSByTAComplete( TInt aError, RArray<TRdsPSName>& aPsList );
-    void MrroRdsDataPI( TInt aPi );
-    void MrroRdsDataPTY( TRdsProgrammeType aPty );
-    void MrroRdsDataPS( TRdsPSName& aPs );
-    void MrroRdsDataRT( TRdsRadioText& aRt );
-    void MrroRdsDataCT( TDateTime& aCt );
-    void MrroRdsDataTA( TBool aTaOn );
-    void MrroRdsDataRTplus( TRdsRTplusClass aRtPlusClass, TRdsRadioText& aRtPlusData );
-    void MrroRdsSearchBeginAF();
-    void MrroRdsSearchEndAF( TInt aError, TInt aFrequency );
-    void MrroRdsStationChangeTA( TInt aFrequency );
-    void MrroRdsEventAutomaticSwitchingChange( TBool aAuto );
-    void MrroRdsEventAutomaticTrafficAnnouncement( TBool aAuto );
-    void MrroRdsEventSignalChange( TBool aSignal );
-
-protected: // data
-
-    /**
-     * The radio settings
-     */
-    MRadioEngineSettings&               iSettings;
-
-private: // data
-
-    /**
-     * Array of RDS observers.
-     */
-    RPointerArray<MRadioRdsDataObserver> iObservers;
-
-    /**
-     * The programme service name cache.
-     * Own.
-     */
-    HBufC*                              iPsName;
-
-    /**
-     * The RDS radio text
-     * Own.
-     */
-    RBuf                                iRadioText;
-
-    /**
-     * ETrue if the RDS signal is available
-     */
-    TBool                               iSignalAvailable;
-
-    /**
-     * ETrue if AF is enabled
-     */
-    TBool                               iAfEnabled;
-
-    };
-
-#endif // CRADIORDSRECEIVERBASE_H
--- a/radioengine/engine/src/cradioengine.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +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:
-*
-*/
-
-// User includes
-#include "cradioengine.h"
-#include "cradioengineimp.h"
-#include "cradioenginelogger.h"
-#include "mradioengineinitializer.h"
-#include "radioengineutils.h"
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------------------------
-// Starts the radio engine initialization.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CRadioEngine* CRadioEngine::NewL( MRadioEngineInitializer& aInitializer )
-    {
-    RadioEngineUtils::InitializeL();
-    LEVEL3( LOG_METHOD_AUTO );
-    CRadioAudioRouter* audioRouter = aInitializer.InitAudioRouterL();
-    CleanupStack::PushL( audioRouter );
-
-    CRadioEngineImp* self = new (ELeave) CRadioEngineImp( audioRouter );
-    CleanupStack::Pop( audioRouter );
-    CleanupStack::PushL( self );
-
-    self->SetSystemEventCollector( aInitializer.InitSystemEventCollectorL() );
-    self->SetRadioSettings( aInitializer.InitSettingsL() );
-    self->ConstructL();
-
-    self->InitRadioL( self->DetermineRegion() );
-    self->EnableAudio( ETrue );
-
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioEngine::CRadioEngine( CRadioAudioRouter* aAudioRouter )
-    : CRadioRoutableAudio( aAudioRouter )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CRadioEngine::~CRadioEngine()
-    {
-    RadioEngineUtils::Release();
-    }
--- a/radioengine/engine/src/cradioengineimp.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1739 +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:
-*
-*/
-
-// System includes
-#include <AudioOutput.h>
-#include <eikdef.h>
-#include <coemain.h>
-#include <badesca.h>
-#include <tzlocalizer.h>
-
-// User includes
-#include "cradioenginelogger.h"
-#include "radiointernalcrkeys.h"
-#include "cradioaudiorouter.h"
-#include "cradioengineimp.h"
-#include "mradioengineobserver.h"
-#include "cradioregion.h"
-#include "cradiosettings.h"
-#include "mradioenginesettings.h"
-#include "mradiosettingssetter.h"
-#include "cradiordsreceiver.h"
-#include "cradiosystemeventcollector.h"
-#include "cradionetworkinfolistener.h"
-#include "radioengine.hrh"
-#include "cradioenginelogger.h"
-
-// This has to be the last include.
-#ifdef STUB_CONSTELLATION
-#   include <RadioStubManager.h>
-#endif //STUB_CONSTELLATION
-
-// Constants
-
-/** The limit of volume steps that must not be divided */
-const TInt KRadioVolumeStepsDividinglimit = 20;
-/** If CMMTunerUtility has 200 volume steps, AknVolume control has 20 steps */
-const TInt KRadioVolumeStepsDivider = 500;
-/** amount of volume steps used previously */
-#if defined __WINS__
-const TInt KRadioVolumeStepsWins = 20;
-#endif // defined __WINS__
-
-/** KRadioRadioSwitchDelay value must not be too small, otherwise problems with
- radioserver will occur, when swithing between valid and invalid presets */
-const TInt KRadioRadioSwitchDelay = 300; // In milliseconds
-
-const TInt KRadioThousand = 1000;
-const TInt KRadioMillion = KRadioThousand * KRadioThousand;
-
-// Country order from timezones.rss. Default = 0, Japan = 1, America = 2.
-const TUint KCityGroupRegions[] =
-    {0,0,0,0,0,0,2,0,0,0,0,2,0,2,0,2,0,2,0,2,2,0,2,0,0,2,2,2,0,2,0,0, //32
-     0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,0,0,0,0,0, //64
-     0,0,0,0,0,2,0,0,0,2,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //96
-     0,0,0,2,0,0,0,0,2,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //128
-     0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0, //160
-     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0, //192
-     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0, //224
-     2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
-
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioEngineImp::CRadioEngineImp( CRadioAudioRouter* aAudioRouter )
-    : CRadioEngine( aAudioRouter )
-    , iAntennaAttached( ETrue )
-    , iFreqEventReason( RadioEngine::ERadioFrequencyEventReasonUnknown )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::ConstructL()
-    {
-    LOG_METHOD_AUTO;
-
-    if ( !iAudioRouter || !iSystemEventCollector || !iSettings )
-        {
-        User::Leave( KErrNotReady );
-        }
-
-    iSystemEventCollector->AddObserverL( this );
-
-    // Initial default values to be over by init
-    User::LeaveIfError( iSettings->RadioSetter().SetPowerOn( EFalse ) );
-
-    // The output source needs to be in headset when starting the radio.
-    // But if the headset is not connected, audio cannot be heard if it is routed
-    // to headset
-    RadioEngine::TRadioAudioRoute route = iSystemEventCollector->IsHeadsetConnectedL() ?
-                                RadioEngine::ERadioHeadset : RadioEngine::ERadioSpeaker;
-    User::LeaveIfError( iSettings->RadioSetter().SetAudioRoute( route ) );
-
-    iRdsReceiver = CRadioRdsReceiver::NewL( iSettings->EngineSettings() );
-    iNetworkInfoListener = CRadioNetworkInfoListener::NewL( iSettings->RadioSetter(), NULL );
-
-    iRdsReceiver->AddObserverL( this );
-
-    // Create timer that is used when polling for radio restart.
-    iRadioTimer = CPeriodic::NewL( CActive::EPriorityHigh );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioEngineImp::~CRadioEngineImp()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-
-    delete iNetworkInfoListener;
-
-    PowerOff();
-
-    delete iRadioTimer;
-
-    DeleteAudioOutput();
-
-    if ( iTunerUtility )
-        {
-        iTunerUtility->Close();
-        }
-
-    if ( iPlayerUtility )
-        {
-        iPlayerUtility->Close();
-        }
-
-    if ( iRdsReceiver )
-        {
-        iRdsReceiver->RemoveObserver( this );
-        }
-
-    delete iRdsReceiver;
-    delete iRadioUtility;
-
-    iObservers.Close();
-
-    if ( iSystemEventCollector )
-        {
-        iSystemEventCollector->RemoveObserver( this );
-        }
-    delete iSystemEventCollector;
-
-    if ( iSettings )
-        {
-        iSettings->RadioSetter().SetObserver( NULL );
-        }
-    delete iSettings;
-
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::SetSystemEventCollector( CRadioSystemEventCollector* aCollector )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iSystemEventCollector = aCollector;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::SetRadioSettings( CRadioSettings* aSettings )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iSettings = aSettings;
-    iSettings->RadioSetter().SetObserver( this );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioAudioRouter& CRadioEngineImp::AudioRouter() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return *iAudioRouter;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioSystemEventCollector& CRadioEngineImp::SystemEventCollector() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return *iSystemEventCollector;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioSettings& CRadioEngineImp::Settings() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return *iSettings;
-    }
-
-// ---------------------------------------------------------------------------
-// Determines radio region
-// ---------------------------------------------------------------------------
-//
-TRadioRegion CRadioEngineImp::DetermineRegion()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TRadioRegion region = ERadioRegionNone;
-
-    //TODO: Reimplement in QT side and remove the mobile network functionality
-    MRadioEngineSettings& engineSettings = iSettings->EngineSettings();
-    if ( iSystemEventCollector->IsMobileNetworkCoverage() )
-        {
-        region = RegionFromMobileNetwork();
-        }
-    else
-        {
-        region = RegionFromTimezone();
-        }
-
-    if ( !iSettings->IsRegionAllowed( region ) )
-        {
-        region = ERadioRegionNone;
-        }
-
-    // Region not found, try to use the previously set region
-    if ( region == ERadioRegionNone && engineSettings.RegionId() != ERadioRegionNone )
-        {
-        region = engineSettings.RegionId();
-        }
-
-    // All regions have been searched and no direct match found, use default one
-    if ( region == ERadioRegionNone )
-        {
-        region = engineSettings.DefaultRegion();
-        }
-
-    return region;
-    }
-
-// ---------------------------------------------------------------------------
-// Initializes / reinitializes the radio. If this is not called
-// the radio is not functional
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::InitRadioL( TInt aRegionId )
-    {
-    LOG_METHOD_AUTO;
-    LOG_FORMAT( "Region: %d", aRegionId );
-
-    iRadioInitializationState = ERadioNotInitialized;
-
-    iFreqEventReason = RadioEngine::ERadioFrequencyEventReasonUnknown;
-    if ( iSettings->EngineSettings().RegionId() != aRegionId )
-        {
-        // Change only when necessary as it changes also the default tuned frequency
-        User::LeaveIfError( iSettings->RadioSetter().SetRegionId( aRegionId ) );
-        }
-
-    if ( !iRadioUtility )
-        {
-        iRadioUtility = CRadioUtility::NewL( ETrue );
-        }
-
-    if ( !iPlayerUtility )
-        {
-        iPlayerUtility = &iRadioUtility->RadioPlayerUtilityL( *this );
-        SetAudioOutput( CAudioOutput::NewL( *iPlayerUtility ) );
-        }
-
-    if ( !iTunerUtility )
-        {
-        iTunerUtility = &iRadioUtility->RadioFmTunerUtilityL( *this );
-        }
-
-    // Utilities have been created now
-    iRadioInitializationState = ERadioUtilitiesConstructed;
-
-    RequestTunerControl();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioEngineImp::RadioInitialized() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iRadioInitializationState == ERadioTunerControlGranted;
-    }
-
-// ---------------------------------------------------------------------------
-// Sets the state for radio audio
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::EnableAudio( TBool aEnable, TBool aDelay )
-    {
-    LOG_METHOD_AUTO;
-    LOG_FORMAT( "aEnable %d ", aEnable );
-    iRadioEnabled = aEnable;
-    if ( aDelay )
-        {
-        SwitchPower( iRadioEnabled );
-        }
-    else if ( aEnable )
-        {
-        if ( !RadioInitialized() &&
-             iRadioInitializationState == ERadioUtilitiesConstructed &&
-             iRadioEnabled &&
-             OkToPlay( iSettings->EngineSettings().TunedFrequency() ) )
-            {
-            RequestTunerControl();
-            }
-        else
-            {
-            PowerOn();
-            }
-        }
-    else
-        {
-        PowerOff();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Gets the state for radio audio.
-// ---------------------------------------------------------------------------
-//
-TBool CRadioEngineImp::RadioAudioEnabled() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iRadioEnabled;
-    }
-
-// ---------------------------------------------------------------------------
-// Sets the state for audio overriding
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::SetAudioOverride( TBool aOverride )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aOverride %d ", aOverride ) );
-    iOverrideAudioResources = aOverride;
-    }
-
-// ---------------------------------------------------------------------------
-// Adds an observer for the radio state changes notifications.
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::AddObserverL( MRadioEngineObserver* aObserver )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TInt index = iObservers.FindInAddressOrder( aObserver );
-    if ( index == KErrNotFound )
-        {
-        iObservers.InsertInAddressOrderL( aObserver );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Removes an observer from the list of obsevers
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::RemoveObserver( MRadioEngineObserver* aObserver )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TInt index = iObservers.FindInAddressOrder( aObserver );
-
-    if ( index >= 0 )
-        {
-        iObservers.Remove( index );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TFmRadioFrequencyRange CRadioEngineImp::TunerFrequencyRangeForRegionId( TInt aRegionId ) const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TFmRadioFrequencyRange result = EFmRangeEuroAmerica;
-    switch ( aRegionId )
-        {
-        case ERadioRegionDefault:
-            {
-            result = EFmRangeEuroAmerica;
-            break;
-            }
-        case ERadioRegionJapan:
-            {
-            result = EFmRangeJapan;
-            break;
-            }
-        case ERadioRegionAmerica:
-            {
-            result = EFmRangeEuroAmerica;
-            break;
-            }
-        default:
-            break;
-        }
-    return result;
-    }
-
-// ---------------------------------------------------------------------------
-// Sets radio mode ERadioStereo or ERadioMono
-// ---------------------------------------------------------------------------
-
-void CRadioEngineImp::SetAudioMode( TInt aAudioMode )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LOG_FORMAT( "aAudioMode: %d", aAudioMode );
-    TInt err = KErrNone;
-    if ( !RadioInitialized() )
-        {
-        TInt err = iSettings->RadioSetter().SetOutputMode( aAudioMode );
-        NotifyRadioEvent( ERadioEventAudioMode, err );
-        }
-    else
-        {
-        err = iTunerUtility->ForceMonoReception( aAudioMode == RadioEngine::ERadioMono );
-
-        if ( err )
-            {
-            NotifyRadioEvent( ERadioEventAudioMode, err );
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Switches power on/off after a delay
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::SwitchPower( TBool aPowerOn )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LOG_FORMAT( "aPowerOn %d", aPowerOn );
-    if ( RadioInitialized() )
-        {
-        if ( !aPowerOn || OkToPlay( iSettings->EngineSettings().TunedFrequency() ) )
-            {
-            iRadioTimer->Cancel();
-            if ( aPowerOn )
-                {
-                iRadioTimer->Start( TTimeIntervalMicroSeconds32( KRadioRadioSwitchDelay * KRadioThousand ),
-                        TTimeIntervalMicroSeconds32( 0 ),
-                        TCallBack( StaticPowerOnCallback, this ) );
-                }
-            else
-                {
-                iRadioTimer->Start( TTimeIntervalMicroSeconds32( KRadioRadioSwitchDelay * KRadioThousand ),
-                        TTimeIntervalMicroSeconds32( 0 ),
-                        TCallBack( StaticPowerOffCallback, this ) );
-                }
-            }
-        }
-    else if ( aPowerOn &&
-            iRadioInitializationState == ERadioUtilitiesConstructed &&
-            iRadioEnabled &&
-            OkToPlay( iSettings->EngineSettings().TunedFrequency() ) )
-        {
-        RequestTunerControl();
-        }
-    else
-        {
-        LOG( "CRadioEngineImp::SwitchPower - Unhandled case" );
-        LOG_FORMAT( "PowerOn: %d, InitializationState: %d, Enabled: %d, Frequency: %d",
-                aPowerOn, iRadioInitializationState, iRadioEnabled, iSettings->EngineSettings().TunedFrequency() );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Executes the power switch
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineImp::StaticPowerOnCallback( TAny* aSelfPtr )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    CRadioEngineImp* self = reinterpret_cast<CRadioEngineImp*>( aSelfPtr );
-
-    if ( self )
-        {
-        self->iRadioTimer->Cancel(); // prevents the further calls.
-
-        if ( !self->iSettings->EngineSettings().IsPowerOn() )
-            {
-            self->PowerOn();
-            }
-        }
-
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-// Executes the power switch
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineImp::StaticPowerOffCallback( TAny* aSelfPtr )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    CRadioEngineImp* self = reinterpret_cast<CRadioEngineImp*>( aSelfPtr );
-
-    if ( self )
-        {
-        self->iRadioTimer->Cancel(); // prevents the further calls.
-
-        if ( self->iSettings->EngineSettings().IsPowerOn() )
-            {
-            self->PowerOff();
-            }
-        }
-
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::PowerOn()
-    {
-    LOG_METHOD_AUTO;
-
-    if ( RadioInitialized() &&
-        iRadioEnabled &&
-        OkToPlay( iSettings->EngineSettings().TunedFrequency() ) )
-        {
-        SetAudioMode( iSettings->EngineSettings().OutputMode() );
-        iPlayerUtility->SetVolumeRamp( TTimeIntervalMicroSeconds( MAKE_TINT64( 0, KRadioMillion ) ) );
-        iPlayerUtility->SetVolume( TunerVolumeForUiVolume( iSettings->EngineSettings().Volume() ) );
-
-        iPlayerUtility->Mute( iSettings->EngineSettings().IsVolMuted() );
-        iTunerUtility->SetFrequency( iSettings->EngineSettings().TunedFrequency() );
-        iFreqEventReason = RadioEngine::ERadioFrequencyEventReasonImplicit;
-
-        TRAP_IGNORE( iAudioRouter->SetAudioRouteL(
-                RadioEngine::TRadioAudioRoute( iSettings->EngineSettings().AudioRoute() ) ) )
-
-        iPlayerUtility->Play();
-        }
-    else
-        {
-        HandlePowerEvent( EFalse, KErrGeneral );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Radio power off
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::PowerOff()
-    {
-    LOG_METHOD_AUTO;
-
-    if ( iSettings->EngineSettings().IsPowerOn() )
-        {
-        if ( RadioInitialized() )
-            {
-            iPlayerUtility->Stop();
-            }
-        else // This shouldn't occur normally, just a recovery action
-            {
-            HandlePowerEvent( EFalse, KErrNone );
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Requests tuner control from tuner utility
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::RequestTunerControl()
-    {
-    LOG_METHOD_AUTO;
-
-    if ( iRadioInitializationState < ERadioTunerControlRequested )
-        {
-        LOG( "Requesting tuner control" );
-        // Before first RequestTunerControl() say that it is ok to enable offline mode without checking capabilities
-        iTunerUtility->EnableTunerInOfflineMode( ETrue );
-        iTunerUtility->RequestTunerControl();
-
-        iRadioInitializationState = ERadioTunerControlRequested;
-        }
-    else
-        {
-        LOG( "Tuner control already requested" );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioEngineImp::OkToPlay( TUint32 aFrequency ) const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TBool audioResourcesAvailable = iSystemEventCollector->IsAudioResourcesAvailable();
-    TBool okToPlay = iAntennaAttached &&
-                     !iFmTransmitterActive &&
-                     ( audioResourcesAvailable || iOverrideAudioResources ) &&
-#ifdef COMPILE_IN_IVALO
-                     IsFrequencyValid( aFrequency )
-                     && !iSystemEventCollector->IsCallActive();
-#else
-                     IsFrequencyValid( aFrequency );
-#endif //COMPILE_IN_IVALO
-
-    LEVEL2( LOG_FORMAT( "returning okToPlay %d ", okToPlay ) );
-    return okToPlay;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioEngineImp::IsFrequencyValid( TUint32 aFrequency ) const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TBool ret( EFalse );
-    if ( !aFrequency )
-        {
-        aFrequency = iSettings->EngineSettings().TunedFrequency();
-        }
-    if ( aFrequency >= iSettings->EngineSettings().MinFrequency() && aFrequency <= iSettings->EngineSettings().MaxFrequency() )
-        {
-        ret = ETrue;
-        }
-    return ret;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::SetManualSeekMode( TBool aManualSeekActive )
-    {
-    iManualSeekMode = aManualSeekActive;
-    if ( iManualSeekMode )
-        {
-        CancelSeek();
-        iRdsReceiver->StopReceiver();
-        }
-    else
-        {
-        iRdsReceiver->StartReceiver();
-        TInt frequency = 0;
-        iTunerUtility->GetFrequency( frequency );
-        HandleFrequencyEvent( frequency );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioEngineImp::IsInManualSeekMode() const
-    {
-    return iManualSeekMode;
-    }
-
-// ---------------------------------------------------------------------------
-// Radio tuning
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::SetFrequency( TUint32 aFrequency, RadioEngine::TRadioFrequencyEventReason aReason )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL2( LOG_FORMAT( "freq: %u, Initialized: %d, Enabled: %d",
-            aFrequency, RadioInitialized(), iRadioEnabled ) );
-
-    iFreqEventReason = aReason;
-    if ( iManualSeekMode )
-        {
-        iTunerUtility->SetFrequency( aFrequency );
-        }
-    else
-        {
-        iFrequencySetByRdsAf = EFalse;
-
-        TInt frequency = 0;
-        if ( iTunerUtility )
-            {
-            iTunerUtility->GetFrequency( frequency );
-            }
-        CancelSeek();
-
-        if ( aFrequency == frequency ) //radio has already the frequency to be set.
-            {
-            LOG( "CRadioEngineImp::SetFrequency: Already at the requested frequency" );
-            HandleFrequencyEvent( aFrequency );
-            }
-        else
-            {
-            iRadioTimer->Cancel();
-            if ( RadioInitialized() && iRadioEnabled && OkToPlay( aFrequency ) )
-                {
-                LOG( "CRadioEngineImp::SetFrequency: Tuning to frequency" );
-                iTunerUtility->SetFrequency( aFrequency );
-                }
-            else
-                {
-                HandleFrequencyEvent( aFrequency );
-                }
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Radio seek
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::Seek( RadioEngine::TRadioTuneDirection aDirection )
-    {
-    LOG_METHOD_AUTO;
-    LOG_FORMAT( "aDirection: %d",aDirection );
-
-    iFrequencySetByRdsAf = EFalse;
-
-    // Check if audio playing parameters ( other than frequency ) are OK
-    if ( iRadioEnabled &&
-        OkToPlay( iSettings->EngineSettings().MinFrequency() ) &&
-        iSeekingState == RadioEngine::ERadioNotSeeking )
-        {
-        if ( aDirection == RadioEngine::ERadioDown )
-            {
-            iSeekingState = RadioEngine::ERadioSeekingDown;
-            iFreqEventReason = RadioEngine::ERadioFrequencyEventReasonSeekDown;
-            }
-        else
-            {
-            iSeekingState = RadioEngine::ERadioSeekingUp;
-            iFreqEventReason = RadioEngine::ERadioFrequencyEventReasonSeekUp;
-            }
-
-        NotifyRadioEvent( ERadioEventSeeking );
-
-        if ( IsFrequencyValid() )
-            {
-            if ( iSettings->EngineSettings().IsPowerOn() )
-                {
-                iTunerUtility->StationSeek( aDirection == RadioEngine::ERadioUp ? ETrue : EFalse );
-                }
-            else
-                {
-                // Try to switch power on ( reinitialization )
-                SwitchPower( ETrue );
-                }
-            }
-        else
-            {
-            // Tune first to valid frequency, start seeking after radio power is on
-            SetFrequency( iSettings->EngineSettings().MinFrequency(), RadioEngine::ERadioFrequencyEventReasonImplicit );
-            }
-        }
-    else
-        {
-        NotifyRadioEvent( ERadioEventSeeking, KErrGeneral );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Cancels seek up/down request
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::CancelSeek()
-    {
-    LOG_METHOD_AUTO;
-    LOG_FORMAT( "seeking state was:%d", iSeekingState );
-
-    if ( iSeekingState != RadioEngine::ERadioNotSeeking )
-        {
-        iSeekingState = RadioEngine::ERadioNotSeeking;
-        iTunerUtility->CancelStationSeek();
-        iFreqEventReason = RadioEngine::ERadioFrequencyEventReasonImplicit;
-        NotifyRadioEvent( ERadioEventSeeking, KErrCancel );
-        NotifyRadioEvent( ERadioEventFrequency, KErrNone ); // Notify the observers even if the frequency remains the same.
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-RadioEngine::TRadioSeeking CRadioEngineImp::Seeking() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iSeekingState;
-    }
-
-// ---------------------------------------------------------------------------
-// Sets volume level up/down one step.
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::AdjustVolume( RadioEngine::TRadioVolumeSetDirection aDirection )
-    {
-    LOG_METHOD_AUTO;
-    LOG_FORMAT( "aDirection: %d ", aDirection );
-
-    if ( iSettings->EngineSettings().IsPowerOn() )
-        {
-        TInt volume = iSettings->EngineSettings().Volume();
-        LOG_FORMAT( "volume = ( %d )", volume );
-
-        if ( aDirection == RadioEngine::ERadioDecVolume )
-            {
-            TInt min = iSettings->EngineSettings().DefaultMinVolumeLevel();
-            if ( --volume < min )
-                {
-                volume = 0;
-                }
-            }
-        else if ( aDirection == RadioEngine::ERadioIncVolume )
-            {
-            TInt max = MaxVolumeLevel();
-
-            if ( ++volume > max )
-                {
-                volume = max;
-                }
-            }
-        else
-            {
-            LOG( "Unhandled case" );
-            }
-        SetVolume( volume );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Sets audio volume level
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::SetVolume( TInt aVolume )
-    {
-    LOG_METHOD_AUTO;
-    LOG_FORMAT( "aVolume: %d", aVolume );
-
-    if ( iSettings->EngineSettings().IsPowerOn() && RadioInitialized() )
-        {
-        LOG( "Setting volume to player utility" );
-
-        if ( aVolume == 0 )
-            {
-            iSettings->RadioSetter().SetVolume( aVolume );
-            NotifyRadioEvent( ERadioEventVolume, KErrNone );
-            SetVolumeMuted( ETrue );
-            }
-        else
-            {
-            if ( iPlayerUtility->SetVolume( TunerVolumeForUiVolume( aVolume ) ) == KErrNone )
-                {
-                iSettings->RadioSetter().SetVolume( aVolume );
-                NotifyRadioEvent( ERadioEventVolume, KErrNone );
-                SetVolumeMuted( EFalse );
-                }
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Set radio audio muted/unmuted
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::SetVolumeMuted( TBool aMuteState, TBool aUpdateSettings )
-    {
-    LOG_METHOD_AUTO;
-    LOG_FORMAT( "MuteState = %d", aMuteState );
-
-    if ( iSettings->EngineSettings().IsPowerOn() )
-        {
-        TInt err = KErrNone;
-        if ( RadioInitialized() )
-            {
-            err = iPlayerUtility->Mute( aMuteState );
-            }
-
-        if ( aUpdateSettings )
-            {
-            err = iSettings->RadioSetter().SetVolMuted( aMuteState );
-            }
-        NotifyRadioEvent( ERadioEventMute, err );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioEngineImp::IsAntennaAttached()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "returning iAntennaAttached: %d", iAntennaAttached ) );
-    return iAntennaAttached;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioEngineImp::IsFmTransmitterActive() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "returning iFmTransmitterActive: %d", iFmTransmitterActive ) );
-    return iFmTransmitterActive;
-    }
-
-// ---------------------------------------------------------------------------
-// This function is usable only in WINS emulator.
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::SetAntennaAttached( TBool aAntennaAttached )
-    {
-    LOG_METHOD_AUTO;
-#ifdef __WINS__
-    MrftoAntennaStatusChange( aAntennaAttached );
-#endif
-    }
-
-// ---------------------------------------------------------------------------
-// Determine the meximum volume level by dividing the maximum volume setting
-// received from player utility to get the desired 20 volume steps
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineImp::MaxVolumeLevel() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TInt maxLevel = 0;
-
-#if defined __WINS__
-    maxLevel = KRadioVolumeStepsWins;
-#else
-    if ( RadioInitialized() )
-        {
-        iPlayerUtility->GetMaxVolume( maxLevel );
-        }
-#endif //defined __WINS__
-
-    if ( maxLevel > KRadioVolumeStepsDividinglimit )
-        {
-        maxLevel = maxLevel / KRadioVolumeStepsDivider;
-        }
-
-    return maxLevel;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioEngineImp::FrequencySetByRdsAf() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iFrequencySetByRdsAf;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-MRadioRdsReceiver& CRadioEngineImp::RdsReceiver()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return *iRdsReceiver;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineImp::TunerVolumeForUiVolume( TInt aUiVolume )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TInt vol = aUiVolume * KRadioVolumeStepsDivider;
-
-    return vol;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::NotifyRadioEvent( TInt aRadioEvent, TInt aErrorCode )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TRAP_IGNORE( DoNotifyRadioEventL( aRadioEvent, aErrorCode ) )
-    }
-
-// ---------------------------------------------------------------------------
-// Notifies all the registered observers of radio events
-// by sending notifications to observers.
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::DoNotifyRadioEventL( TInt aRadioEvent, TInt aErrorCode )
-    {
-    LOG_METHOD_AUTO;
-    TInt count = iObservers.Count();
-
-    for ( TInt i = 0; i < count; ++i )
-        {
-        MRadioEngineObserver* observer = iObservers[i];
-
-        switch ( aRadioEvent )
-            {
-            case ERadioEventPower:
-                {
-                observer->PowerEventL( iSettings->EngineSettings().IsPowerOn(), aErrorCode );
-                break;
-                }
-            case ERadioEventFrequency:
-                {
-                observer->FrequencyEventL( iSettings->EngineSettings().TunedFrequency(),
-                                           iFreqEventReason, aErrorCode );
-                break;
-                }
-            case ERadioEventVolume:
-                {
-                observer->VolumeEventL( iSettings->EngineSettings().Volume(), aErrorCode );
-                break;
-                }
-            case ERadioEventMute:
-                {
-                observer->MuteEventL( iSettings->EngineSettings().IsVolMuted(), aErrorCode );
-                break;
-                }
-            case ERadioEventAudioMode:
-                {
-                observer->AudioModeEventL( iSettings->EngineSettings().OutputMode(), aErrorCode );
-                break;
-                }
-            case ERadioEventAntenna:
-                {
-                observer->AntennaEventL( iAntennaAttached, aErrorCode );
-                break;
-                }
-            case ERadioEventAudioRouting:
-                {
-                observer->AudioRoutingEventL( iSettings->EngineSettings().AudioRoute(), aErrorCode );
-                break;
-                }
-            case ERadioEventSeeking:
-                {
-                observer->SeekingEventL( iSeekingState, aErrorCode );
-                break;
-                }
-            case ERadioEventRegion:
-                {
-                observer->RegionEventL( iSettings->EngineSettings().RegionId(), aErrorCode );
-                break;
-                }
-            case ERadioEventFmTransmitter:
-                {
-                observer->FmTransmitterEventL( iFmTransmitterActive );
-                break;
-                }
-            default:
-                {
-                break;
-                }
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Handles some system events
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::HandleSystemEventL( TRadioSystemEventType aEventType )
-    {
-    LOG_METHOD_AUTO;
-    LOG_FORMAT( "aEventType = %d", aEventType );
-
-    switch ( aEventType )
-        {
-        case ERadioAudioResourcesAvailable:
-            {
-            LOG( "CRadioEngineImp::HandleSystemEventL, Audio resources available" );
-            SwitchPower( ETrue );
-            }
-            break;
-
-        case ERadioAudioAutoResumeForbidden:
-            {
-            EnableAudio( EFalse );
-            }
-            break;
-
-        case ERadioAudioRouteHeadset:
-            {
-            HandleAudioRoutingEvent( RadioEngine::ERadioHeadset );
-            }
-            break;
-
-        case ERadioAudioRouteSpeaker:
-            {
-            HandleAudioRoutingEvent( RadioEngine::ERadioSpeaker );
-            }
-            break;
-
-        case ERadioCallActivated:
-            {
-            CancelSeek();
-            }
-            break;
-
-        case ERadioCallDeactivated:
-            {
-            iPlayerUtility->Play();
-            SwitchPower( ETrue );
-            }
-            break;
-
-        case ERadioHeadsetConnected:
-            {
-            // Explicitly set the audio routing to headset. Because system
-            // forces the routing to headset anyway, and without our knowledge.
-            MRadioSettingsSetter& setter = iSettings->RadioSetter();
-            setter.SetAudioRoute( RadioEngine::ERadioHeadset );
-            iAudioRouter->SetAudioRouteL( RadioEngine::ERadioHeadset );
-            }
-            break;
-
-        case ERadioHeadsetDisconnected:
-            {
-            // Explicitly set the audio routing to speaker. Because system
-            // forces the routing to speaker anyway, if radio stays on.
-            MRadioSettingsSetter& setter = iSettings->RadioSetter();
-            setter.SetAudioRoute( RadioEngine::ERadioSpeaker );
-            iAudioRouter->SetAudioRouteL( RadioEngine::ERadioSpeaker );
-            }
-            break;
-        default:
-            {
-            break;
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::MrftoRequestTunerControlComplete( TInt aError )
-    {
-    LOG_METHOD_AUTO;
-    LOG_FORMAT( "aError: %d", aError );
-
-    if ( aError == KErrNone || aError == KErrAlreadyExists ) // Tuner activated now or was already active
-        {
-        iRadioInitializationState = ERadioTunerControlGranted;
-
-        TFmTunerCapabilities tunerCaps;
-        tunerCaps.iTunerBands = 0;
-        tunerCaps.iTunerFunctions = 0;
-        tunerCaps.iAdditionalFunctions1 = 0;
-        tunerCaps.iAdditionalFunctions2 = 0;
-        iTunerUtility->GetCapabilities( tunerCaps );
-
-#ifdef LOGGING_ENABLED
-        TBuf<50> tunerCapsBuf;
-        if ( tunerCaps.ETunerAvailableInOfflineMode )
-            {
-            tunerCapsBuf.Append( _L("OfflineMode ") );
-            }
-        if ( tunerCaps.ETunerRdsSupport )
-            {
-            tunerCapsBuf.Append( _L("RDS ") );
-            }
-        if ( tunerCaps.ETunerDualTunerSupport )
-            {
-            tunerCapsBuf.Append( _L("DualTuner ") );
-            }
-        LOG_FORMAT( "Radio tuner capabilities: %S", &tunerCapsBuf );
-
-#endif // LOGGING_ENABLED
-
-        TBool offlineAvailable( tunerCaps.iTunerFunctions &
-                                TFmTunerCapabilities::ETunerAvailableInOfflineMode );
-        iTunerUtility->EnableTunerInOfflineMode( offlineAvailable );
-
-        if ( tunerCaps.iTunerFunctions & TFmTunerCapabilities::ETunerRdsSupport )
-            {
-            TRAP_IGNORE( iRdsReceiver->InitL( *iRadioUtility ) )
-            }
-
-        iTunerUtility->SetFrequencyRange( TunerFrequencyRangeForRegionId(
-                                          iSettings->EngineSettings().RegionId() ) );
-        // To prevent false frequency changes
-        iTunerUtility->SetFrequency( iSettings->EngineSettings().TunedFrequency() );
-        SwitchPower( ETrue );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::MrftoSetFrequencyRangeComplete( TInt aError )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aError: %d", aError ) );
-    if ( aError )
-        {
-        NotifyRadioEvent( ERadioEventRegion, aError );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::MrftoSetFrequencyComplete( TInt aError )
-    {
-    LOG_METHOD_AUTO;
-    LOG_FORMAT( "aError: %d", aError );
-
-    if ( aError && !iManualSeekMode )
-        {
-        if ( aError == KErrNotReady )
-            {
-            iRadioInitializationState = ERadioUtilitiesConstructed;
-            }
-        HandleFrequencyEvent( iSettings->EngineSettings().TunedFrequency(), aError );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::MrftoStationSeekComplete( TInt aError, TInt aFrequency )
-    {
-    LOG_METHOD_AUTO;
-    LOG_FORMAT( "aError = %d, aFrequency = %d", aError, aFrequency );
-    // Seeking has ended, error code tells if it was successful
-
-    if ( aError == KFmRadioErrAntennaNotConnected )
-        {
-        iAntennaAttached = EFalse;
-        }
-    else if ( aError == KErrNotReady )
-        {
-        iRadioInitializationState = ERadioUtilitiesConstructed;
-        }
-
-    iSeekingState = RadioEngine::ERadioNotSeeking;
-
-    if ( aFrequency == 0 )
-        {
-        NotifyRadioEvent( ERadioEventFrequency, aError );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::MrftoFmTransmitterStatusChange( TBool aActive )
-    {
-    LOG_METHOD_AUTO;
-    LOG_FORMAT( "aActive: %d", aActive );
-    iFmTransmitterActive = aActive;
-
-    if ( !iFmTransmitterActive )
-        {
-        SwitchPower( ETrue );
-        }
-
-    NotifyRadioEvent( ERadioEventFmTransmitter );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::MrftoAntennaStatusChange( TBool aAttached )
-    {
-    LOG_METHOD_AUTO;
-    LOG_FORMAT( "aAttached: %d", aAttached );
-    iAntennaAttached = aAttached;
-    if ( iAntennaAttached )
-        {
-        SwitchPower( ETrue );
-        NotifyRadioEvent( ERadioEventAntenna );
-        }
-    else
-        {
-        NotifyRadioEvent( ERadioEventAntenna, KErrDisconnected );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-
-//
-void CRadioEngineImp::MrftoOfflineModeStatusChange( TBool DEBUGVAR3( aOfflineMode ) )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aOfflineMode: %d", aOfflineMode ) );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::MrftoFrequencyRangeChange( TFmRadioFrequencyRange DEBUGVAR3( aBand ) )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aBand: %d", aBand ) );
-    if ( RadioInitialized() )
-        {
-        iTunerUtility->SetFrequency( iSettings->EngineSettings().TunedFrequency() );
-        iFreqEventReason = RadioEngine::ERadioFrequencyEventReasonImplicit;
-        }
-    NotifyRadioEvent( ERadioEventRegion );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::MrftoFrequencyChange( TInt aNewFrequency )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aNewFrequency = %u", aNewFrequency ) );
-
-    // There may be frequency changed events when radio is not initialized ( because
-    // of SetFrequency or Seek returns with KErrNotReady ).
-    if ( !iManualSeekMode && RadioInitialized() )
-        {
-        HandleFrequencyEvent( aNewFrequency );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::MrftoForcedMonoChange( TBool aForcedMono )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aForcedMono = %d", aForcedMono ) );
-
-    iSettings->RadioSetter().SetOutputMode( aForcedMono ? RadioEngine::ERadioMono : RadioEngine::ERadioStereo );
-    NotifyRadioEvent( ERadioEventAudioMode );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::MrftoSquelchChange( TBool /*aSquelch*/ )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::MrpoStateChange( TPlayerState aState, TInt aError )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aState = %d, aError = %d", aState, aError ) );
-
-    if ( aError == KFmRadioErrAntennaNotConnected )
-        {
-        iAntennaAttached = EFalse;
-        }
-    HandlePowerEvent( aState == ERadioPlayerPlaying, aError );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::MrpoVolumeChange( TInt aVolume )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-	aVolume = aVolume / KRadioVolumeStepsDivider;
-    if ( aVolume != iSettings->EngineSettings().Volume() )
-        {
-        iSettings->RadioSetter().SetVolume( aVolume );
-        NotifyRadioEvent( ERadioEventVolume );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::MrpoMuteChange( TBool aMute )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LOG_FORMAT( "CRadioEngineImp::MrpoMuteChange muted: %d", aMute );
-
-//    TBool muted = iSettings->EngineSettings().IsVolMuted();
-//    if ( !aMute != !muted )
-//        {
-//        iSettings->RadioSetter().SetVolMuted( aMute );
-//        NotifyRadioEvent( ERadioEventMute );
-//        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::MrpoBalanceChange( TInt /*aLeftPercentage*/, TInt /*aRightPercentage*/ )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::RdsAfSearchSettingChangedL( TBool aEnabled )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aEnabled: %d", aEnabled ) );
-    iRdsReceiver->SetAutomaticSwitchingL( aEnabled );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-//TODO: Check if this can be removed. Radio doesn't currently support changing regions on the fly
-void CRadioEngineImp::RegionSettingChangedL( TInt DEBUGVAR3( aRegion ) )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aRegion: %d", aRegion ) );
-
-    if ( RadioInitialized() )
-        {
-        iTunerUtility->SetFrequencyRange( TunerFrequencyRangeForRegionId( iSettings->EngineSettings().RegionId() ) );
-        iTunerUtility->SetFrequency( iSettings->EngineSettings().TunedFrequency() );
-        iFreqEventReason = RadioEngine::ERadioFrequencyEventReasonImplicit;
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::RdsAfSearchBegin()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iFrequencySetByRdsAf = ETrue;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::RdsAfSearchEnd( TUint32 DEBUGVAR3( aFrequency ), TInt aError )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aFrequency: %d, aError: %d )", aFrequency, aError ) );
-    if ( aError != KErrNone )
-        {
-        iFrequencySetByRdsAf = EFalse;
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Tries to figure the region out based on current mobile network id
-// ---------------------------------------------------------------------------
-//
-TRadioRegion CRadioEngineImp::RegionFromMobileNetwork() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TRadioRegion region = ERadioRegionNone;
-
-    // Choose the frequency range according to country code
-    MRadioEngineSettings& engineSettings = iSettings->EngineSettings();
-    TPtrC countryCode = engineSettings.CountryCode();
-    const TInt regionCount = engineSettings.CountRegions();
-    TBool matchFound = EFalse;
-    for ( TInt i = 0; i < regionCount && !matchFound; ++i )
-        {
-        const RRadioCountryCodeArray& regionCountryCodes =
-                engineSettings.Region( i ).CountryCodes();
-
-        const TInt countryCodeCount = regionCountryCodes.Count();
-        for ( TInt j = 0; j < countryCodeCount && !matchFound; ++j )
-            {
-            if ( countryCode == *regionCountryCodes[j] )
-                {
-                // We have a match
-                matchFound = ETrue;
-                region = engineSettings.Region( i ).Id();
-                }
-            }
-        }
-
-    return region;
-    }
-
-// ---------------------------------------------------------------------------
-// Tries to figure the region out based on timezone selection
-// ---------------------------------------------------------------------------
-//
-TRadioRegion CRadioEngineImp::RegionFromTimezone() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TRadioRegion region = ERadioRegionNone;
-    TRAP_IGNORE( region = DoRegionFromTimezoneL() );
-    return region;
-    }
-
-// ---------------------------------------------------------------------------
-// Performs the timezone-based check
-// ---------------------------------------------------------------------------
-//
-TRadioRegion CRadioEngineImp::DoRegionFromTimezoneL() const
-    {
-    LOG_METHOD_AUTO;
-    CTzLocalizer* timezoneLocalizer = CTzLocalizer::NewL();
-    CleanupStack::PushL( timezoneLocalizer );
-
-    CTzLocalizedCityGroupArray* cityGroups = timezoneLocalizer->GetAllCityGroupsL(
-                                            CTzLocalizer::ETzAlphaNameAscending );
-    CleanupStack::PushL( cityGroups );
-
-    // We get the ownership so we must delete
-    CTzLocalizedCity* city = timezoneLocalizer->GetFrequentlyUsedZoneCityL( CTzLocalizedTimeZone::ECurrentZone );
-    const TUint8 cityId = city->GroupId();
-    delete city;
-    city = NULL;
-    LOG_FORMAT( "group id: %d", cityId );
-
-    TRadioRegion region = ERadioRegionNone;
-    const TInt cityGroupCount = cityGroups->Count();
-    TBool found = EFalse;
-    for ( TInt i = 0; i < cityGroupCount && !found; ++i )
-        {
-        if ( cityId == cityGroups->At( i ).Id() )
-            {
-            region = static_cast<TRadioRegion>( KCityGroupRegions[ cityId - 1 ] );
-            found = ETrue;
-            }
-        }
-
-    CleanupStack::PopAndDestroy( cityGroups );
-    CleanupStack::PopAndDestroy( timezoneLocalizer );
-
-    LOG_ASSERT( found, LOG_FORMAT( "City not found: %d", cityId ) );
-
-    return region;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::HandleAudioRoutingEvent( RadioEngine::TRadioAudioRoute aDestination )
-    {
-    LOG_METHOD_AUTO;
-    LOG_FORMAT( "aDestination: %d", aDestination );
-
-    // Make modifications to volume ONLY if new audio source state
-    // differs from settings. If they don't differ, this state
-    // change is a part of the radio initialization.
-    MRadioSettingsSetter& setter = iSettings->RadioSetter();
-    if ( aDestination != iSettings->EngineSettings().AudioRoute() )
-        {
-        setter.SetAudioRoute( aDestination );
-
-        // If audio muted, change it to minimum volume
-        MRadioEngineSettings& engineSettings = iSettings->EngineSettings();
-        TInt vol = engineSettings.IsVolMuted() ? engineSettings.DefaultMinVolumeLevel()
-                                               : engineSettings.Volume();
-
-        if ( RadioInitialized() )
-            {
-            TInt err = iPlayerUtility->Mute( EFalse );
-            if ( !err )
-                {
-                setter.SetVolMuted( EFalse );
-                err = iPlayerUtility->SetVolume( TunerVolumeForUiVolume( vol ));
-
-                if ( !err )
-                    {
-                    setter.SetVolume( vol );
-                    }
-                }
-            }
-        else
-            {
-            setter.SetVolMuted( EFalse );
-            setter.SetVolume( vol );
-            }
-        NotifyRadioEvent( ERadioEventAudioRouting );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::HandlePowerEvent( TBool aPowerOn, TInt aErrorCode )
-    {
-    LOG_METHOD_AUTO;
-    LOG_FORMAT( "aPowerOn: %d, aErrorCode: %d )", aPowerOn, aErrorCode );
-
-    const TBool powerState = iSettings->EngineSettings().IsPowerOn();
-    if ( !powerState != !aPowerOn )
-        {
-        iSettings->RadioSetter().SetPowerOn( aPowerOn );
-
-        if ( aPowerOn )
-            {
-            iRdsReceiver->StartReceiver();
-            }
-        else
-            {
-            iRdsReceiver->StopReceiver();
-            }
-        }
-
-    if ( !aPowerOn )
-        {
-        CancelSeek();
-        }
-
-    // If we are seeking, power event starts seeking
-    if ( iSeekingState != RadioEngine::ERadioNotSeeking && aPowerOn )
-        {
-        // Reset seeking state to enable seeking start
-        LOG( "PowerOn event in seekingstate. Restart seeking" );
-        RadioEngine::TRadioSeeking oldSeeking = iSeekingState;
-        iSeekingState = RadioEngine::ERadioNotSeeking;
-        Seek( oldSeeking == RadioEngine::ERadioSeekingUp ? RadioEngine::ERadioUp : RadioEngine::ERadioDown );
-        }
-
-    if ( !powerState != !aPowerOn || aErrorCode )
-        {
-        NotifyRadioEvent( ERadioEventPower, aErrorCode );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineImp::HandleFrequencyEvent( TUint32 aFrequency, TInt aErrorCode )
-    {
-    LOG_METHOD_AUTO;
-    LOG_FORMAT( "aFrequency:  %d, aErrorCode: %d )", aFrequency, aErrorCode );
-
-    if ( iSettings->EngineSettings().TunedFrequency() != aFrequency )
-        {
-        if ( iSettings->EngineSettings().IsPowerOn() )
-            {
-            if ( !OkToPlay( aFrequency ) )
-                {
-                // Radio is going to be powered off, stop rds receiver immediately because
-                // some rds data from previous channel might come before power off event.
-                iRdsReceiver->StopReceiver();
-                }
-            else
-                {
-                // Normal frequency change, make sure that rds receiver is started
-                iRdsReceiver->StartReceiver();
-                }
-            }
-        if ( !iFrequencySetByRdsAf )
-            {
-            iRdsReceiver->ClearRdsInformation();
-            }
-        }
-    else if ( iFrequencySetByRdsAf )
-        {
-        // frequency didn't change, so AF search didn't complete successfully
-        iFrequencySetByRdsAf = EFalse;
-        }
-
-    iSettings->RadioSetter().SetTunedFrequency( aFrequency );
-
-    NotifyRadioEvent( ERadioEventFrequency, aErrorCode );
-    iFreqEventReason = RadioEngine::ERadioFrequencyEventReasonUnknown;
-
-    if ( aErrorCode == KErrNone )
-        {
-        SwitchPower( iRadioEnabled && OkToPlay( aFrequency ) );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Routing is not possible when headset is not available, power is off or
-// audio routing is not supported.
-// ---------------------------------------------------------------------------
-//
-TBool CRadioEngineImp::IsAudioRoutingPossible() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TBool headsetConnected = EFalse;
-    TRAP_IGNORE( ( headsetConnected = iSystemEventCollector->IsHeadsetConnectedL() ) )
-
-    TBool powerOn = iSettings->EngineSettings().IsPowerOn();
-
-    TBool isAudioRoutingPossible = EFalse;
-    if ( headsetConnected && powerOn && AudioRoutingSupported() )
-        {
-        isAudioRoutingPossible = ETrue;
-        }
-
-    return isAudioRoutingPossible;
-    }
-
--- a/radioengine/engine/src/cradionetworkinfolistener.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,296 +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:
-*
-*/
-
-// System includes
-#include <etelmm.h>
-#include <commsdattypesv1_1.h>
-
-// User includes
-#include "cradionetworkinfolistener.h"
-#include "mradiosettingssetter.h"
-#include "cradioenginelogger.h"
-
-using namespace CommsDat;
-
-// ======== MEMBER FUNCTIONS ========
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioNetworkInfoListener* CRadioNetworkInfoListener::NewL( MRadioSettingsSetter& aSetter,
-                                                            MRadioNetworkChangeObserver* aObserver )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    CRadioNetworkInfoListener* self = new ( ELeave ) CRadioNetworkInfoListener( aSetter, aObserver );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioNetworkInfoListener::CRadioNetworkInfoListener( MRadioSettingsSetter& aSetter,
-                                                      MRadioNetworkChangeObserver* aObserver )
-    : CActive( CActive::EPriorityHigh )
-    , iSetter( aSetter )
-    , iObserver( aObserver )
-    , iSubscriberIdPckg( iSubscriberId )
-    , iNetworkInfoPckg( iNetworkInfo )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    CActiveScheduler::Add( this );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioNetworkInfoListener::ConstructL()
-    {
-    LOG_METHOD_AUTO;
-#ifndef __WINS__
-    iTelephony = CTelephony::NewL();
-
-    // Initialize the default network id and country code directly from CommsDat, as CTelephony cannot be used in synchronous mode
-    // and using it in async mode will cause problems in core initialisation, and too much complexity!
-
-    // Get default TSY from database.
-
-    CMDBSession* db = CMDBSession::NewL( CMDBSession::LatestVersion());
-    CleanupStack::PushL( db );
-
-    CMDBRecordSet<CCDModemBearerRecord>* set = new ( ELeave ) CMDBRecordSet<CCDModemBearerRecord>( KCDTIdModemBearerRecord );
-    CleanupStack::PushL( set );
-
-    set->LoadL( *db );
-
-    TInt index = 0;
-    CCDModemBearerRecord* record = static_cast<CCDModemBearerRecord*>( set->iRecords[index++]);
-
-    if ( record->iTsyName.IsNull() && set->iRecords.Count() > index ) // the first item is normally only a template
-        {
-        record = static_cast<CCDModemBearerRecord*>( set->iRecords[index++]);
-        }
-
-    TPtrC name( static_cast<const TDesC&>( record->iTsyName ));
-    TBuf<50> tsyName;
-    tsyName.Copy( name );
-
-    LOG_FORMAT( "CRadioNetworkInfoListener::ConstructL, TSY name: %S", &tsyName );
-    CleanupStack::PopAndDestroy( set );
-    CleanupStack::PopAndDestroy( db );
-
-    RTelServer telServer;
-    CleanupClosePushL( telServer );
-    RMobilePhone mobilePhone;
-    CleanupClosePushL( mobilePhone );
-
-    //  Open phone
-    User::LeaveIfError( telServer.Connect());
-
-    // TSY module gets automatically unloaded when tel.Close() is called ( and tel is is CU-stack ),
-    // so loaded TSY is also leave-safe
-    User::LeaveIfError( telServer.LoadPhoneModule( tsyName ));
-
-    // Get number of phones.
-    TInt phones( 0 );
-    User::LeaveIfError( telServer.EnumeratePhones( phones ));
-    LOG_FORMAT( "CRadioNetworkInfoListener::ConstructL, Number of phones=%d", phones );
-
-    // Get phone info of first legal phone.
-    TInt legalPhoneIndex = KErrNotFound;
-    RTelServer::TPhoneInfo phoneInfo;
-    for ( TInt i=0; i<phones && legalPhoneIndex == KErrNotFound; ++i )
-        {
-        if ( telServer.GetPhoneInfo( i, phoneInfo ) == KErrNone )
-            {
-            if ( phoneInfo.iNetworkType == RTelServer::ENetworkTypeMobileDigital )
-                {
-                legalPhoneIndex = i;
-                }
-            }
-        }
-    User::LeaveIfError( legalPhoneIndex );
-
-    // Open legal phone.
-    User::LeaveIfError( mobilePhone.Open( telServer, phoneInfo.iName ));
-
-    TUint32 networkCaps;
-    User::LeaveIfError( mobilePhone.GetNetworkCaps( networkCaps ));
-    TUint32 identityCaps;
-    User::LeaveIfError( mobilePhone.GetIdentityCaps( identityCaps ));
-    // Check if we are allowed to get network info.
-    if ( networkCaps & RMobilePhone::KCapsGetCurrentNetwork )
-        {
-        // Gather initial information synchronically.
-        RMobilePhone::TMobilePhoneLocationAreaV1 location;
-
-        RMobilePhone::TMobilePhoneNetworkInfoV1 networkInfo;
-        RMobilePhone::TMobilePhoneNetworkInfoV1Pckg networkInfoPckg( networkInfo );
-
-        mobilePhone.GetCurrentNetwork( iStatus, networkInfoPckg, location );
-        User::WaitForRequest( iStatus );
-
-        CTelephony::TNetworkInfoV1 telephonyNetworkInfo;
-        if ( iStatus == KErrNone )
-            {
-            telephonyNetworkInfo.iMode = static_cast<CTelephony::TNetworkMode>( networkInfo.iMode );
-            telephonyNetworkInfo.iCountryCode = networkInfo.iCountryCode;
-            telephonyNetworkInfo.iCdmaSID = networkInfo.iCdmaSID;
-            telephonyNetworkInfo.iNetworkId = networkInfo.iNetworkId;
-            }
-        else
-            {
-            telephonyNetworkInfo.iCountryCode = iSetter.CountryCode();
-            telephonyNetworkInfo.iNetworkId = iSetter.NetworkId();
-            }
-            iNetworkInfoPckg() = telephonyNetworkInfo;
-        }
-    else
-        {
-        // Leave if we are not allowed to get network info.
-        // Other action could also be considered!!!!
-        User::Leave( KErrNotSupported );
-        }
-
-    CleanupStack::PopAndDestroy( 2, &telServer );
-#endif
-    // At the end, update the local variables by simulating the "netid changed" event.
-    RunL();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioNetworkInfoListener::~CRadioNetworkInfoListener()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    Cancel();
-
-#ifndef __WINS__
-    delete iTelephony;
-#endif
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioNetworkInfoListener::CompoundNetworkId() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LOG_FORMAT( "Returning iCompoundNetworkId: %d", iCompoundNetworkId );
-    return iCompoundNetworkId;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TPtrC CRadioNetworkInfoListener::SubscriberId() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TPtrC id = iSubscriberId.iSubscriberId;
-    LOG_FORMAT( "SubscriberId: %S", &id );
-    return id;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TPtrC CRadioNetworkInfoListener::CountryCode() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TPtrC countryCode = iSetter.CountryCode();
-    LOG_FORMAT( "CountryCode: %S", &countryCode );
-    return countryCode;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioNetworkInfoListener::SaveNetworkInfoL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-#ifdef __WINS__
-    iNetworkInfo.iCountryCode.Copy( _L("244") );
-    iNetworkInfo.iNetworkId.Zero();
-#endif
-
-    LOG_FORMAT( "iNetworkInfo.iCountryCode = %S",
-                  &iNetworkInfo.iCountryCode );
-
-    User::LeaveIfError( iSetter.SetCountryCode( iNetworkInfo.iCountryCode ) );
-
-    // The compound network identifier is composed of the current network identifier and country code.
-    TBuf<KDefaultRealWidth> compoundNetworkId;
-    compoundNetworkId.Append( iSetter.CountryCode() );
-    if ( iNetworkInfo.iNetworkId.Length() < 2 )
-        {
-        // Network identifier has only one digit, in which case it must be prepended with a zero.
-        compoundNetworkId.AppendNum( 0 );
-        }
-
-    compoundNetworkId.Append( iNetworkInfo.iNetworkId );
-
-    TLex lex( compoundNetworkId );
-    User::LeaveIfError( lex.Val( iCompoundNetworkId ) );
-
-    if ( iCompoundNetworkId != 0 && iPreviousCompoundNetworkId != iCompoundNetworkId )
-        {
-        if ( iPreviousCompoundNetworkId != 0 && iObserver )
-            {
-            iObserver->NetworkIdChanged();
-            }
-        iPreviousCompoundNetworkId = iCompoundNetworkId;
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioNetworkInfoListener::DoCancel()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-#ifndef __WINS__
-    iTelephony->CancelAsync( CTelephony::ECurrentNetworkInfoChangeCancel );
-#endif
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioNetworkInfoListener::RunL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "iStatus.Int() = %d", iStatus.Int() ) );
-#ifndef __WINS__
-    iTelephony->NotifyChange( iStatus, CTelephony::ECurrentNetworkInfoChange, iNetworkInfoPckg );
-    SetActive();
-#endif
-    SaveNetworkInfoL();
-    }
--- a/radioengine/engine/src/cradiordsreceiver.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,224 +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:
-*
-*/
-
-// User includes
-#include "cradiordsreceiver.h"
-#include "mradioenginesettings.h"
-#include "mradiordsdataobserver.h"
-#include "cradioenginelogger.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioRdsReceiver::CRadioRdsReceiver( MRadioEngineSettings& aSettings )
-    : CRadioRdsReceiverBase( aSettings )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiver::ConstructL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    BaseConstructL();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioRdsReceiver* CRadioRdsReceiver::NewL( MRadioEngineSettings& aSettings )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    CRadioRdsReceiver* self = new ( ELeave ) CRadioRdsReceiver( aSettings );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioRdsReceiver::~CRadioRdsReceiver()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    if ( iRdsUtility )
-        {
-        iRdsUtility->Close();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiver::InitL( CRadioUtility& aRadioUtility )
-    {
-    LOG_METHOD_AUTO;
-
-    iRdsUtility = &aRadioUtility.RadioRdsUtilityL( *this );
-
-    LogReceiverCapabilities();
-
-    SetAutomaticSwitchingL( EFalse );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiver::SetAutomaticSwitchingL( TBool aEnable )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    if ( iRdsUtility )
-        {
-        User::LeaveIfError( iRdsUtility->SetAutomaticSwitching( aEnable ) );
-        }
-
-    // Notifies the observers
-    CRadioRdsReceiverBase::SetAutomaticSwitchingL( aEnable );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiver::StartReceiver()
-    {
-    LOG_METHOD_AUTO;
-    // Request to be notified of almost all RDS data.
-    // Unwanted RDS values:
-    //    ERdsClockTime
-    //    ERdsTrafficProgramme
-    //    ERdsTrafficAnnouncement
-    //    ERdsAlternateFrequency
-    TRdsData rdsData;
-    rdsData.iRdsFunctions = ERdsProgrammeIdentification |
-                            ERdsProgrammeType |
-                            ERdsProgrammeService |
-                            ERdsRadioText |
-                            ERdsRadioTextPlus;
-
-    rdsData.iAdditionalFunctions1 = 0;
-    rdsData.iAdditionalFunctions2 = 0;
-
-    LOG_ASSERT( iRdsUtility, LOG( "Error: RDS utility not created!" ) );
-    if ( iRdsUtility && !iStarted )
-        {
-        TInt err = iRdsUtility->NotifyRdsDataChange( rdsData );
-        if ( !err )
-            {
-            // Avoid further calls
-            iStarted = ETrue;
-            LOG( "Requested RDS notifications from receiver." );
-            }
-        else
-            {
-            LOG_FORMAT( "Failed to request RDS data with err %d", err );
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiver::StopReceiver()
-    {
-    LOG_METHOD_AUTO;
-
-    if ( iRdsUtility )
-        {
-        iRdsUtility->CancelNotifyRdsDataChange();
-        }
-    iStarted = EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// Logs the RDS receiver capabilities if logging is enabled
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiver::LogReceiverCapabilities()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-#ifdef LOGGING_ENABLED
-    // Log the RDS utility capabilities
-    if ( iRdsUtility )
-        {
-        TRdsCapabilities caps;
-        caps.iRdsFunctions = 0;
-        caps.iAdditionalFunctions1 = 0;
-        caps.iAdditionalFunctions2 = 0;
-        TInt err = iRdsUtility->GetCapabilities( caps );
-        if ( !err )
-            {
-            TBuf<100> capsBuf;
-            if ( caps.iRdsFunctions & ERdsProgrammeIdentification == ERdsProgrammeIdentification )
-                {
-                capsBuf.Append( _L("PI ") );
-                }
-            if ( caps.iRdsFunctions & ERdsProgrammeType == ERdsProgrammeType )
-                {
-                capsBuf.Append( _L("Genre ") );
-                }
-            if ( caps.iRdsFunctions & ERdsProgrammeService == ERdsProgrammeService )
-                {
-                capsBuf.Append( _L("PS ") );
-                }
-            if ( caps.iRdsFunctions & ERdsRadioText == ERdsRadioText )
-                {
-                capsBuf.Append( _L("RT ") );
-                }
-            if ( caps.iRdsFunctions & ERdsRadioTextPlus == ERdsRadioTextPlus )
-                {
-                capsBuf.Append( _L("RT+ ") );
-                }
-            if ( caps.iRdsFunctions & ERdsAlternateFrequency == ERdsAlternateFrequency )
-                {
-                capsBuf.Append( _L("AF ") );
-                }
-            if ( caps.iRdsFunctions & ERdsClockTime == ERdsClockTime )
-                {
-                capsBuf.Append( _L("Time ") );
-                }
-            if ( caps.iRdsFunctions & ERdsTrafficProgramme == ERdsTrafficProgramme )
-                {
-                capsBuf.Append( _L("TrafficProgramme ") );
-                }
-            if ( caps.iRdsFunctions & ERdsTrafficAnnouncement == ERdsTrafficAnnouncement )
-                {
-                capsBuf.Append( _L("TrafficAnnouncement ") );
-                }
-            LOG_FORMAT( "RDS receiver capabilities: %S", &capsBuf );
-            LOG_FORMAT( "Functions: %d, AdditionalFunctions1: %d, iAdditionalFunctions2: %d",
-                    caps.iRdsFunctions, caps.iAdditionalFunctions1, caps.iAdditionalFunctions2 );
-            }
-        else
-            {
-            LOG_FORMAT( "Failed to get RDS utility capabilities: err %d", err );
-            }
-        }
-#endif // LOGGING_ENABLED
-    }
--- a/radioengine/engine/src/cradiordsreceiverbase.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,407 +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:
-*
-*/
-
-// User includes
-#include "cradiordsreceiverbase.h"
-#include "cradioenginelogger.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioRdsReceiverBase::CRadioRdsReceiverBase( MRadioEngineSettings& aSettings )
-    : iSettings( aSettings )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::BaseConstructL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iPsName = HBufC::NewL( TRdsPSName().MaxLength() );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioRdsReceiverBase::~CRadioRdsReceiverBase()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iObservers.Close();
-    delete iPsName;
-    iRadioText.Close();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::AddObserverL( MRadioRdsDataObserver* aObserver )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TInt index = iObservers.FindInAddressOrder( aObserver );
-    if ( index == KErrNotFound )
-        {
-        iObservers.InsertInAddressOrderL( aObserver );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::RemoveObserver( MRadioRdsDataObserver* aObserver )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TInt index = iObservers.FindInAddressOrder( aObserver );
-
-    if ( index >= 0 )
-        {
-        iObservers.Remove( index );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioRdsReceiverBase::AutomaticSwitchingEnabled() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iAfEnabled;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-const TDesC& CRadioRdsReceiverBase::ProgrammeService() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return *iPsName;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-const TDesC& CRadioRdsReceiverBase::RadioText() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iRadioText;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioRdsReceiverBase::SignalAvailable() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iSignalAvailable;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::SetAutomaticSwitchingL( TBool aEnable )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iAfEnabled = aEnable;
-    for ( TInt i = 0; i < iObservers.Count(); ++i )
-        {
-        iObservers[i]->RdsAfSearchStateChange( iAfEnabled );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::ClearRdsInformation()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iPsName->Des().Zero();
-    iRadioText.Close();
-    MrroRdsEventSignalChange( EFalse );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroStationSeekByPTYComplete( TInt DEBUGVAR3( aError ),
-                                                          TInt DEBUGVAR3( aFrequency ) )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aError: %d, aFrequency: %d ", aError, aFrequency ) );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroStationSeekByTAComplete( TInt DEBUGVAR3( aError ),
-                                                         TInt DEBUGVAR3( aFrequency ) )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aError: %d, aFrequency: %d ", aError, aFrequency ) );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroStationSeekByTPComplete( TInt DEBUGVAR3( aError ),
-                                                         TInt DEBUGVAR3( aFrequency ) )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aError: %d, aFrequency: %d ", aError, aFrequency ) );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroGetFreqByPTYComplete( TInt DEBUGVAR3( aError ),
-                                                      RArray<TInt>& /*aFreqList*/ )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aError: %d", aError ) );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroGetFreqByTAComplete( TInt DEBUGVAR3( aError ),
-                                                     RArray<TInt>& /*aFreqList*/ )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aError: %d", aError ) );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroGetPSByPTYComplete( TInt DEBUGVAR3( aError ),
-                                                    RArray<TRdsPSName>& /*aPsList*/ )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aError: %d", aError ) );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroGetPSByTAComplete( TInt DEBUGVAR3( aError ),
-                                                   RArray<TRdsPSName>& /*aPsList*/ )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aError: %d", aError ) );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroRdsDataPI( TInt aPi )
-    {
-    LEVEL2( LOG_METHOD_AUTO );
-    LEVEL2( LOG_FORMAT( "aPi: %d", aPi ) );
-    const TInt observerCount = iObservers.Count();
-    const TUint32 frequency = iSettings.TunedFrequency();
-    for ( TInt i = 0; i < observerCount; ++i )
-        {
-        iObservers[i]->RdsDataPiCode( frequency, aPi );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroRdsDataPTY( TRdsProgrammeType aPty )
-    {
-    LEVEL2( LOG_METHOD_AUTO );
-    LEVEL2( LOG_FORMAT( "aPty: %d", aPty ) );
-    const TInt observerCount = iObservers.Count();
-    const TUint32 frequency = iSettings.TunedFrequency();
-    for ( TInt i = 0; i < observerCount; ++i )
-        {
-        iObservers[i]->RdsDataGenre( frequency, aPty );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Notifies of the New Programme Service data
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroRdsDataPS( TRdsPSName& aPs )
-    {
-    LEVEL2( LOG_METHOD_AUTO );
-    LEVEL2( LOG_FORMAT( "aPs: %S", &aPs ) );
-    const TUint32 frequency = iSettings.TunedFrequency();
-    iPsName->Des().Copy( aPs );
-    const TInt observerCount = iObservers.Count();
-    for ( TInt i = 0; i < observerCount; ++i )
-        {
-        iObservers[i]->RdsDataProgrammeService( frequency, *iPsName );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroRdsDataRT( TRdsRadioText& aRt )
-    {
-    LEVEL2( LOG_METHOD_AUTO );
-    LEVEL2( LOG_FORMAT( "aRt: %S", &aRt ) );
-    iRadioText.Close();
-    iRadioText.Create( aRt );
-
-    const TUint32 frequency = iSettings.TunedFrequency();
-    const TInt observerCount = iObservers.Count();
-    for ( TInt i = 0; i < observerCount; ++i )
-        {
-        iObservers[i]->RdsDataRadioText( frequency, iRadioText );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroRdsDataCT( TDateTime& /*aCt*/ )
-    {
-    LEVEL2( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroRdsDataTA( TBool DEBUGVAR2( aTaOn ) )
-    {
-    LEVEL2( LOG_METHOD_AUTO );
-    LEVEL2( LOG_FORMAT( "aTaOn: %d", aTaOn ) );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroRdsDataRTplus( TRdsRTplusClass aRtPlusClass,
-                                               TRdsRadioText& aRtPlusData )
-    {
-    LOG_METHOD_AUTO;
-    LOG_FORMAT( "Class: %d, data: %S", aRtPlusClass, &aRtPlusData );
-    const TUint32 frequency = iSettings.TunedFrequency();
-    const TInt observerCount = iObservers.Count();
-    for ( TInt i = 0; i < observerCount; ++i )
-        {
-        iObservers[i]->RdsDataRadioTextPlus( frequency, aRtPlusClass, aRtPlusData );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Notifies of the start of Alternate Frequency search
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroRdsSearchBeginAF()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    const TInt observerCount = iObservers.Count();
-    for ( TInt i = 0; i < observerCount; ++i )
-        {
-        iObservers[i]->RdsAfSearchBegin();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Notifies of the end of Alternate Frequency search
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroRdsSearchEndAF( TInt aError, TInt aFrequency )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aError: %d, aFrequency: %d", aError, aFrequency ) );
-    const TInt observerCount = iObservers.Count();
-    for ( TInt i = 0; i < observerCount; ++i )
-        {
-        // Radio utility uses Hz, UI uses kHz. It's ok to divide with 1000, possible lost fractions are useless.
-        iObservers[i]->RdsAfSearchEnd( aFrequency, aError );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroRdsStationChangeTA( TInt DEBUGVAR3( aFrequency ) )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aFrequency: %d", aFrequency ) );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroRdsEventAutomaticSwitchingChange( TBool DEBUGVAR3( aAuto ) )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aAuto: %d", aAuto ) );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroRdsEventAutomaticTrafficAnnouncement( TBool DEBUGVAR3( aAuto ) )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aAuto: %d", aAuto ) );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRdsReceiverBase::MrroRdsEventSignalChange( TBool aSignal )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aSignal: %d", aSignal ) );
-    iSignalAvailable = aSignal;
-    const TUint32 frequency = iSettings.TunedFrequency();
-    const TInt observerCount = iObservers.Count();
-    for ( TInt i = 0; i < observerCount; ++i )
-        {
-        iObservers[i]->RdsAvailable( frequency, iSignalAvailable );
-        }
-    }
--- a/radioengine/engine/stub/bwins/fmradioengine_stubu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,4 +0,0 @@
-EXPORTS
-	??1CRadioEngine@@UAE@XZ @ 1 NONAME ; CRadioEngine::~CRadioEngine(void)
-	?NewL@CRadioEngine@@SAPAV1@AAVMRadioEngineInitializer@@@Z @ 2 NONAME ; class CRadioEngine * CRadioEngine::NewL(class MRadioEngineInitializer &)
-
--- a/radioengine/engine/stub/eabi/fmradioengine_stubu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-EXPORTS
-	_ZN12CRadioEngine4NewLER23MRadioEngineInitializer @ 1 NONAME
-	_ZN12CRadioEngineD0Ev @ 2 NONAME
-	_ZN12CRadioEngineD1Ev @ 3 NONAME
-	_ZN12CRadioEngineD2Ev @ 4 NONAME
-
--- a/radioengine/engine/stub/group/bld.inf	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#include "../../../group/buildflags.hrh"
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-WINSCW ARMV5
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-radioengine_stub.mmp
--- a/radioengine/engine/stub/group/radioengine_stub.mmp	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#include "../../../group/buildflags.hrh"
-
-#include <platform_paths.hrh>
-
-#include <data_caging_paths.hrh>
-
-TARGET                  fmradioengine_stub.dll
-TARGETTYPE              DLL
-UID                     0x1000008D 0x01000011
-VERSION                 11.0
-
-CAPABILITY              CAP_GENERAL_DLL
-VENDORID                VID_DEFAULT
-
-PAGED
-SMPSAFE
-
-SOURCEPATH              ../../src
-SOURCE                  cradioengine.cpp
-SOURCE                  cradioengineimp.cpp
-SOURCE                  cradiordsreceiver.cpp
-SOURCE                  cradiordsreceiverbase.cpp
-SOURCE                  cradionetworkinfolistener.cpp
-
-USERINCLUDE             ../../api
-USERINCLUDE             ../../inc
-USERINCLUDE             ../../../utils/api
-USERINCLUDE             ../../../settings/api
-USERINCLUDE             ../../../group
-
-// Default system include paths for application layer modules.
-APP_LAYER_SYSTEMINCLUDE
-
-LIBRARY                 fmradioengineutils_stub.lib
-LIBRARY                 fmradioenginesettings_stub.lib
-
-LIBRARY                 audiooutputrouting.lib
-LIBRARY                 euser.lib
-LIBRARY                 efsrv.lib
-LIBRARY                 radio_utility_stub.lib
-LIBRARY                 cone.lib
-LIBRARY                 etel3rdparty.lib            // For CTelephony
-LIBRARY                 etel.lib                    // For RTelServer
-LIBRARY                 etelmm.lib                  // For RMobilePhone
-LIBRARY                 commsdat.lib                // For CommsDat
-LIBRARY                 timezonelocalization.lib    // For CTzLocalizer
-LIBRARY                 bafl.lib                    // For CDesCArray
-LIBRARY                 centralrepository.lib
--- a/radioengine/group/bld.inf	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,21 +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:
-*
-*/
-
-PRJ_MMPFILES
-#include "../utils/group/bld.inf"
-#include "../settings/group/bld.inf"
-#include "../engine/group/bld.inf"
--- a/radioengine/group/buildflags.hrh	Tue Aug 31 15:15:02 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 BUILDFLAGS_HRH_
-#define BUILDFLAGS_HRH_
-
-
-#endif // BUILDFLAGS_HRH_
--- a/radioengine/settings/api/cradioregion.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,110 +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 CRADIOREGION_H
-#define CRADIOREGION_H
-
-
-// System includes
-#include <e32base.h>
-
-// User includes
-#include "radioengine.hrh"
-
-// Forward declarations
-class CRadioRegion;
-class TResourceReader;
-
-// Data types
-typedef RPointerArray<CRadioRegion> RRadioRegionArray;
-typedef RPointerArray<HBufC16> RRadioCountryCodeArray;
-
-// Class declaration
-
-/**
-*  Class CRadioRegion provides information about FM region
-*/
-NONSHARABLE_CLASS( CRadioRegion ) : public CBase
-    {
-public:
-
-    static CRadioRegion* NewL( TResourceReader& aRr );
-
-    ~CRadioRegion();
-
-// New methods
-
-    /**
-    * Id Get the id of region
-    * @return id of region
-    */
-    IMPORT_C TRadioRegion Id() const;
-
-    /**
-    * StepSize Get the step interval of region
-    * @return Step size
-    */
-    IMPORT_C TUint32 StepSize() const;
-
-    /**
-    * Get the minimum frequency of region
-    * @return Minimum frequency
-    */
-    IMPORT_C TUint32 MinFrequency() const;
-
-    /**
-    * Get the maximum frequency of region
-    * @return Maximum frequency
-    */
-    IMPORT_C TUint32 MaxFrequency() const;
-
-    /**
-    * Get the decimal count of region.
-    * @return Decimal count.
-    */
-    IMPORT_C TInt DecimalCount() const;
-
-    /**
-    * CountryCode Get the country code of region
-    * @return Country code, or empty descriptor if country code doesn't exist
-    */
-    IMPORT_C const RRadioCountryCodeArray& CountryCodes();
-
-private:
-
-    CRadioRegion();
-
-    void ConstructL( TResourceReader& aRr );
-
-private: // data
-    
-    /** Id of the region*/
-    TRadioRegion            iId;
-    /** Step interval*/
-    TUint32                 iStepSize;
-    /** Min frequency */
-    TUint32                 iMinFreq;
-    /** Max frequency */
-    TUint32                 iMaxFreq;
-    /** Decimal count */
-    TInt                    iDecimalCount;
-    /** Country code*/
-    RRadioCountryCodeArray  iCountryCodes;
-
-    };
-
-#endif // CRADIOREGION_H
--- a/radioengine/settings/api/cradiosettings.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +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 C_RADIOSETTINGS_H
-#define C_RADIOSETTINGS_H
-
-// System includes
-#include <e32base.h>
-
-// User includes
-#include "radioengine.hrh"
-
-// Forward declarations
-class CCoeEnv;
-class MRadioApplicationSettings;
-class MRadioEngineSettings;
-class MRadioSettingsSetter;
-class CRadioRepositoryManager;
-class MRadioPresetSettings;
-class RFs;
-
-/**
- * Manages persistent application settings.
- *
- * Exposes access to the underlying settings implementations.
- */
-NONSHARABLE_CLASS( CRadioSettings ) : public CBase
-    {
-
-public:
-
-    IMPORT_C static CRadioSettings* NewL();
-
-    IMPORT_C virtual ~CRadioSettings();
-
-    /**
-     * Determines if region is allowed.
-     */
-    virtual TBool IsRegionAllowed( TRadioRegion aRegionId ) const = 0;
-
-    /**
-     * Returns the implemented application settings interface.
-     *
-     * @return  The implemented application settings interface.
-     */
-    virtual MRadioApplicationSettings& ApplicationSettings() const = 0;
-
-    /**
-     * Returns the implemented radio settings interface.
-     *
-     * @return  The implemented radio settings interface.
-     */
-    virtual MRadioEngineSettings& EngineSettings() const = 0;
-
-    /**
-     * Returns the implemented radio settings interface.
-     *
-     * @return  The implemented setter interface for radio settings.
-     */
-    virtual MRadioSettingsSetter& RadioSetter() const = 0;
-
-    /**
-     * Resolves the most recently updated location for a file.
-     *
-     * @param   aFileName      The file name to be searched.
-     *                         On return, will contain the full path to the file.
-     * @param   aPath          The absolute path to the file. If drive letter is
-     *                         given then that one will be first tried.
-     */
-    virtual void ResolveDriveL( TFileName& aFileName, const TDesC& aPath ) = 0;
-
-    };
-
-#endif // C_RADIOSETTINGS_H
-
--- a/radioengine/settings/api/mradioapplicationsettings.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +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 M_RADIOAPPLICATIONSETTINGS_H
-#define M_RADIOAPPLICATIONSETTINGS_H
-
-#include <badesca.h>
-
-/**
- * MRadioApplicationSettings
- *
- * Interface for managing persistent Visual Radio application settings.
- */
-NONSHARABLE_CLASS( MRadioApplicationSettings )
-    {
-
-public:
-
-    virtual TBool IsFirstTimeStart() = 0;
-
-    virtual void SetFirstTimeStartPerformed( TBool aFirstTimeStartPerformed ) = 0;
-
-    virtual TInt SetUiFlags( TUint aUiFlags ) = 0;
-
-    virtual TUint UiFlags() const = 0;
-
-    };
-
-#endif // M_RADIOAPPLICATIONSETTINGS_H
--- a/radioengine/settings/api/mradioenginesettings.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,188 +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 M_RADIOSETTINGS_H
-#define M_RADIOSETTINGS_H
-
-// System includes
-#include <e32def.h>
-
-// User includes
-#include "radioengine.hrh"
-
-// Forward declarations
-class CRadioRegion;
-
-/**
- * Interface for managing persistent Visual Radio application FM radio specific settings.
- */
-NONSHARABLE_CLASS( MRadioEngineSettings )
-    {
-
-public:
-
-    /**
-     * Retrieves the radio volume level that is used when audio is routed through the headset.
-     *
-     * @return   The radio volume level.
-     */
-    virtual TInt HeadsetVolume() const = 0;
-
-    /**
-     * Retrieves the radio volume level that is used when audio is routed through the speaker.
-     *
-     * @return  The radio volume level.
-     */
-    virtual TInt SpeakerVolume() const = 0;
-
-    /**
-     * Wrapper for retrieving the radio volume level of current output device
-     *
-     * @return  The radio volume level.
-     */
-    virtual TInt Volume() const = 0;
-
-    /**
-     * Retrieves the radio output mode currently in use.
-     *
-     * @return  The radio output mode currently in use.
-     */
-    virtual TInt OutputMode() const = 0;
-
-    /**
-     * Retrieves the radio audio route in use.
-     *
-     * @return  The radio audio route in use.
-     */
-    virtual TInt AudioRoute() const = 0;
-
-    /**
-     * Retrieves the muting state of radio when audio is routed through the headset.
-     *
-     * @return  <code>ETrue</code> if radio audio is muted when routed through the headset, <code>EFalse</code> otherwise.
-     */
-    virtual TBool IsHeadsetVolMuted() const = 0;
-
-    /**
-     * Retrieves the muting state of radio when audio is routed through the speaker.
-     *
-     * @return  <code>ETrue</code> if radio audio is muted when routed through the speaker, <code>EFalse</code> otherwise.
-     */
-    virtual TBool IsSpeakerVolMuted() const = 0;
-
-    /**
-     * Wrapper for retrieving the muting state of current output device
-     *
-     * @return  <code>ETrue</code> if radio audio is muted, <code>EFalse</code> otherwise.
-     */
-    virtual TBool IsVolMuted() const = 0;
-
-    /**
-     * Retrieves the power state of the radio.
-     *
-     * @return  <code>ETrue</code> if the radio is powered on, <code>EFalse</code> otherwise.
-     */
-    virtual TBool IsPowerOn() const = 0;
-
-    /**
-     * Retrieves the currently tuned frequency.
-     *
-     * @return  The currently tuned frequency.
-     */
-    virtual TUint32 TunedFrequency() const = 0;
-
-    /**
-     * Retrieves the default minimum volume level.
-     *
-     * @return  The default minimum volume level.
-     */
-    virtual TInt DefaultMinVolumeLevel() const = 0;
-
-    /**
-     * Retrieves the number of regions defined.
-     *
-     * @return  The number of regions defined.
-     */
-    virtual TInt CountRegions() const = 0;
-
-    /**
-     * Retrieves a region matching the supplied index.
-     *
-     * @param   aIndex  The index of the region.
-     * @return  The region matching the supplied index.
-     */
-    virtual CRadioRegion& Region( TInt aIndex ) const = 0;
-
-    /**
-     * Retrieves the current region's ID.
-     *
-     * @return  The region's ID.
-     */
-    virtual TRadioRegion RegionId() const = 0;
-
-    /**
-     * Retrieves the frequency step size for the current region.
-     *
-     * @return  The frequency step size for the current region.
-     */
-    virtual TUint32 FrequencyStepSize() const = 0;
-
-    /**
-     * Retrieves the maximum frequency for the current region.
-     * If region switching is ongoing, this might be zero.
-     *
-     * @return  The maximum freqency for the current region.
-     */
-    virtual TUint32 MaxFrequency() const = 0;
-
-    /**
-     * Retrieves the minimum frequency for the current region.
-     * If region switching is ongoing, this might be zero.
-     *
-     * @return  The minimum freqency for the current region.
-     */
-    virtual TUint32 MinFrequency() const = 0;
-
-    /**
-     * Retrieves the frequency decimal count of the current region.
-     *
-     * @return Decimal count.
-     */
-    virtual TInt DecimalCount() const = 0;
-
-    /**
-     * Retrieves the default region's ID.
-     *
-     * @return  The region's ID.
-     */
-    virtual TRadioRegion DefaultRegion() const = 0;
-
-    /**
-     *
-     */
-    virtual TPtrC NetworkId() const = 0;
-
-    /**
-     *
-     */
-    virtual TPtrC CountryCode() const = 0;
-
-    };
-
-#endif // M_RADIOSETTINGS_H
-
-
--- a/radioengine/settings/api/mradiosettingsobserver.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,48 +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 M_RADIOSETTINGSOBSERVER_H
-#define M_RADIOSETTINGSOBSERVER_H
-
-
-/**
- * Interface for observing some radio related settings.
- * This interface is intended for the use of radio to update it's internal state
- * to conform to newly changed setting
- */
-NONSHARABLE_CLASS( MRadioSettingsObserver )
-    {
-public:
-
-    /**
-     * Notifies of the change in RDS alternate frequency setting
-     *
-     * @param aEnabled ETrue if AF search is enabled, otherwise EFalse
-     */
-    virtual void RdsAfSearchSettingChangedL( TBool aEnabled ) = 0;
-
-    /**
-     * Notifies of the change in region setting when it is changed
-     * outside of the particular radio settings instance
-     *
-     * @param aRegion The new region ID
-     */
-    virtual void RegionSettingChangedL( TInt aRegion ) = 0;
-
-    };
-
-#endif // M_RADIOSETTINGSOBSERVER_H
--- a/radioengine/settings/api/mradiosettingssetter.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,131 +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 M_RADIOSETTINGSSETTERS_H
-#define M_RADIOSETTINGSSETTERS_H
-
-// User includes
-#include "mradioenginesettings.h"
-
-// Forward declarations
-class MRadioSettingsObserver;
-
-/**
- * Setter interface for radio settings. This should be accessible only for CRadioEngineImp
- */
-NONSHARABLE_CLASS( MRadioSettingsSetter ) : public MRadioEngineSettings
-    {
-public:
-
-    /**
-     * Sets observer for the radio settings
-     *
-     * @param aObserver The observer
-     */
-    virtual void SetObserver( MRadioSettingsObserver* aObserver ) = 0;
-
-    /**
-     * Stores the radio volume level that is used when audio is routed through the headset.
-     *
-     * @param    aVolume     The radio volume level to store.
-     *
-     */
-    virtual TInt SetHeadsetVolume( TInt aVolume ) = 0;
-
-    /**
-     * Stores the radio volume level that is used when audio is routed through the speaker.
-     *
-     * @param   aVolume     The radio volume level.
-     */
-    virtual TInt SetSpeakerVolume( TInt aVolume ) = 0;
-
-    /**
-     * Wrapper for storing the radio volume level of current output device
-     *
-     * @param   aVolume     The radio volume level.
-     */
-    virtual TInt SetVolume( TInt aVolume ) = 0;
-
-    /**
-     * Stores the radio output mode to use.
-     *
-     * @param   aOutputMode     The radio output mode to use.
-     */
-    virtual TInt SetOutputMode( TInt aOutputMode ) = 0;
-
-    /**
-     * Stores the radio audio route ( headset/ihf ) to use.
-     *
-     * @param   aAudioRoute   The radio output destination to use.
-     */
-    virtual TInt SetAudioRoute( TInt aAudioRoute ) = 0;
-
-    /**
-     * Stores the radio muting state when audio is routed through the headset.
-     *
-     * @param   aMuted      <code>ETrue</code> if radio is to be muted when routed through the headset, <code>EFalse</code> otherwise.
-     */
-    virtual TInt SetHeadsetVolMuted( TBool aMuted ) = 0;
-
-    /**
-     * Stores the radio muting state when audio is routed through the speaker.
-     *
-     * @param   aMuted      <code>ETrue</code> if radio is to be muted when routed through the speaker, <code>EFalse</code> otherwise.
-     */
-    virtual TInt SetSpeakerVolMuted( TBool aMuted ) = 0;
-
-    /**
-     * Wrapper for storing the radio muting state of current output device
-     *
-     * @param   aMuted      <code>ETrue</code> if radio is to be muted, <code>EFalse</code> otherwise.
-     */
-    virtual TInt SetVolMuted( TBool aMuted ) = 0;
-
-    /**
-     * Stores the power state of the radio.
-     *
-     * @param   aPowerState     <code>ETrue</code> if radio is powered on, <code>EFalse</code> otherwise.
-     */
-    virtual TInt SetPowerOn( TBool aPowerState ) = 0;
-
-    /**
-     * Stores the frequency tuned.
-     *
-     * @param   aFrequency  The frequency to store.
-     */
-    virtual TInt SetTunedFrequency( TUint32 aFrequency ) = 0;
-
-    /**
-     * Stores the region ID currently in use.
-     *
-     * @param   aRegion     The region's ID to store.
-     */
-    virtual TInt SetRegionId( TInt aRegion ) = 0;
-
-    /**
-     *
-     */
-    virtual TInt SetNetworkId( const TDesC& aNetworkId ) = 0;
-
-    /**
-     *
-     */
-    virtual TInt SetCountryCode( const TDesC& aCountryCode ) = 0;
-
-    };
-
-#endif // M_RADIOSETTINGSSETTERS_H
--- a/radioengine/settings/bwins/fmradioenginesettingsu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-EXPORTS
-	?Id@CRadioRegion@@QBE?AW4TRadioRegion@@XZ @ 1 NONAME ; enum TRadioRegion CRadioRegion::Id(void) const
-	?NewL@CRadioSettings@@SAPAV1@XZ @ 2 NONAME ; class CRadioSettings * CRadioSettings::NewL(void)
-	?StepSize@CRadioRegion@@QBEKXZ @ 3 NONAME ; unsigned long CRadioRegion::StepSize(void) const
-	?MaxFrequency@CRadioRegion@@QBEKXZ @ 4 NONAME ; unsigned long CRadioRegion::MaxFrequency(void) const
-	?DecimalCount@CRadioRegion@@QBEHXZ @ 5 NONAME ; int CRadioRegion::DecimalCount(void) const
-	??1CRadioSettings@@UAE@XZ @ 6 NONAME ; CRadioSettings::~CRadioSettings(void)
-	?MinFrequency@CRadioRegion@@QBEKXZ @ 7 NONAME ; unsigned long CRadioRegion::MinFrequency(void) const
-	?CountryCodes@CRadioRegion@@QAEABV?$RPointerArray@VHBufC16@@@@XZ @ 8 NONAME ; class RPointerArray<class HBufC16> const & CRadioRegion::CountryCodes(void)
-
Binary file radioengine/settings/cenrep/2002FF52.txt has changed
Binary file radioengine/settings/cenrep/keys_radioengine.xls has changed
Binary file radioengine/settings/cenrep/radio.confml has changed
Binary file radioengine/settings/cenrep/radio_2002FF52.crml has changed
--- a/radioengine/settings/data/fmradioenginesettings.rss	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,164 +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:
-*
-*/
-
-// Resource identifier
-NAME    QRST
-
-// System includes
-#include <uikon.rh>
-
-#include "radioengine.hrh"
-
-// Resource definitions
-
-// ---------------------------------------------------------
-//    Resource signature
-// ---------------------------------------------------------
-//
-
-RESOURCE RSS_SIGNATURE { }
-
-// ---------------------------------------------------------
-//
-// ---------------------------------------------------------
-//
-STRUCT RADIO_REGION
-    {
-    WORD id;
-    LONG stepsize;
-    LONG minfrequency;
-    LONG maxfrequency;
-    WORD decimalcount;
-    LTEXT countrycodes[] = {""};
-    }
-
-// ---------------------------------------------------------
-//
-// ---------------------------------------------------------
-//
-STRUCT RADIO_REGION_ARRAY
-    {
-    LLINK regions[];
-    }
-
-// ---------------------------------------------------------
-//    r_qrad_regions
-//    Array of the supported regions
-// ---------------------------------------------------------
-//
-RESOURCE RADIO_REGION_ARRAY r_qrad_regions
-    {
-    regions =
-        {
-        r_qrad_region_japan,
-        r_qrad_region_america,
-        r_qrad_region_default
-        };
-    }
-
-// ---------------------------------------------------------
-//    r_qrad_region_japan
-//    Region settings for Japan
-//    Check country codes from:
-//    "COMPLEMENT TO ITU-T RECOMMENDATION E.212, LIST OF MOBILE COUNTRY OR GEOGRAPHICAL AREA CODES"
-// ---------------------------------------------------------
-//
-RESOURCE RADIO_REGION r_qrad_region_japan
-    {
-    id = ERadioRegionJapan;
-    stepsize = 100;
-    minfrequency = 76000;
-    maxfrequency = 90000;
-    decimalcount = 1;
-    countrycodes =
-        {
-        "440",
-        "441"
-        };
-    }
-
-// ---------------------------------------------------------
-//    r_qrad_region_america
-//    Region settings for America
-//    "COMPLEMENT TO ITU-T RECOMMENDATION E.212, LIST OF MOBILE COUNTRY OR GEOGRAPHICAL AREA CODES"
-// ---------------------------------------------------------
-//
-RESOURCE RADIO_REGION r_qrad_region_america
-    {
-    id = ERadioRegionAmerica;
-    stepsize = 200;
-    minfrequency = 88100;
-    maxfrequency = 107900;
-    decimalcount = 1;
-    countrycodes =
-        {
-        "302",  // Canada
-        "310",  // USA
-        "311",  // USA
-        "312",  // USA
-        "313",  // USA
-        "314",  // USA
-        "315",  // USA
-        "316",  // USA
-        "332",  // United States Virgin Islands
-        "334",  // Mexico
-        "338",  // Jamaica
-        "342",  // Barbados
-        "344",  // Antigua and Barbuda
-        "352",  // Grenada
-        "360",  // Saint Vincent and the Grenadines
-        "364",  // Bahamas
-        "366",  // Common Wealth of Dominica
-        "370",  // Dominican Republic
-        "372",  // Haiti
-        "374",  // Trinidad and Tobago
-        "368",  // Cuba
-        "702",  // Belize
-        "704",  // Guatemala
-        "706",  // El Salvador
-        "708",  // Honduras
-        "710",  // Nicaragua
-        "712",  // Costa Rica
-        "714",  // Panama
-        "716",  // Peru
-        "722",  // Argentina
-        "724",  // Brazil
-        "730",  // Chile
-        "732",  // Colombia
-        "734",  // Venezuela
-        "736",  // Bolivia
-        "738",  // Guyana
-        "740",  // Ecuador
-        "744",  // Paraguay
-        "746",  // Suriname
-        "748"   // Uruguay
-        };
-    }
-
-// ---------------------------------------------------------
-//    r_qrad_region_default
-//    Region settings for default region
-// ---------------------------------------------------------
-//
-RESOURCE RADIO_REGION r_qrad_region_default
-    {
-    id = ERadioRegionDefault;
-    stepsize = 100;
-    minfrequency = 87500;
-    maxfrequency = 108000;
-    decimalcount = 2;
-    }
--- a/radioengine/settings/eabi/fmradioenginesettingsu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-EXPORTS
-	_ZN12CRadioRegion12CountryCodesEv @ 1 NONAME
-	_ZN14CRadioSettings4NewLEv @ 2 NONAME
-	_ZN14CRadioSettingsD0Ev @ 3 NONAME
-	_ZN14CRadioSettingsD1Ev @ 4 NONAME
-	_ZN14CRadioSettingsD2Ev @ 5 NONAME
-	_ZNK12CRadioRegion12DecimalCountEv @ 6 NONAME
-	_ZNK12CRadioRegion12MaxFrequencyEv @ 7 NONAME
-	_ZNK12CRadioRegion12MinFrequencyEv @ 8 NONAME
-	_ZNK12CRadioRegion2IdEv @ 9 NONAME
-	_ZNK12CRadioRegion8StepSizeEv @ 10 NONAME
-
--- a/radioengine/settings/group/backup_registration.xml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,7 +0,0 @@
-<?xml version="1.0" standalone="yes"?>
-<backup_registration version="1.0">
-  <passive_backup>
-  </passive_backup>
-  <proxy_data_manager sid="0x10202BE9"/>
-  <restore requires_reboot = "no"/>
-</backup_registration>
\ No newline at end of file
--- a/radioengine/settings/group/bld.inf	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#include "../../group/buildflags.hrh"
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-WINSCW ARMV5
-
-PRJ_EXPORTS
-
-backup_registration.xml /epoc32/data/z/private/2002FF52/backup_registration.xml
-
-../cenrep/2002FF52.txt  /epoc32/data/z/private/10202be9/2002FF52.txt
-../cenrep/2002FF52.txt  /epoc32/RELEASE/winscw/UDEB/Z/private/10202be9/2002FF52.txt
-../cenrep/2002FF52.txt  /epoc32/RELEASE/winscw/UREL/Z/private/10202be9/2002FF52.txt
-
-PRJ_MMPFILES
-radioenginesettings.mmp
--- a/radioengine/settings/group/radioenginesettings.mmp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +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 "../../group/buildflags.hrh"
-
-#include <platform_paths.hrh>
-
-#include <data_caging_paths.hrh>
-
-#include                <data_caging_paths.hrh>
-
-TARGET                  fmradioenginesettings.dll
-TARGETTYPE              DLL
-UID                     0x1000008D 0x2002FF50
-VERSION                 10.0
-
-CAPABILITY              CAP_GENERAL_DLL
-VENDORID                VID_DEFAULT
-PAGED
-SMPSAFE
-LANG SC
-
-SOURCEPATH              ../data
-START RESOURCE          fmradioenginesettings.rss
-HEADER
-TARGETPATH              RESOURCE_FILES_DIR
-END // RESOURCE
-
-USERINCLUDE             ../api
-USERINCLUDE             ../inc
-USERINCLUDE             ../../utils/api
-
-APP_LAYER_SYSTEMINCLUDE
-
-SOURCEPATH              ../src
-SOURCE                  cradioregion.cpp
-SOURCE                  cradiosettings.cpp
-SOURCE                  cradiosettingsimp.cpp
-SOURCE                  cradioenginesettings.cpp
-SOURCE                  cradioapplicationsettings.cpp
-
-LIBRARY                 fmradioengineutils.lib
-LIBRARY                 bafl.lib
-LIBRARY                 commonengine.lib
-LIBRARY                 cone.lib
-LIBRARY                 efsrv.lib
-LIBRARY                 estor.lib
-LIBRARY                 euser.lib
-LIBRARY                 centralrepository.lib
--- a/radioengine/settings/inc/cradioapplicationsettings.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,58 +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 C_RADIOAPPLICATIONSETTINGS_H
-#define C_RADIOAPPLICATIONSETTINGS_H
-
-// User includes
-#include "mradioapplicationsettings.h"
-
-// Forward declarations
-class CRepository;
-
-/**
- * Concrete implementation of application settings.
- */
-NONSHARABLE_CLASS( CRadioApplicationSettings ) : public CBase
-                                               , public MRadioApplicationSettings
-    {
-
-public:
-
-    static CRadioApplicationSettings* NewL();
-
-    ~CRadioApplicationSettings();
-
-// from base class MRadioApplicationSettings
-
-    TBool IsFirstTimeStart();
-    void SetFirstTimeStartPerformed( TBool aFirstTimeStartPerformed );
-    TInt SetUiFlags( TUint aUiFlags );
-    TUint UiFlags() const;
-
-private:
-
-    CRadioApplicationSettings();
-
-    void ConstructL();
-    
-private: // data
-    CRepository* iRepository;
-
-    };
-
-#endif // C_RADIOAPPLICATIONSETTINGS_H
--- a/radioengine/settings/inc/cradioenginesettings.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,184 +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 C_RADIOENGINESETTINGS_H
-#define C_RADIOENGINESETTINGS_H
-
-// User includes
-#include "mradioenginesettings.h"
-#include "mradiosettingssetter.h"
-#include "cradioregion.h"
-
-// Forward declarations
-class MRadioSettingsObserver;
-class CRepository;
-class CRadioSettingsImp;
-
-// Constants
-
-/**
- * Maximum size of the network country code. 
- * From CTelephony::TNetworkInfoV1 in etel3rdparty.h
- */
-enum { KNetworkCountryCodeSize  = 4  };
-
-/**
- * Maximum size of the network identity.
- * From CTelephony::TNetworkInfoV1 in etel3rdparty.h
- */
-enum { KNetworkIdentitySize     = 8  };
-
-/**
- * Concrete implementation of radio settings.
- */
-NONSHARABLE_CLASS( CRadioEngineSettings ) : public CBase
-                                          , public MRadioSettingsSetter
-    {
-
-public:
-
-    static CRadioEngineSettings* NewL( CRadioSettingsImp& aRadioSettingsImp );
-
-    ~CRadioEngineSettings();
-
-    /**
-     * Determines if region is allowed.
-     */
-    TBool IsRegionAllowed( TRadioRegion aRegionId ) const;
-
-private:
-
-    CRadioEngineSettings( CRadioSettingsImp& aRadioSettingsImp );
-
-    void ConstructL();
-
-// from base class MRadioEngineSettings
-
-    TInt HeadsetVolume() const;
-    TInt SpeakerVolume() const;
-    TInt Volume() const;
-    TInt OutputMode() const;
-    TInt AudioRoute() const;
-    TBool IsHeadsetVolMuted() const;
-    TBool IsSpeakerVolMuted() const;
-    TBool IsVolMuted() const;
-    TBool IsPowerOn() const;
-    TUint32 TunedFrequency() const;
-    TInt DefaultMinVolumeLevel() const;
-    TInt CountRegions() const;
-    CRadioRegion& Region( TInt aIndex ) const;
-    TRadioRegion RegionId() const;
-    TUint32 FrequencyStepSize() const;
-    TUint32 MaxFrequency() const;
-    TUint32 MinFrequency() const;
-    TInt DecimalCount() const;
-    TRadioRegion DefaultRegion() const;
-    TPtrC NetworkId() const;
-    TPtrC CountryCode() const;
-
-// from base class MRadioSettingsSetter
-
-    void SetObserver( MRadioSettingsObserver* aObserver );
-    TInt SetHeadsetVolume( TInt aVolume );
-    TInt SetSpeakerVolume( TInt aVolume );
-    TInt SetVolume( TInt aVolume );
-    TInt SetOutputMode( TInt aOutputMode );
-    TInt SetAudioRoute( TInt aAudioRoute );
-    TInt SetHeadsetVolMuted( TBool aMuted );
-    TInt SetSpeakerVolMuted( TBool aMuted );
-    TInt SetVolMuted( TBool aMuted );
-    TInt SetPowerOn( TBool aPowerState );
-    TInt SetTunedFrequency( TUint32 aFrequency );
-    TInt SetRegionId( TInt aRegion );
-    TInt SetNetworkId( const TDesC& aNetworkId );
-    TInt SetCountryCode( const TDesC& aCountryCode );
-
-// New functions
-
-    /**
-     * Initializes the data holders
-     */
-    void InitializeDataHolders();
-
-    /**
-     * Gets a repository value and sets the default value if the key is not found
-     */
-    TBool GetRepositoryValue( int aKey, TInt& aValue, TInt aDefault );
-    
-    /**
-     * Sets a boolean value to cenrep and data holder
-     */
-    TInt SetFlagValue( int aKey, int aFlagId, TInt aValue );
-    
-    /**
-     * Initializes the regions as defined in the resource file.
-     */
-    void InitializeRegionsL();
-    
-    /**
-     * Converts Region ID to index
-     *
-     * @param aRegionId The region ID that is wanted to convert
-     * @return The region index, KErrNotFound if no match found
-     */
-    TInt RegionIndexForId( TInt aRegionId ) const;
-
-    /**
-     * Updates the current region index
-     *
-     * @param aRegionId The new region ID
-     */
-     void UpdateCurrentRegionIdx( TInt aRegionId );
-
-private: // data
-
-    /**
-     * The observer for the setting changes.
-     * Not own.
-     */
-    MRadioSettingsObserver*         iObserver;
-
-    /**
-     * The available regions.
-     */
-    RRadioRegionArray               iRegions;
-
-    /**
-     * The current region.
-     */
-    TInt                            iCurrentRegionIdx;
-    
-    CRadioSettingsImp&              iRadioSettingsImp;
-
-    RResourceFile                   iResFile;
-
-    CRepository*                    iRepository;
-
-    // Data holders for quick access   
-    TBitFlags                       iFlags;
-    TBuf<KNetworkIdentitySize>      iNetworkId;
-    TBuf<KNetworkCountryCodeSize>   iCountryCode;
-    TInt                            iHeadsetVolume;
-    TInt                            iSpeakerVolume;
-    TUint32                         iFrequency;
-    TInt                            iDefaultMinVolume;
-    TRadioRegion                    iDefaultRegion;
-    TRadioRegion                    iRegionId;
-
-    };
-
-#endif // C_RADIOENGINESETTINGS_H
--- a/radioengine/settings/inc/cradiosettingsimp.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,87 +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 C_RADIOSETTINGSIMP_H
-#define C_RADIOSETTINGSIMP_H
-
-// System includes
-#include <barsc.h>
-// User includes
-#include "cradiosettings.h"
-
-// Forward declarations
-class CRadioApplicationSettings;
-class CRadioEngineSettings;
-class RConeResourceLoader;
-
-// The name of the radio settings resource file.
-_LIT( KRadioSettingsResourceFile, "fmradioenginesettings.rsc" );
-
-/**
- * Manages persistent application settings.
- *
- * Exposes access to the underlying settings implementations.
- */
-NONSHARABLE_CLASS( CRadioSettingsImp ) : public CRadioSettings
-    {
-
-public:
-
-    static CRadioSettingsImp* NewL();
-
-    ~CRadioSettingsImp();
-
-    RFs& FsSession();
-    
-// from base class CRadioSettings
-
-    TBool IsRegionAllowed( TRadioRegion aRegionId ) const;
-    MRadioApplicationSettings& ApplicationSettings() const;
-    MRadioEngineSettings& EngineSettings() const;
-    MRadioSettingsSetter& RadioSetter() const;
-    void ResolveDriveL( TFileName& aFileName, const TDesC& aPath );
-
-private:
-
-    CRadioSettingsImp();
-
-    void ConstructL();
-
-private: // data
-
-    /**
-     * Implementation of the application settings.
-     * Own
-     */
-    CRadioApplicationSettings*  iApplicationSettings;
-
-    /**
-     * Implementation of the radio settings.
-     * Own
-     */
-    CRadioEngineSettings*       iEngineSettings;
-    
-    /**
-     * File session.
-     * Own
-     */
-    RFs*                        iFsSession; 
-
-    };
-
-#endif // C_RADIOSETTINGSIMP_H
-
--- a/radioengine/settings/src/cradioapplicationsettings.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,126 +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:
-*
-*/
-
-// System includes
-#include <centralrepository.h>
-
-// User includes
-#include "cradiosettingsimp.h"
-#include "radiointernalcrkeys.h"
-#include "cradioapplicationsettings.h"
-#include "cradioenginelogger.h"
-
-// This has to be the last include.
-#ifdef STUB_CONSTELLATION
-#   include <RadioStubManager.h>
-#endif //STUB_CONSTELLATION
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioApplicationSettings* CRadioApplicationSettings::NewL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    CRadioApplicationSettings* self = new ( ELeave ) CRadioApplicationSettings();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioApplicationSettings::ConstructL()
-    {
-    LEVEL2( LOG_METHOD_AUTO );
-    iRepository = CRepository::NewL( KRadioCRUid );
-    LOG_FORMAT( "iRepository = %i", iRepository );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioApplicationSettings::CRadioApplicationSettings()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioApplicationSettings::~CRadioApplicationSettings()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    delete iRepository;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioApplicationSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioApplicationSettings::IsFirstTimeStart()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TInt startCount = 0;
-    iRepository->Get( KRadioCRLaunchCount, startCount );
-
-    return startCount == 0;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioApplicationSettings.
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioApplicationSettings::SetFirstTimeStartPerformed( TBool aFirstTimeStartPerformed )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iRepository->Set( KRadioCRLaunchCount, aFirstTimeStartPerformed ? 1 : 0 );
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class MRadioApplicationSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioApplicationSettings::SetUiFlags( TUint aUiFlags )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iRepository->Set( KRadioCRUiFlags, static_cast<TInt>( aUiFlags ) );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioApplicationSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TUint CRadioApplicationSettings::UiFlags() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TInt uiFlags( 0 );
-    iRepository->Get( KRadioCRUiFlags, uiFlags );
-    return static_cast<TUint>( uiFlags );
-    }
--- a/radioengine/settings/src/cradioenginesettings.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,769 +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:
-*
-*/
-
-// System includes
-#include <barsread.h>
-#include <coemain.h>
-#include <bautils.h>
-#include <data_caging_path_literals.hrh>
-#include <fmradioenginesettings.rsg>
-#include <centralrepository.h>
-
-// User includes
-#include "radiointernalcrkeys.h"
-#include "radioenginedef.h"
-#include "cradioenginesettings.h"
-#include "cradiosettingsimp.h"
-#include "mradiosettingsobserver.h"
-#include "cradioenginelogger.h"
-
-// This has to be the last include.
-#ifdef STUB_CONSTELLATION
-#   include <RadioStubManager.h>
-#endif //STUB_CONSTELLATION
-
-
- /**
-  * On/Off type flags used by TBitFlags.
-  */
- enum TFlagValues
-     {
-      EHeadsetVolMuted      = 1 << 0
-     ,ESpeakerVolMuted      = 1 << 1
-     ,EPowerOn              = 1 << 2
-     ,EStereoOutput         = 1 << 3
-     ,EHeadsetAudioRoute    = 1 << 4
-     };
-
-// ======== LOCAL FUNCTIONS ========
-
- // ---------------------------------------------------------------------------
- // Normalize return value from TBitFlags to 1 or 0 just in case
- // Two negations: 16 => 0 => 1
- // ---------------------------------------------------------------------------
- //
-static TBool NormalizeBool( TBool aBool )
-    {
-    // Normalize return value from TBitFlags to 1 or 0 just in case
-    // Two negations: 16 => 0 => 1
-    return !( !aBool );
-    }
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioEngineSettings* CRadioEngineSettings::NewL( CRadioSettingsImp& aRadioSettingsImp )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    CRadioEngineSettings* self = new ( ELeave ) CRadioEngineSettings( aRadioSettingsImp );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineSettings::ConstructL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iRepository = CRepository::NewL( KRadioCRUid );
-
-    InitializeRegionsL();
-
-    InitializeDataHolders();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioEngineSettings::CRadioEngineSettings( CRadioSettingsImp& aRadioSettingsImp )
-    : iRadioSettingsImp( aRadioSettingsImp )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioEngineSettings::~CRadioEngineSettings()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iRegions.ResetAndDestroy();
-    iRegions.Close();
-    iResFile.Close();
-    delete iRepository;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSettingsSetter.
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineSettings::SetObserver( MRadioSettingsObserver* aObserver )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iObserver = aObserver;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSettingsSetter.
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::SetHeadsetVolume( TInt aVolume )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TInt err = iRepository->Set( KRadioCRHeadsetVolume, aVolume );
-    if ( !err )
-        {
-        iHeadsetVolume = aVolume;
-        }
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::HeadsetVolume() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iHeadsetVolume;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSettingsSetter.
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::SetSpeakerVolume( TInt aVolume )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TInt err = iRepository->Set( KRadioCRSpeakerVolume, aVolume );
-    if ( !err )
-        {
-        iSpeakerVolume = aVolume;
-        }
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::SpeakerVolume() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iSpeakerVolume;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSettingsSetter.
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::SetVolume( TInt aVolume )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    if ( AudioRoute() == RadioEngine::ERadioHeadset )
-        {
-        return SetHeadsetVolume( aVolume );
-        }
-    else
-        {
-        return SetSpeakerVolume( aVolume );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::Volume() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    if ( AudioRoute() == RadioEngine::ERadioHeadset )
-        {
-        return HeadsetVolume();
-        }
-    else
-        {
-        return SpeakerVolume();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSettingsSetter.
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::SetOutputMode( TInt aOutputMode )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TInt err = iRepository->Set( KRadioCROutputMode, aOutputMode );
-    if ( !err )
-        {
-        iFlags.Assign( EStereoOutput, aOutputMode == RadioEngine::ERadioStereo );
-        }
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::OutputMode() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iFlags.IsSet( EStereoOutput ) ? RadioEngine::ERadioStereo : RadioEngine::ERadioMono;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSettingsSetter.
-// Stores the radio audio route ( headset/ihf ) to use.
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::SetAudioRoute( TInt aAudioRoute )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TInt err = iRepository->Set( KRadioCRAudioRoute, aAudioRoute );
-    if ( !err )
-        {
-        iFlags.Assign( EHeadsetAudioRoute, aAudioRoute == RadioEngine::ERadioHeadset );
-        }
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-// Retrieves the radio audio route in use.
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::AudioRoute() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iFlags.IsSet( EHeadsetAudioRoute ) ? RadioEngine::ERadioHeadset : RadioEngine::ERadioSpeaker;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSettingsSetter.
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::SetHeadsetVolMuted( TBool aMuted )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return SetFlagValue( KRadioCRHeadsetMuteState, EHeadsetVolMuted, aMuted );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioEngineSettings::IsHeadsetVolMuted() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return NormalizeBool( iFlags.IsSet( EHeadsetVolMuted ) );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSettingsSetter.
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::SetSpeakerVolMuted( TBool aMuted )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return SetFlagValue( KRadioCRSpeakerMuteState, ESpeakerVolMuted, aMuted );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioEngineSettings::IsSpeakerVolMuted() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return NormalizeBool( iFlags.IsSet( ESpeakerVolMuted ) );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSettingsSetter.
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::SetVolMuted( TBool aMuted )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    if ( AudioRoute() == RadioEngine::ERadioHeadset )
-        {
-        return SetHeadsetVolMuted( aMuted );
-        }
-    else
-        {
-        return SetSpeakerVolMuted( aMuted );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioEngineSettings::IsVolMuted() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    if ( AudioRoute() == RadioEngine::ERadioHeadset )
-        {
-        return IsHeadsetVolMuted();
-        }
-    else
-        {
-        return IsSpeakerVolMuted();
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSettingsSetter.
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::SetPowerOn( TBool aPowerState )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return SetFlagValue( KRadioCRRadioPowerState, EPowerOn, aPowerState );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioEngineSettings::IsPowerOn() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return NormalizeBool( iFlags.IsSet( EPowerOn ) );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSettingsSetter.
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::SetTunedFrequency( TUint32 aFrequency )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TInt err = iRepository->Set( KRadioCRTunedFrequency, static_cast<TInt>( aFrequency ) );
-    if ( !err )
-        {
-        iFrequency = aFrequency;
-        }
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TUint32 CRadioEngineSettings::TunedFrequency() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iFrequency;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::DefaultMinVolumeLevel() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iDefaultMinVolume;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::CountRegions() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iRegions.Count();
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-//
-// ---------------------------------------------------------------------------
-//
-CRadioRegion& CRadioEngineSettings::Region( TInt aIndex ) const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    if ( aIndex == KErrNotFound )
-        {
-        aIndex = RegionIndexForId( DefaultRegion() );
-        }
-
-    return *iRegions[aIndex];
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TRadioRegion CRadioEngineSettings::RegionId() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iRegionId;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TRadioRegion CRadioEngineSettings::DefaultRegion() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iDefaultRegion;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TPtrC CRadioEngineSettings::NetworkId() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return TPtrC( iNetworkId );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TPtrC CRadioEngineSettings::CountryCode() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return TPtrC( iCountryCode );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSettingsSetter.
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::SetRegionId( TInt aRegion )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    __ASSERT_ALWAYS( RegionIndexForId( aRegion ) != KErrNotFound,
-                     User::Panic( _L( "CRadioEngineSettings" ), KErrArgument ) );
-
-    TInt err = iRepository->Set( KRadioCRCurrentRegion, aRegion );
-    if ( !err )
-        {
-        iRegionId = static_cast<TRadioRegion>( aRegion );
-        UpdateCurrentRegionIdx( aRegion );
-        err = SetTunedFrequency( Region( iCurrentRegionIdx ).MinFrequency() );
-        }
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSettingsSetter.
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::SetNetworkId( const TDesC& aNetworkId )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iNetworkId.Copy( aNetworkId.Left( iNetworkId.MaxLength() ) );
-    return iRepository->Set( KRadioCRNetworkId, iNetworkId );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSettingsSetter.
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::SetCountryCode( const TDesC& aCountryCode )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iCountryCode.Copy( aCountryCode.Left( iCountryCode.MaxLength() ) );
-    return iRepository->Set( KRadioCRCountryCode, iCountryCode );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TUint32 CRadioEngineSettings::FrequencyStepSize() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return Region( iCurrentRegionIdx ).StepSize();
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TUint32 CRadioEngineSettings::MaxFrequency() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return Region( iCurrentRegionIdx ).MaxFrequency();
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TUint32 CRadioEngineSettings::MinFrequency() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return Region( iCurrentRegionIdx ).MinFrequency();
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioEngineSettings.
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::DecimalCount() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return Region( iCurrentRegionIdx ).DecimalCount();
-    }
-
-// ---------------------------------------------------------------------------
-// Initializes the data holders
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineSettings::InitializeDataHolders()
-    {
-    TInt temp = 0;
-    GetRepositoryValue( KRadioCRHeadsetMuteState, temp, EFalse );
-    iFlags.Assign( EHeadsetVolMuted, temp );
-
-    temp = RadioEngine::ERadioHeadsetDefaultVolume;
-    GetRepositoryValue( KRadioCRHeadsetVolume, temp, temp );
-    iHeadsetVolume = temp;
-
-    temp = 0;
-    GetRepositoryValue( KRadioCRSpeakerMuteState, temp, EFalse );
-    iFlags.Assign( ESpeakerVolMuted, temp );
-
-    temp = RadioEngine::ERadioSpeakerDefaultVolume;
-    GetRepositoryValue( KRadioCRSpeakerVolume, temp, temp );
-    iSpeakerVolume = temp;
-
-    temp = 0;
-    GetRepositoryValue( KRadioCRRadioPowerState, temp, EFalse );
-    iFlags.Assign( EPowerOn, temp );
-
-    temp = RadioEngine::ERadioStereo;
-    if ( GetRepositoryValue( KRadioCROutputMode, temp, temp ) )
-        {
-        iFlags.Assign( EStereoOutput, temp == RadioEngine::ERadioStereo );
-        }
-
-    temp = RadioEngine::ERadioHeadset;
-    if ( GetRepositoryValue( KRadioCRAudioRoute, temp, temp ) )
-        {
-        iFlags.Assign( EHeadsetAudioRoute, temp == RadioEngine::ERadioHeadset );
-        }
-
-    temp = RadioEngine::ERadioDefaultMinVolume;
-    GetRepositoryValue( KRadioCRDefaultMinVolumeLevel, temp, temp );
-    iDefaultMinVolume = temp;
-
-    temp = ERadioRegionDefault;
-    GetRepositoryValue( KRadioCRDefaultRegion, temp, temp );
-    iDefaultRegion = static_cast<TRadioRegion>( temp );
-
-    temp = iDefaultRegion;
-    GetRepositoryValue( KRadioCRCurrentRegion, temp, temp );
-    iRegionId = static_cast<TRadioRegion>( temp );
-    UpdateCurrentRegionIdx( iRegionId );
-
-    temp = MinFrequency();
-    GetRepositoryValue( KRadioCRTunedFrequency, temp, temp );
-    iFrequency = static_cast<TUint32>( temp );
-    }
-
-// ---------------------------------------------------------------------------
-// Gets a repository value and sets the default value if the key is not found
-// ---------------------------------------------------------------------------
-//
-TBool CRadioEngineSettings::GetRepositoryValue( int aKey, TInt& aValue, TInt aDefault )
-    {
-    TInt temp = 0;
-    TInt err = iRepository->Get( aKey, temp );
-    if ( !err )
-        {
-        aValue = temp;
-        return ETrue;
-        }
-    else if ( err == KErrNotFound )
-        {
-        if ( iRepository->Set( aKey, aDefault ) == KErrNone )
-            {
-            aValue = aDefault;
-            return ETrue;
-            }
-        }
-    return EFalse;
-    }
-
-// ---------------------------------------------------------------------------
-// Sets a boolean value to cenrep and data holder
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::SetFlagValue( int aKey, int aFlagId, TInt aValue )
-    {
-    TInt err = iRepository->Set( aKey, aValue );
-    if ( !err )
-        {
-        iFlags.Assign( aFlagId, aValue );
-        }
-    return err;
-    }
-
-// ---------------------------------------------------------------------------
-// Initializes the regions based on resources.
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineSettings::InitializeRegionsL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iRegions.ResetAndDestroy();
-
-    TResourceReader reader;
-
-    TFileName resourceFileName;
-    resourceFileName.Append( KRadioSettingsResourceFile );
-
-    //User::LeaveIfError( iRadioSettingsImp.FsSession().Connect() );
-
-    //TODO: Remove the ResolveDriveL
-    iRadioSettingsImp.ResolveDriveL( resourceFileName, KDC_RESOURCE_FILES_DIR );
-    BaflUtils::NearestLanguageFile( iRadioSettingsImp.FsSession(), resourceFileName);
-
-    iResFile.OpenL( iRadioSettingsImp.FsSession(), resourceFileName);
-
-    iResFile.ConfirmSignatureL();
-    HBufC8* readBuffer = iResFile.AllocReadLC(R_QRAD_REGIONS);
-    reader.SetBuffer(readBuffer);
-    TInt regionCount = reader.ReadInt16();
-
-    for ( TInt i = 0; i < regionCount; ++i )
-        {
-        TInt resId = reader.ReadInt32(); // The next resource ID to read.
-        HBufC8* regionBuffer = iResFile.AllocReadLC(resId);
-        TResourceReader regionReader;
-        regionReader.SetBuffer(regionBuffer);
-
-        CRadioRegion* region = CRadioRegion::NewL( regionReader );
-        CleanupStack::PushL( region );
-
-        if ( IsRegionAllowed( region->Id() ))
-            {
-            User::LeaveIfError( iRegions.Append( region ) );
-            CleanupStack::Pop( region );
-            }
-        else{
-            CleanupStack::PopAndDestroy( region );
-            }
-        CleanupStack::PopAndDestroy(regionBuffer);
-        }
-
-    if ( CountRegions() <= 0 || !IsRegionAllowed( DefaultRegion() ) )
-        {
-        User::Leave( KErrCorrupt );
-        }
-
-    UpdateCurrentRegionIdx( RegionId() );
-    CleanupStack::PopAndDestroy(readBuffer);
-    }
-
-// ---------------------------------------------------------------------------
-// Converts Region ID to index
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineSettings::RegionIndexForId( TInt aRegionId ) const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TInt idx = KErrNotFound;
-    for ( TInt i = 0 ; i < CountRegions(); ++i )
-        {
-        if ( Region( i ).Id() == static_cast<TRadioRegion>( aRegionId ) )
-            {
-            idx = i;
-            break;
-            }
-        }
-    return idx;
-    }
-
-// ---------------------------------------------------------------------------
-// Updates the current region
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineSettings::UpdateCurrentRegionIdx( TInt aRegionId )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iCurrentRegionIdx = RegionIndexForId( aRegionId );
-    }
-
-// ---------------------------------------------------------------------------
-// Determines if region is allowed .
-// ---------------------------------------------------------------------------
-//
-TBool CRadioEngineSettings::IsRegionAllowed( TRadioRegion aRegionId ) const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-
-    TInt regionAllowed( ETrue );
-    if ( ERadioRegionJapan == aRegionId )
-        {
-        TInt err = iRepository->Get( KRadioCRRegionAllowedJapan, regionAllowed );
-        if ( err != KErrNone )
-            {
-            // In case the key is not found or otherwise unsuccessfully read,
-            // Japan region is allowed by default.
-            regionAllowed = ETrue;
-            }
-        }
-
-    return TBool( regionAllowed );
-    }
--- a/radioengine/settings/src/cradioregion.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,147 +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:
-*
-*/
-
-// System includes
-#include <barsread.h>
-
-// User includes
-#include "cradioregion.h"
-#include "cradioenginelogger.h"
-
-// Used to convert kilohertz values to hertz values
-const TInt KRadioThousand = 1000;
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioRegion::CRadioRegion()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRegion::ConstructL( TResourceReader& aRr )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iId = static_cast<TRadioRegion>( aRr.ReadUint16());
-    iStepSize =  aRr.ReadUint32() * KRadioThousand;
-    iMinFreq = aRr.ReadUint32() * KRadioThousand;
-    iMaxFreq = aRr.ReadUint32() * KRadioThousand;
-    iDecimalCount = aRr.ReadInt16();
-
-    TInt countryCodeCount = aRr.ReadInt16();
-    for ( TInt i = 0; i < countryCodeCount; ++i )
-        {
-        TPtrC code;
-        code.Set( aRr.ReadTPtrC());
-        User::LeaveIfError( iCountryCodes.Append( code.AllocL()));
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioRegion* CRadioRegion::NewL( TResourceReader& aRr )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    CRadioRegion* self = new ( ELeave ) CRadioRegion;
-
-    CleanupStack::PushL( self );
-    self->ConstructL( aRr );
-    CleanupStack::Pop();
-
-    return self;
-    }
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioRegion::~CRadioRegion()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iCountryCodes.ResetAndDestroy();
-    iCountryCodes.Close();
-    }
-
-// ---------------------------------------------------------
-// Get the id of region
-// ---------------------------------------------------------
-//
-EXPORT_C TRadioRegion CRadioRegion::Id() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iId;
-    }
-
-// ---------------------------------------------------------
-// Get the step interval of region
-// ---------------------------------------------------------
-//
-EXPORT_C TUint32 CRadioRegion::StepSize() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iStepSize;
-    }
-
-// ---------------------------------------------------------
-//
-// ---------------------------------------------------------
-//
-EXPORT_C TUint32 CRadioRegion::MinFrequency() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iMinFreq;
-    }
-
-// ---------------------------------------------------------
-//
-// ---------------------------------------------------------
-//
-EXPORT_C TUint32 CRadioRegion::MaxFrequency() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iMaxFreq;
-    }
-
-// ---------------------------------------------------------
-//
-// ---------------------------------------------------------
-//
-EXPORT_C TInt CRadioRegion::DecimalCount() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iDecimalCount;
-    }
-
-// ---------------------------------------------------------
-// Get the country code of region
-// ---------------------------------------------------------
-//
-EXPORT_C const RRadioCountryCodeArray& CRadioRegion::CountryCodes()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iCountryCodes;
-    }
--- a/radioengine/settings/src/cradiosettings.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,42 +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:
-*
-*/
-
-// User includes
-#include "cradiosettings.h"
-#include "cradiosettingsimp.h"
-#include "cradioenginelogger.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CRadioSettings* CRadioSettings::NewL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return CRadioSettingsImp::NewL();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CRadioSettings::~CRadioSettings()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
--- a/radioengine/settings/src/cradiosettingsimp.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,234 +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:
-*
-*/
-
-// System includes
-#include <bautils.h>
-#include <coemain.h>
-#include <ConeResLoader.h>
-#include <f32file.h>
-#include <data_caging_path_literals.hrh>
-
-// User includes
-#include "cradiosettingsimp.h"
-#include "cradioapplicationsettings.h"
-#include "cradioenginesettings.h"
-//#include "radioengineutils.h"
-#include "cradioenginelogger.h"
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioSettingsImp* CRadioSettingsImp::NewL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    CRadioSettingsImp* self = new (ELeave) CRadioSettingsImp;
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioSettingsImp::ConstructL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iFsSession = new ( ELeave ) RFs;
-    User::LeaveIfError( iFsSession->Connect() );
-
-    // Constructs the implementors of the interfaces.
-    iApplicationSettings = CRadioApplicationSettings::NewL();
-    iEngineSettings = CRadioEngineSettings::NewL( *this );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioSettingsImp::CRadioSettingsImp()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioSettingsImp::~CRadioSettingsImp()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    delete iEngineSettings;
-    delete iApplicationSettings;
-    if ( iFsSession )
-        {
-        iFsSession->Close();
-        }
-    delete iFsSession;
-    }
-
-// ---------------------------------------------------------------------------
-// Determines if region is allowed.
-// ---------------------------------------------------------------------------
-//
-TBool CRadioSettingsImp::IsRegionAllowed( TRadioRegion aRegionId ) const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iEngineSettings->IsRegionAllowed( aRegionId );
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the application settings interface.
-// ---------------------------------------------------------------------------
-//
-MRadioApplicationSettings& CRadioSettingsImp::ApplicationSettings() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return *iApplicationSettings;
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the radio settings interface.
-// ---------------------------------------------------------------------------
-//
-MRadioEngineSettings& CRadioSettingsImp::EngineSettings() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return *iEngineSettings;
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the radio settings setter interface.
-// ---------------------------------------------------------------------------
-//
-MRadioSettingsSetter& CRadioSettingsImp::RadioSetter() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return *iEngineSettings;
-    }
-
-// ---------------------------------------------------------------------------
-// Static version of ResolveDriveL.
-// ---------------------------------------------------------------------------
-//
-void CRadioSettingsImp::ResolveDriveL( TFileName& aFileName, const TDesC& aPath )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aFileName = %S, aPath = %S", &aFileName, &aPath ) );
-
-    TFileName fileName;
-    TFileName baseResource;
-    TFindFile finder( *iFsSession );
-    TLanguage language( ELangNone );
-
-    _LIT( resourceFileExt, ".rsc" );
-    _LIT( resourceFileWildExt, ".r*" );
-
-    TParsePtrC parse( aFileName );
-    TBool isResourceFile = ( parse.Ext() == resourceFileExt() );
-
-    TInt err = KErrUnknown;
-    if  ( isResourceFile )
-        {
-        CDir* entries = NULL;
-        fileName.Copy( parse.Name() );
-        fileName.Append( resourceFileWildExt() );
-        err = finder.FindWildByDir( fileName, aPath, entries );
-        delete entries;
-        }
-    else
-        {
-        // TFindFile applies search order that is from
-        // drive Y to A, then Z
-        err = finder.FindByDir( aFileName, aPath );
-        }
-
-    LEVEL3( LOG_FORMAT( "err = %d", err ) );
-    TBool found = EFalse;
-    if ( !isResourceFile && ( KErrNone == err ) )
-        {
-        found = ETrue;
-        aFileName.Zero();
-        aFileName.Append( finder.File() );
-        }
-
-    while ( !found && ( KErrNone == err ) && isResourceFile )
-        {
-        // Found file
-        fileName.Zero();
-        TParsePtrC foundPath( finder.File() );
-        fileName.Copy( foundPath.DriveAndPath() );
-        fileName.Append( aFileName );
-        BaflUtils::NearestLanguageFile( *iFsSession, fileName, language );
-        if ( language != ELangNone && BaflUtils::FileExists( *iFsSession, fileName ) )
-            {
-            found = ETrue;
-            aFileName.Zero();
-            aFileName.Copy( fileName );
-            }
-        else
-            {
-            if ( language == ELangNone &&
-                 !baseResource.Compare( KNullDesC ) &&
-                 BaflUtils::FileExists( *iFsSession, fileName ) )
-                {
-                baseResource.Copy( fileName );
-                }
-            CDir* entries = NULL;
-            err = finder.FindWild( entries );
-            delete entries;
-            }
-        }
-
-    if ( !found && baseResource.Compare( KNullDesC ) )
-        {
-        // If we found *.rsc then better to use that than nothing
-        if ( BaflUtils::FileExists( *iFsSession, baseResource ) )
-            {
-            found = ETrue;
-            aFileName.Zero();
-            aFileName.Append( baseResource );
-            }
-        }
-
-    if ( !found )
-        {
-        LEVEL3( LOG_FORMAT( "File %S not found ( err = %d )!", &aFileName, err ) );
-        if ( !err )
-            {
-            err = KErrNotFound;
-            }
-        User::Leave( err );
-        }
-
-    LEVEL3( LOG_FORMAT( "aFileName = %S", &aFileName ) );
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the file server session
-// ---------------------------------------------------------------------------
-//
-RFs& CRadioSettingsImp::FsSession()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return *iFsSession;
-    }
--- a/radioengine/settings/stub/bwins/fmradioenginesettings_stubu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-EXPORTS
-	?Id@CRadioRegion@@QBE?AW4TRadioRegion@@XZ @ 1 NONAME ; enum TRadioRegion CRadioRegion::Id(void) const
-	?NewL@CRadioSettings@@SAPAV1@XZ @ 2 NONAME ; class CRadioSettings * CRadioSettings::NewL(void)
-	?StepSize@CRadioRegion@@QBEKXZ @ 3 NONAME ; unsigned long CRadioRegion::StepSize(void) const
-	?MaxFrequency@CRadioRegion@@QBEKXZ @ 4 NONAME ; unsigned long CRadioRegion::MaxFrequency(void) const
-	?DecimalCount@CRadioRegion@@QBEHXZ @ 5 NONAME ; int CRadioRegion::DecimalCount(void) const
-	??1CRadioSettings@@UAE@XZ @ 6 NONAME ; CRadioSettings::~CRadioSettings(void)
-	?MinFrequency@CRadioRegion@@QBEKXZ @ 7 NONAME ; unsigned long CRadioRegion::MinFrequency(void) const
-	?CountryCodes@CRadioRegion@@QAEABV?$RPointerArray@VHBufC16@@@@XZ @ 8 NONAME ; class RPointerArray<class HBufC16> const & CRadioRegion::CountryCodes(void)
-
--- a/radioengine/settings/stub/eabi/fmradioenginesettings_stubu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-EXPORTS
-	_ZN12CRadioRegion12CountryCodesEv @ 1 NONAME
-	_ZN14CRadioSettings4NewLEv @ 2 NONAME
-	_ZN14CRadioSettingsD0Ev @ 3 NONAME
-	_ZN14CRadioSettingsD1Ev @ 4 NONAME
-	_ZN14CRadioSettingsD2Ev @ 5 NONAME
-	_ZNK12CRadioRegion12DecimalCountEv @ 6 NONAME
-	_ZNK12CRadioRegion12MaxFrequencyEv @ 7 NONAME
-	_ZNK12CRadioRegion12MinFrequencyEv @ 8 NONAME
-	_ZNK12CRadioRegion2IdEv @ 9 NONAME
-	_ZNK12CRadioRegion8StepSizeEv @ 10 NONAME
-
--- a/radioengine/settings/stub/group/bld.inf	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#include "../../../group/buildflags.hrh"
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-WINSCW ARMV5
-
-PRJ_EXPORTS
-
-../../group/backup_registration.xml /epoc32/data/z/private/101ff976/backup_registration.xml
-
-../../cenrep/2002FF52.txt  /epoc32/data/z/private/10202be9/2002FF52.txt
-../../cenrep/2002FF52.txt  /epoc32/RELEASE/winscw/UDEB/Z/private/10202be9/2002FF52.txt
-../../cenrep/2002FF52.txt  /epoc32/RELEASE/winscw/UREL/Z/private/10202be9/2002FF52.txt
-
-PRJ_MMPFILES
-radioenginesettings_stub.mmp
--- a/radioengine/settings/stub/group/radioenginesettings_stub.mmp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,71 +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 "../../../group/buildflags.hrh"
-
-#include <platform_paths.hrh>
-
-#include <data_caging_paths.hrh>
-
-TARGET                  fmradioenginesettings_stub.dll
-TARGETTYPE              DLL
-UID                     0x1000008D 0x01000012
-VERSION                 10.0
-
-CAPABILITY              CAP_GENERAL_DLL
-VENDORID                VID_DEFAULT
-PAGED
-SMPSAFE
-LANG SC
-
-SOURCEPATH              ../../data
-START RESOURCE          fmradioenginesettings.rss
-HEADER
-TARGETPATH              RESOURCE_FILES_DIR
-END // RESOURCE
-
-USERINCLUDE             ../../api
-USERINCLUDE             ../../inc
-USERINCLUDE             ../../../utils/api
-USERINCLUDE             ../../../utils/inc
-USERINCLUDE             /sf/mw/mmmw/mmserv/radioutility/radio_utility/stub/src
-USERINCLUDE             /sf/mw/mmmw/mmserv/radioutility/radio_utility/src
-USERINCLUDE             /sf/mw/mmmw/mmserv/radioutility/inc
-USERINCLUDE             /sf/mw/mmmw/mmserv/inc
-USERINCLUDE             /sf/mw/mmmw/inc
-
-APP_LAYER_SYSTEMINCLUDE
-
-SOURCEPATH              ../../src
-SOURCE                  cradioregion.cpp
-SOURCE                  cradiosettings.cpp
-SOURCE                  cradiosettingsimp.cpp
-SOURCE                  cradioenginesettings.cpp
-SOURCE                  cradioapplicationsettings.cpp
-
-LIBRARY                 fmradioengineutils_stub.lib
-LIBRARY                 bafl.lib
-LIBRARY                 commonengine.lib
-LIBRARY                 cone.lib
-LIBRARY                 efsrv.lib
-LIBRARY                 estor.lib
-LIBRARY                 euser.lib
-LIBRARY                 flogger.lib 
-LIBRARY                 RadioSession_Stub.lib // SRadioStubManager functions
-LIBRARY                 centralrepository.lib
-MACRO STUB_CONSTELLATION
--- a/radioengine/settings/tsrc/bwins/SettingsTestModuleu.def	Tue Aug 31 15:15:02 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 * LibEntryL(class CTestModuleIf &)
-
Binary file radioengine/settings/tsrc/cenrep/2002FF52.txt has changed
Binary file radioengine/settings/tsrc/cenrep/2002FF52_orig.txt has changed
Binary file radioengine/settings/tsrc/cenrep/radio.confml has changed
Binary file radioengine/settings/tsrc/cenrep/radio_2002FF52.crml has changed
Binary file radioengine/settings/tsrc/conf/2002FF52.txt has changed
--- a/radioengine/settings/tsrc/conf/SettingsTestModule.cfg	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,340 +0,0 @@
-[Define]
-ChannelFrequencyNull 0
-ChannelFrequency0 104000000
-ChannelFrequency1 97500000
-ChannelFrequency2 91300000
-ChannelFrequency3 11300000
-CBelowMinimumFrequency 34500000
-AboveMaximumFrequency 23400000
-
-Operator_A_MusicStoreName "Operator_A_MusicStore"
-Operator_A_MusicStoreUrl   "Operator.A.MusicStore.fi"
-NetworkId_0                 "Network_Id_1"
-CountryCode_0               "12345"
-
-ERadioHeadset               0
-ERadioSpeaker               1
-ERadioStereo                0
-ERadioMono                  1
-
-KErrNotFound				-1
-KErrGeneral                 -2
-KErrArgument				-6
-KErrDiskFull				-26
-KErrBadTestParameter		-1000
-KErrEventPending			-2000
-KErrCallbackErrorCode		-2001
-KErrUnexpectedValue			-2002
-KExpectedFrequencyChange	-2003
-KErrTimeoutController		-2007
-[Enddefine]
-
-[Test]
-title Example
-create SettingsTestModule Settings
-Settings Example pa ra me ters
-delete Settings
-[Endtest] 
-
-// Settings API functions' tests
-
-[Test]
-title 1.1 Create Settings
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.2 OOM for creation of Settings
-create SettingsTestModule Settings
-oomignorefailure ON
-loop 106
-oomheapfailnext LOOP_COUNTER
-Settings CreateSettingsL Preset
-print LOOP_COUNTER
-endloop
-oomignorefailure OFF
-oomheaptonormal
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.2a Read configurable keys
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings ReadConfigurableKeysL
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.3 First time Start performed or not
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings tstResetStartCount
-Settings IsFirstTimeStart 1
-Settings SetFirstTimeStartPerformed 1
-Settings IsFirstTimeStart 0
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.4 Set UI Flags
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings SetUiFlags 123456789
-Settings UiFlags 123456789
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.5 Set Headset Volume
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings SetHeadsetVolume 5
-Settings HeadsetVolume 5
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.6 Set Speaker Volume
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings SetSpeakerVolume 6
-Settings SpeakerVolume 6
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.7 Set Volume
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings SetVolume 7
-Settings Volume 7
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.8 Output Mode
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings SetOutputMode ERadioStereo
-Settings OutputMode ERadioStereo
-Settings SetOutputMode ERadioMono
-Settings OutputMode ERadioMono
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.9 Audio Route
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings SetAudioRoute ERadioHeadset
-Settings AudioRoute ERadioHeadset
-Settings SetAudioRoute ERadioHeadset
-Settings AudioRoute ERadioHeadset
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.10 Headset Mute Status
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings SetHeadsetVolMuted 0
-Settings IsHeadsetVolMuted 0
-Settings SetHeadsetVolMuted 1
-Settings IsHeadsetVolMuted 1
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.11 Speaker Mute Status
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings SetSpeakerVolMuted 0
-Settings IsSpeakerVolMuted 0
-Settings SetSpeakerVolMuted 1
-Settings IsSpeakerVolMuted 1
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.12 Mute Status
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings SetVolMuted 0
-Settings IsVolMuted 0
-Settings SetVolMuted 1
-Settings IsVolMuted 1
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.13 Power On Status
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings SetPowerOn 0
-Settings IsPowerOn 0
-Settings SetPowerOn 1
-Settings IsPowerOn 1
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.14 Tuned Frequency
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings SetTunedFrequency ChannelFrequency1
-Settings TunedFrequency ChannelFrequency1
-Settings SetTunedFrequency ChannelFrequency3
-Settings TunedFrequency ChannelFrequency3
-Settings SetTunedFrequency BelowMinimumFrequency
-Settings SetTunedFrequency AboveMaximumFrequency
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.15 Default Minimum Volume Level
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings DefaultMinVolumeLevel
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.16 Regions' Count
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings CountRegions
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.17 Region
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings Region
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.18 Region's Identification
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings SetRegionId 2
-Settings RegionId 2
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.19 Frequency Step Size
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings FrequencyStepSize
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.20  Minimum Frequency
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings MinFrequency
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.21 Maximum Frequency
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings MaxFrequency
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.22 Decimal Count
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings DecimalCount
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.23 Default Region
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings DefaultRegion
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.24 Network Id
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings SetNetworkId NetworkId_0
-Settings NetworkId NetworkId_0
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.25 Country Code
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings SetCountryCode CountryCode_0
-Settings CountryCode CountryCode_0
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.26 Is Region Allowed
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings IsRegionAllowed
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.27 Resolve Drive 
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings ResolveDriveL
-Settings DestroySettingsL
-delete Settings
-[Endtest]
-
-[Test]
-title 1.28 Change of Region  
-create SettingsTestModule Settings
-Settings CreateSettingsL Preset
-Settings SetRegionId 0
-pause 10000
-Settings RegionId 0
-Settings DestroySettingsL
-delete Settings
-[Endtest]
--- a/radioengine/settings/tsrc/conf/atsconf.txt	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-;Run \vado\videoplayer\tsrc\testing\tools\genATSdrop.pl from 
-;the tsrc folder to create ATS3 drop.
-[DROP]
-NAME Radio - engine - settings
-DEVICE Vasco
-LONGREBOOT
-FLASH W:\output\release_flash_images\vasco\rnd\core\RM-596_2010.22_79.01.2010.22_rnd.core.fpsx
-FLASH W:\output\release_flash_images\vasco\rnd\langpack\langpack_01\RM-596_2010.22_01.01_Euro_1_79.01.2010.22_rnd.rofs2.fpsx
-FLASH W:\output\release_flash_images\vasco\rnd\customer\custvariant_01_tools\RM-596_2010.22_01.01_tools_79.01.2010.22_rnd.rofs3.fpsx
-FLASH W:\output\release_flash_images\vasco\rnd\uda\RM-596_2010.22_79.01.2010.22_rnd.udaerase.fpsx
-PKG group\SettingsTestModule.pkg
-BOOT
-INI init\TestFramework.ini 600
-EMAIL jouni.vallo@nokia.com
-RUN
-[ENDDROP]
-
-;
-; ats3tools synergyyn vai verkkolevylle ja manuaalisesti kopioida sieltä?
-; 
-; TODO
-; oikeuksien haku Tampereen ATS3
-; imagen luonti, imaker vasco_ui default
-; Testframework.ini täytyy olla init hakemistossa
-; cenrep täytyy HW:sta, .cre tiedosto ja lisätä custom/prerun_custom.xml tiedostoon 
-; 
-; STEPIT:
-; säädä conf/atsconf.txt asetukset kohdalleen
-; komentorivillä tsrc hakemistoon ja aja:
-; perl \ats3tools\genATSdrop.pl -f conf\atsconf.txt -u käyttäjä -p salasana
-; 
-;
-;
-;
Binary file radioengine/settings/tsrc/conf/radio.confml has changed
Binary file radioengine/settings/tsrc/conf/radio_2002FF52.crml has changed
--- a/radioengine/settings/tsrc/custom/postrun_custom.xml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-<step name="Fetch Test module Report" harness="STIF" enabled="true" passrate="100" significant="false">
-       <command>fetch-log</command>
-       <params>
-	    <param type="text"/>
-	    <param delete="true"/>
-	    <param path="C:\Logs\TestFramework\*"/>
-       </params>
-</step>
-<step name="Fetch TestScripter logs" harness="STIF" enabled="true" passrate="100" significant="false">
-       <command>fetch-log</command>
-       <params>
-	    <param type="text"/>
-	    <param delete="true"/>
-	    <param path="C:\Logs\TestFramework\TestScripter\*"/>
-       </params>
-</step>
-<step name="Fetch Testengine logs" harness="STIF" enabled="true" passrate="100" significant="false">
-       <command>fetch-log</command>
-       <params>
-	    <param type="text"/>
-	    <param delete="true"/>
-	    <param path="C:\Logs\TestFramework\Testengine\*"/>
-       </params>
-</step>
-<step name="Fetch Testserver logs" harness="STIF" enabled="true" passrate="100" significant="false">
-       <command>fetch-log</command>
-       <params>
-	    <param type="text"/>
-	    <param delete="true"/>
-	    <param path="C:\Logs\TestFramework\Testserver\*"/>
-       </params>
-</step>
--- a/radioengine/settings/tsrc/custom/prerun_custom.xml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<step name="Create log directory for testmodule" harness="STIF" enabled="true" passrate="100" significant="false">
-    	<command>makedir</command>
-    	<params>
-        <param dir="c:\logs\testframework"/>
-    	</params>
-</step>
-<step name="Create directory for TestScripter logs" harness="STIF" enabled="true" passrate="100" significant="false">
-    	<command>makedir</command>
-    	<params>
-        <param dir="c:\logs\testframework\TestScripter"/>
-    	</params>
-</step>
-<step name="Create directory for Testengine logs" harness="STIF" enabled="true" passrate="100" significant="false">
-    	<command>makedir</command>
-    	<params>
-        <param dir="c:\logs\testframework\Testengine"/>
-    	</params>
-</step>
-<step name="Create directory for Testserver logs" harness="STIF" enabled="true" passrate="100" significant="false">
-    	<command>makedir</command>
-    	<params>
-        <param dir="c:\logs\testframework\Testserver"/>
-    	</params>
-</step>
-<!---
-<step name="Install IAP file" harness="STIF" enabled="true" passrate="100" significant="false">
-       <command>install</command>
-       <reboot target-alias="*" when="after" />
-       <params>
-       <param src="cccccc00.cre"/>
-       <param dst="c:\private\10202be9\persists\cccccc00.cre"/>
-       </params>
-</step>
--->
--- a/radioengine/settings/tsrc/eabi/SettingsTestModuleu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-EXPORTS
-	_Z9LibEntryLR13CTestModuleIf @ 1 NONAME
-
--- a/radioengine/settings/tsrc/group/RestoreOrigCenrep.cmd	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,25 +0,0 @@
-@REM
-@REM Copyright (c) 2002-2004 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:  Wins Command file for Settings Test Module
-@REM
-@REM
-@echo Original environment restoration by settingstestmodule...
-del \epoc32\winscw\c\TestFramework\SettingsTestModule.cfg
-del \epoc32\wins\c\TestFramework\TestFramework.ini
-del \epoc32\winscw\c\TestFramework\TestFramework.ini
-copy ..\cenrep\2002FF52.txt  \epoc32\data\z\private\10202be9\2002FF52.txt
-copy ..\cenrep\2002FF52.txt  \epoc32\RELEASE\winscw\UDEB\Z\private\10202be9\2002FF52.txt
-copy ..\cenrep\2002FF52.txt  \epoc32\RELEASE\winscw\UREL\Z\private\10202be9\2002FF52.txt
-del \epoc32\winscw\c\private\10202BE9\persists\2002FF52.cre
-@echo Original environment restoration by settingstestmodule... Finished.
\ No newline at end of file
--- a/radioengine/settings/tsrc/group/SettingsTestModule.mmp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*TYPE TESTCLASS*/
-/*
-* 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: MMP file for STIF Test Framework's TestScripter 
-* testclass test module.
-*
-*/
-
-#include <platform_paths.hrh>
-
-TARGET          SettingsTestModule.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         SettingsTestModule.def
-
-USERINCLUDE     ../inc
-USERINCLUDE     ../../inc
-USERINCLUDE     ../../api
-USERINCLUDE     ../../../utils/api
-USERINCLUDE     ../../../utils/inc
-
-APP_LAYER_SYSTEMINCLUDE
-
-SOURCEPATH      ../src
-
-SOURCE          SettingsTestModule.cpp
-SOURCE          SettingsTestModuleBlocks.cpp
-
-//RESOURCE        resource_file
-//RESOURCE        resource_file2
-
-LIBRARY         euser.lib
-LIBRARY         stiftestinterface.lib
-LIBRARY         stiftestengine.lib
-LIBRARY			fmradioenginesettings.lib
-LIBRARY			fmradioengineutils.lib
-LIBRARY         centralrepository.lib
-
-LANG            SC
-SMPSAFE
-
-/*
-START WINS      
-?wins_specific_information
-END
-
-START MARM
-?marm_specific_information
-END
-*/
-// Other possible keywords:
- 
-// DOCUMENT     ?file, that is not compiled, but added to MSVC project workspace (i.e. release notes)
-/*
-START BITMAP ?target
-TARGETPATH   ?emulated_path_on_target_machine
-HEADER
-SOURCE       ?color_depth ?source_bitmap
-END
-*/
-// DEFFILE ?filename
-// AIF ?filename
-
-// End of File
--- a/radioengine/settings/tsrc/group/SettingsTestModule.pkg	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,62 +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:
-;
-; 	Installation file for STIF
-;
-
-; Languages
-&EN
-
-; Provide value for uid
-#{"STIF"},(0x00000000),1,1,0,TYPE=SA
-
-; Series60 product id for S60 3.0
-[0x101F7961], 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\SettingsTestModule.dll"   -   "!:\Sys\Bin\SettingsTestModule.dll"
-"conf\SettingsTestModule.cfg"   -   "c:\testframework\SettingsTestModule.cfg"
-
-  
-; Embedded SIS 
-; None
-
-; End of Package body
-
-; PKG dependencies
-; None
-
-; PKG capabilities
-; None
--- a/radioengine/settings/tsrc/group/SettingsTestModule_DoxyFile.txt	Tue Aug 31 15:15:02 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:
-#
-#
-
-# Doxyfile 1.4.1
-
-#---------------------------------------------------------------------------
-# Project related configuration options
-#---------------------------------------------------------------------------
-PROJECT_NAME           = SettingsTestModule
-PROJECT_NUMBER         = 
-OUTPUT_DIRECTORY       = C:\Symbian\Carbide\workspace\SettingsTestModule\
-CREATE_SUBDIRS         = NO
-OUTPUT_LANGUAGE        = English
-USE_WINDOWS_ENCODING   = YES
-BRIEF_MEMBER_DESC      = YES
-REPEAT_BRIEF           = YES
-ABBREVIATE_BRIEF       = 
-ALWAYS_DETAILED_SEC    = NO
-INLINE_INHERITED_MEMB  = NO
-FULL_PATH_NAMES        = NO
-STRIP_FROM_PATH        = 
-STRIP_FROM_INC_PATH    = 
-SHORT_NAMES            = NO
-JAVADOC_AUTOBRIEF      = NO
-MULTILINE_CPP_IS_BRIEF = NO
-DETAILS_AT_TOP         = NO
-INHERIT_DOCS           = YES
-DISTRIBUTE_GROUP_DOC   = NO
-TAB_SIZE               = 8
-ALIASES                = 
-OPTIMIZE_OUTPUT_FOR_C  = YES
-OPTIMIZE_OUTPUT_JAVA   = NO
-SUBGROUPING            = YES
-#---------------------------------------------------------------------------
-# Build related configuration options
-#---------------------------------------------------------------------------
-EXTRACT_ALL            = YES
-EXTRACT_PRIVATE        = NO
-EXTRACT_STATIC         = NO
-EXTRACT_LOCAL_CLASSES  = NO
-EXTRACT_LOCAL_METHODS  = NO
-HIDE_UNDOC_MEMBERS     = NO
-HIDE_UNDOC_CLASSES     = NO
-HIDE_FRIEND_COMPOUNDS  = NO
-HIDE_IN_BODY_DOCS      = NO
-INTERNAL_DOCS          = YES
-CASE_SENSE_NAMES       = YES
-HIDE_SCOPE_NAMES       = NO
-SHOW_INCLUDE_FILES     = YES
-INLINE_INFO            = YES
-SORT_MEMBER_DOCS       = YES
-SORT_BRIEF_DOCS        = NO
-SORT_BY_SCOPE_NAME     = NO
-GENERATE_TODOLIST      = NO
-GENERATE_TESTLIST      = NO
-GENERATE_BUGLIST       = NO
-GENERATE_DEPRECATEDLIST= YES
-ENABLED_SECTIONS       = 
-MAX_INITIALIZER_LINES  = 30
-SHOW_USED_FILES        = YES
-SHOW_DIRECTORIES       = YES
-FILE_VERSION_FILTER    = 
-#---------------------------------------------------------------------------
-# configuration options related to warning and progress messages
-#---------------------------------------------------------------------------
-QUIET                  = NO
-WARNINGS               = YES
-WARN_IF_UNDOCUMENTED   = YES
-WARN_IF_DOC_ERROR      = YES
-WARN_NO_PARAMDOC       = NO
-WARN_FORMAT            = "$file:$line: $text"
-WARN_LOGFILE           = 
-#---------------------------------------------------------------------------
-# configuration options related to the input files
-#---------------------------------------------------------------------------
-INPUT                  = C:\Symbian\Carbide\workspace\SettingsTestModule\
-FILE_PATTERNS          = *.h \
-                         *.rh \
-                         *.hrh
-RECURSIVE              = YES
-EXCLUDE                = 
-EXCLUDE_SYMLINKS       = NO
-EXCLUDE_PATTERNS       = 
-EXAMPLE_PATH           = 
-EXAMPLE_PATTERNS       = 
-EXAMPLE_RECURSIVE      = NO
-IMAGE_PATH             = 
-INPUT_FILTER           = 
-FILTER_PATTERNS        = 
-FILTER_SOURCE_FILES    = NO
-#---------------------------------------------------------------------------
-# configuration options related to source browsing
-#---------------------------------------------------------------------------
-SOURCE_BROWSER         = NO
-INLINE_SOURCES         = NO
-STRIP_CODE_COMMENTS    = YES
-REFERENCED_BY_RELATION = YES
-REFERENCES_RELATION    = YES
-VERBATIM_HEADERS       = YES
-#---------------------------------------------------------------------------
-# configuration options related to the alphabetical class index
-#---------------------------------------------------------------------------
-ALPHABETICAL_INDEX     = NO
-COLS_IN_ALPHA_INDEX    = 5
-IGNORE_PREFIX          = 
-#---------------------------------------------------------------------------
-# configuration options related to the HTML output
-#---------------------------------------------------------------------------
-GENERATE_HTML          = NO
-HTML_OUTPUT            = html
-HTML_FILE_EXTENSION    = .html
-HTML_HEADER            = 
-HTML_FOOTER            = 
-HTML_STYLESHEET        = 
-HTML_ALIGN_MEMBERS     = YES
-GENERATE_HTMLHELP      = YES
-CHM_FILE               = 
-HHC_LOCATION           = 
-GENERATE_CHI           = NO
-BINARY_TOC             = YES
-TOC_EXPAND             = YES
-DISABLE_INDEX          = YES
-ENUM_VALUES_PER_LINE   = 4
-GENERATE_TREEVIEW      = YES
-TREEVIEW_WIDTH         = 250
-#---------------------------------------------------------------------------
-# configuration options related to the LaTeX output
-#---------------------------------------------------------------------------
-GENERATE_LATEX         = NO
-LATEX_OUTPUT           = latex
-LATEX_CMD_NAME         = latex
-MAKEINDEX_CMD_NAME     = makeindex
-COMPACT_LATEX          = NO
-PAPER_TYPE             = a4wide
-EXTRA_PACKAGES         = 
-LATEX_HEADER           = 
-PDF_HYPERLINKS         = NO
-USE_PDFLATEX           = NO
-LATEX_BATCHMODE        = NO
-LATEX_HIDE_INDICES     = NO
-#---------------------------------------------------------------------------
-# configuration options related to the RTF output
-#---------------------------------------------------------------------------
-GENERATE_RTF           = YES
-RTF_OUTPUT             = Doc
-COMPACT_RTF            = YES
-RTF_HYPERLINKS         = YES
-RTF_STYLESHEET_FILE    = 
-RTF_EXTENSIONS_FILE    = 
-#---------------------------------------------------------------------------
-# configuration options related to the man page output
-#---------------------------------------------------------------------------
-GENERATE_MAN           = NO
-MAN_OUTPUT             = man
-MAN_EXTENSION          = .3
-MAN_LINKS              = NO
-#---------------------------------------------------------------------------
-# configuration options related to the XML output
-#---------------------------------------------------------------------------
-GENERATE_XML           = NO
-XML_OUTPUT             = xml
-XML_SCHEMA             = 
-XML_DTD                = 
-XML_PROGRAMLISTING     = YES
-#---------------------------------------------------------------------------
-# configuration options for the AutoGen Definitions output
-#---------------------------------------------------------------------------
-GENERATE_AUTOGEN_DEF   = NO
-#---------------------------------------------------------------------------
-# configuration options related to the Perl module output
-#---------------------------------------------------------------------------
-GENERATE_PERLMOD       = NO
-PERLMOD_LATEX          = NO
-PERLMOD_PRETTY         = YES
-PERLMOD_MAKEVAR_PREFIX = 
-#---------------------------------------------------------------------------
-# Configuration options related to the preprocessor   
-#---------------------------------------------------------------------------
-ENABLE_PREPROCESSING   = YES
-MACRO_EXPANSION        = YES
-EXPAND_ONLY_PREDEF     = NO
-SEARCH_INCLUDES        = YES
-INCLUDE_PATH           = 
-INCLUDE_FILE_PATTERNS  = 
-PREDEFINED             = NONSHARABLE_CLASS
-EXPAND_AS_DEFINED      = 
-SKIP_FUNCTION_MACROS   = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to external references   
-#---------------------------------------------------------------------------
-TAGFILES               = 
-GENERATE_TAGFILE       = 
-ALLEXTERNALS           = NO
-EXTERNAL_GROUPS        = YES
-PERL_PATH              = /usr/bin/perl
-#---------------------------------------------------------------------------
-# Configuration options related to the dot tool   
-#---------------------------------------------------------------------------
-CLASS_DIAGRAMS         = YES
-HIDE_UNDOC_RELATIONS   = YES
-HAVE_DOT               = NO
-CLASS_GRAPH            = YES
-COLLABORATION_GRAPH    = YES
-GROUP_GRAPHS           = YES
-UML_LOOK               = NO
-TEMPLATE_RELATIONS     = YES
-INCLUDE_GRAPH          = YES
-INCLUDED_BY_GRAPH      = YES
-CALL_GRAPH             = NO
-GRAPHICAL_HIERARCHY    = YES
-DIRECTORY_GRAPH        = YES
-DOT_IMAGE_FORMAT       = png
-DOT_PATH               = 
-DOTFILE_DIRS           = 
-MAX_DOT_GRAPH_WIDTH    = 1024
-MAX_DOT_GRAPH_HEIGHT   = 1024
-MAX_DOT_GRAPH_DEPTH    = 0
-DOT_TRANSPARENT        = NO
-DOT_MULTI_TARGETS      = NO
-GENERATE_LEGEND        = YES
-DOT_CLEANUP            = YES
-#---------------------------------------------------------------------------
-# Configuration::additions related to the search engine   
-#---------------------------------------------------------------------------
-SEARCHENGINE           = NO
--- a/radioengine/settings/tsrc/group/SettingsTestModule_nrm.mmp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,83 +0,0 @@
-/*TYPE TESTCLASS*/
-/*
-* 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: MMP file for STIF Test Framework's TestScripter 
-* testclass test module.
-*
-*/
-
-#include <platform_paths.hrh>
-
-TARGET          SettingsTestModule.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         SettingsTestModule.def
-
-USERINCLUDE     ../inc
-USERINCLUDE     ../../inc
-USERINCLUDE     ../../api
-USERINCLUDE     ../../../utils/api
-USERINCLUDE     ../../../utils/inc
-
-APP_LAYER_SYSTEMINCLUDE
-
-SOURCEPATH      ../src
-
-SOURCE          SettingsTestModule.cpp
-SOURCE          SettingsTestModuleBlocks.cpp
-
-//RESOURCE        resource_file
-//RESOURCE        resource_file2
-
-LIBRARY         euser.lib
-LIBRARY         stiftestinterface.lib
-LIBRARY         stiftestengine.lib
-LIBRARY         fmradioenginesettings.lib
-LIBRARY         fmradioengineutils.lib
-LIBRARY         centralrepository.lib
-
-LANG            SC
-SMPSAFE
-
-/*
-START WINS      
-?wins_specific_information
-END
-
-START MARM
-?marm_specific_information
-END
-*/
-// Other possible keywords:
- 
-// DOCUMENT     ?file, that is not compiled, but added to MSVC project workspace (i.e. release notes)
-/*
-START BITMAP ?target
-TARGETPATH   ?emulated_path_on_target_machine
-HEADER
-SOURCE       ?color_depth ?source_bitmap
-END
-*/
-// DEFFILE ?filename
-// AIF ?filename
-
-// End of File
--- a/radioengine/settings/tsrc/group/TestEnvInit.cmd	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-@REM
-@REM Copyright (c) 2002-2004 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:  Wins Command file for Settings Test Module
-@REM
-@REM
-@echo Initializing test environment for settingstestmodule...
-copy ..\conf\SettingsTestModule.cfg \epoc32\wins\c\TestFramework\SettingsTestModule.cfg
-copy ..\conf\SettingsTestModule.cfg \epoc32\winscw\c\TestFramework\SettingsTestModule.cfg
-copy ..\conf\SettingsTestModule.cfg \epoc32\data\z\system\data\SettingsTestModule.cfg
-copy ..\init\TestFramework.ini \epoc32\wins\c\TestFramework\TestFramework.ini
-copy ..\init\TestFramework.ini \epoc32\winscw\c\TestFramework\TestFramework.ini
-copy ..\init\TestFramework.ini \epoc32\data\z\system\data\TestFramework.ini
-copy ..\conf\2002FF52.txt \epoc32\data\z\private\10202be9\2002FF52.txt
-copy ..\conf\2002FF52.txt \epoc32\release\winscw\udeb\z\private\10202be9\2002FF52.txt
-copy ..\conf\2002FF52.txt \epoc32\release\winscw\urel\z\private\10202be9\2002FF52.txt
-del \epoc32\winscw\c\private\10202be9\persists\2002FF52.cre
-@echo Test environment initialization for settingstestmodule... Finished.
\ No newline at end of file
--- a/radioengine/settings/tsrc/group/bld.inf	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,63 +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 <platform_paths.hrh>
-
-
-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
-*/
-../rom/settingstestmodule.iby             CORE_APP_LAYER_IBY_EXPORT_PATH(settingstestmodule.iby)
-
-PRJ_TESTMMPFILES
-
-	SettingsTestModule.mmp
-
-PRJ_MMPFILES
-
-	SettingsTestModule_nrm.mmp
-
-// 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
-*/
-
-//  End of File
--- a/radioengine/settings/tsrc/inc/SettingsTestModule.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,286 +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: STIF testclass declaration
-*
-*/
-
-#ifndef SettingsTestMODULE_H
-#define SettingsTestMODULE_H
-
-//  INCLUDES
-#include <StifLogger.h>
-#include <TestScripterInternal.h>
-#include <StifTestModule.h>
-#include <TestclassAssert.h>
-//INTERNAL INCLUDES
-#include "cradiosettings.h"
-#include "mradiosettingsobserver.h"
-#include "trace.h"
-
-
-// CONSTANTS
-const TInt KErrBadTestParameter= -1000;         // Error on configuration file
-
-const TInt KErrEventPending =-2000;             // Timeout and not callback 
-const TInt KErrCallbackErrorCode = -2001;       // Callback return error code
-const TInt KErrUnexpectedValue =-2002;          // Unexpected value at setting    
-const TInt KExpectedFrequencyChange = -2003;        // Is not finding more than one station
-const TInt KErrTimeoutController = -2007;       // Unexpected notification
-
-// MACROS
-//#define ?macro ?macro_def
-#define TEST_CLASS_VERSION_MAJOR 1
-#define TEST_CLASS_VERSION_MINOR 1
-#define TEST_CLASS_VERSION_BUILD 1
-
-// Logging path
-_LIT( KSettingsTestModuleLogPath, "\\logs\\testframework\\SettingsTestModule\\" ); 
-// Log file
-_LIT( KSettingsTestModuleLogFile, "SettingsTestModule.txt" ); 
-_LIT( KSettingsTestModuleLogFileWithTitle, "SettingsTestModule_[%S].txt" );
-
-// FUNCTION PROTOTYPES
-//?type ?function_name(?arg_list);
-
-// FORWARD DECLARATIONS
-//class ?FORWARD_CLASSNAME;
-//class CSettingsTestModule;
-
-// DATA TYPES
-//enum ?declaration
-//typedef ?declaration
-//extern ?data_type;
-
-// CLASS DECLARATION
-
-/**
-*  CSettingsTestModule test class for STIF Test Framework TestScripter.
-*  ?other_description_lines
-*
-*  @lib ?library
-*  @since ?Series60_version
-*/
-NONSHARABLE_CLASS(CSettingsTestModule) : public CScriptBase, public MRadioSettingsObserver
-    {
-    public:  // Constructors and destructor
-
-        /**
-        * Two-phased constructor.
-        */
-        static CSettingsTestModule* NewL( CTestModuleIf& aTestModuleIf );
-
-        /**
-        * Destructor.
-        */
-        virtual ~CSettingsTestModule();
-
-    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 );
-
-        // MRadioSettingsObserver
-        
-        /**
-        * From MRadioSettingsObserver.
-         * Notifies of the change in RDS alternate frequency setting
-         *
-         * @param aEnabled ETrue if AF search is enabled, otherwise EFalse
-         */
-        virtual void RdsAfSearchSettingChangedL( TBool aEnabled );
-
-        /**
-        * From MRadioSettingsObserver.
-         * Notifies of the change in region setting when it is changed
-         * outside of the particular radio settings instance
-         *
-         * @param aRegion The new region ID
-         */
-        virtual void RegionSettingChangedL( TInt aRegion );
-        
-    protected:  // New functions
-
-        /**
-        * ?member_description.
-        * @since ?Series60_version
-        * @param ?arg1 ?description
-        * @return ?description
-        */
-        //?type ?member_function( ?type ?arg1 );
-        // Test case functions
-        TInt CreateSettingsL( CStifItemParser& aItem );
-        TInt DestroySettingsL( CStifItemParser& aItem );
-        
-        TInt IsRegionAllowed( CStifItemParser& aItem );
-        
-        TInt ResolveDriveL( CStifItemParser& aItem );
-        
-        // Application Settings functions
-        
-        TInt SetFirstTimeStartPerformed( CStifItemParser& aItem );
-        TInt IsFirstTimeStart( CStifItemParser& aItem );
-        
-        TInt SetUiFlags( CStifItemParser& aItem );
-        
-        TInt UiFlags( CStifItemParser& aItem );
-               
-        // Settings functions
-        
-        TInt HeadsetVolume ( CStifItemParser& aItem );
-        TInt SpeakerVolume ( CStifItemParser& aItem );
-        TInt Volume ( CStifItemParser& aItem );
-        TInt OutputMode ( CStifItemParser& aItem );
-        TInt AudioRoute ( CStifItemParser& aItem );
-        TInt IsHeadsetVolMuted ( CStifItemParser& aItem );
-        TInt IsSpeakerVolMuted ( CStifItemParser& aItem );
-        TInt IsVolMuted ( CStifItemParser& aItem );
-        TInt IsPowerOn ( CStifItemParser& aItem );
-        TInt TunedFrequency ( CStifItemParser& aItem );
-        TInt DefaultMinVolumeLevel ( CStifItemParser& aItem );
-        TInt CountRegions ( CStifItemParser& aItem );
-        TInt Region ( CStifItemParser& aItem );
-        TInt RegionId ( CStifItemParser& aItem );
-        TInt FrequencyStepSize ( CStifItemParser& aItem );
-        TInt MaxFrequency ( CStifItemParser& aItem );
-        TInt MinFrequency ( CStifItemParser& aItem );
-        TInt DecimalCount ( CStifItemParser& aItem );
-        TInt DefaultRegion ( CStifItemParser& aItem );
-        TInt NetworkId ( CStifItemParser& aItem );
-        TInt CountryCode ( CStifItemParser& aItem );
-        TInt OperatorMusicStoreURL ( CStifItemParser& aItem );
-        TInt OperatorMusicStoreName ( CStifItemParser& aItem );
-
-        // Setter functions
-        
-        TInt SetHeadsetVolume ( CStifItemParser& aItem );
-        TInt SetSpeakerVolume ( CStifItemParser& aItem );
-        TInt SetVolume ( CStifItemParser& aItem );
-        TInt SetOutputMode ( CStifItemParser& aItem );
-        TInt SetAudioRoute ( CStifItemParser& aItem );
-        TInt SetHeadsetVolMuted ( CStifItemParser& aItem );
-        TInt SetSpeakerVolMuted ( CStifItemParser& aItem );
-        TInt SetVolMuted ( CStifItemParser& aItem );
-        TInt SetPowerOn ( CStifItemParser& aItem );
-        TInt SetTunedFrequency ( CStifItemParser& aItem );
-        TInt SetRegionId ( CStifItemParser& aItem );
-        TInt SetNetworkId ( CStifItemParser& aItem );
-        TInt SetCountryCode ( CStifItemParser& aItem );
-        TInt SetOperatorMusicStoreURL ( CStifItemParser& aItem );
-        TInt SetOperatorMusicStoreName ( CStifItemParser& aItem );
-        
-        // Tst functions
-        TInt ReadConfigurableKeysL ( CStifItemParser& aItem );
-        TInt tstSetRegionIdL ( CStifItemParser& aItem );
-        TInt tstIsRegionSettingChangeNotified ( CStifItemParser& aItem );
-        TInt tstResetStartCount ( CStifItemParser& aItem );
-        
-    protected:  // Functions from base classes
-
-        /**
-        * From ?base_class ?member_description
-        */
-        //?type ?member_function();
-
-    private:
-
-        /**
-        * C++ default constructor.
-        */
-        CSettingsTestModule( 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 ExampleL( CStifItemParser& aItem );
-        
-        /**
-         * Method used to log version of test class
-         */
-        void SendTestClassVersion();
-
-        //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
-        
-        // ?one_line_short_description_of_data
-        //?data_declaration;
-
-        // Reserved pointer for future extension
-        //TAny* iReserved;
-
-        /** Radio Settings */
-        CRadioSettings* iSettings;
-        
-        TBool iRegionSettingChangeNotified;
-
-        
-    public:     // Friend classes
-        //?friend_class_declaration;
-    protected:  // Friend classes
-        //?friend_class_declaration;
-    private:    // Friend classes
-        //?friend_class_declaration;
-
-    };
-
-#endif      // SettingsTestMODULE_H
-
-// End of File
--- a/radioengine/settings/tsrc/inc/trace.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,596 +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:
-* Trace macro definitions.
-*
-*/
-
-#ifndef TRACE_H
-#define TRACE_H
-
-#include <e32base.h> // TCleanupItem
-#include "traceconfiguration.hrh"
-
-#ifdef TRACE_INTO_FILE
-#include <flogger.h> // RFileLogger
-#else
-#include <e32debug.h> // RDebug
-#endif
-
-//-----------------------------------------------------------------------------
-// Constants
-//-----------------------------------------------------------------------------
-//
-
-// NOTE!
-// Replace all COMPONENT_NAME occurnaces with your own component / module name.
-
-/**
-* Prefix trace macro to complete tracing with component name.
-* Returns TDesC which can be used directly with RDebug or RFileLogger.
-*/
-#define _PREFIX_TRACE( aMsg ) TPtrC( (const TText*)L"[Settings]: " L##aMsg )
-
-/**
-* Prefix error trace
-*/
-#define _PREFIX_ERROR( aMsg ) _PREFIX_TRACE( "[ERROR: %d]: " L##aMsg )
-
-/**
-* Prefix info trace.
-*/
-#define _PREFIX_INFO( aMsg ) _PREFIX_TRACE( "[INFO]: " L##aMsg )
-
-/**
-* Prefix macro for strings
-*/
-#define _PREFIX_CHAR( aMsg ) (const char*)"[Settings]: " ##aMsg
-
-/**
-* Define needed directories if TRACE_INTO_FILE macro in use
-*/
-#ifdef TRACE_INTO_FILE
-
-    _LIT( KDir, "settings" );
-    _LIT( KFile, "settings.txt" );
-    _LIT( KFullPath, "c:\\logs\\settings\\" );
-
-#endif
-
-//-----------------------------------------------------------------------------
-// Error trace macros
-//-----------------------------------------------------------------------------
-//
-#ifdef ERROR_TRACE
-
-    /**
-    * Error trace definitions.
-    */
-    #ifdef TRACE_INTO_FILE
-
-        #define ERROR( aErr, aMsg )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr );\
-                }\
-            }
-        #define ERROR_1( aErr, aMsg, aP1 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1 );\
-                }\
-            }
-        #define ERROR_2( aErr, aMsg, aP1, aP2 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2 );\
-                }\
-            }
-        #define ERROR_3( aErr, aMsg, aP1, aP2, aP3 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3 );\
-                }\
-            }
-        #define ERROR_4( aErr, aMsg, aP1, aP2, aP3, aP4 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3, aP4 );\
-                }\
-            }
-        #define ERROR_5( aErr, aMsg, aP1, aP2, aP3, aP4, aP5 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3, aP4, aP5 );\
-                }\
-            }
-        #define ERROR_6( aErr, aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3, aP4, aP5 );\
-                }\
-            }
-            
-    #else//TRACE_INTO_FILE not defined
-    
-        #define ERROR( aErr, aMsg )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr );\
-                }\
-            }
-        #define ERROR_1( aErr, aMsg, aP1 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1 );\
-                }\
-            }
-        #define ERROR_2( aErr, aMsg, aP1, aP2 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2 );\
-                }\
-            }
-        #define ERROR_3( aErr, aMsg, aP1, aP2, aP3 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3 );\
-                }\
-            }
-        #define ERROR_4( aErr, aMsg, aP1, aP2, aP3, aP4 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3, aP4 );\
-                }\
-            }
-        #define ERROR_5( aErr, aMsg, aP1, aP2, aP3, aP4, aP5 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3, aP4, aP5 );\
-                }\
-            }
-        #define ERROR_6( aErr, aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )\
-            {\
-            if( aErr < KErrNone )\
-                {\
-                RDebug::Print( _PREFIX_ERROR( aMsg ), aErr, aP1, aP2, aP3, aP4, aP5, aP6 );\
-                }\
-            }
-    
-    #endif//TRACE_INTO_FILE
-
-    #define ERROR_GEN( aMsg ) ERROR( KErrGeneral, aMsg )
-    #define ERROR_GEN_1( aMsg, aP1 ) ERROR_1( KErrGeneral, aMsg, aP1 )
-    #define ERROR_GEN_2( aMsg, aP1, aP2 ) ERROR_2( KErrGeneral, aMsg, aP1, aP2 )
-    #define ERROR_GEN_3( aMsg, aP1, aP2, aP3 ) ERROR_3( KErrGeneral, aMsg, aP1, aP3 )
-    #define ERROR_GEN_4( aMsg, aP1, aP2, aP3, aP4 ) ERROR_4( KErrGeneral, aMsg, aP1, aP3, aP4 )
-    #define ERROR_GEN_5( aMsg, aP1, aP2, aP3, aP4, aP5 ) ERROR_5( KErrGeneral, aMsg, aP1, aP3, aP4, aP5 )
-    #define ERROR_GEN_6( aMsg, aP1, aP2, aP3, aP4, aP5, aP6 ) ERROR_6( KErrGeneral, aMsg, aP1, aP3, aP4, aP5, aP6 )
-
-#else//ERROR_TRACE not defined
-
-    #define ERROR( aErr, aMsg )
-    #define ERROR_1( aErr, aMsg, aP1 )
-    #define ERROR_2( aErr, aMsg, aP1, aP2 )
-    #define ERROR_3( aErr, aMsg, aP1, aP2, aP3 )
-    #define ERROR_4( aErr, aMsg, aP1, aP2, aP3, aP4 )
-    #define ERROR_5( aErr, aMsg, aP1, aP2, aP3, aP4, aP5 )
-    #define ERROR_6( aErr, aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )
-
-    #define ERROR_GEN( aMsg )
-    #define ERROR_GEN_1( aMsg, aP1 )
-    #define ERROR_GEN_2( aMsg, aP1, aP2 )
-    #define ERROR_GEN_3( aMsg, aP1, aP2, aP3 )
-    #define ERROR_GEN_4( aMsg, aP1, aP2, aP3, aP4 )
-    #define ERROR_GEN_5( aMsg, aP1, aP2, aP3, aP4, aP5 )
-    #define ERROR_GEN_6( aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )
-
-#endif//ERROR_TRACE
-
-//-----------------------------------------------------------------------------
-// TRAP and trace with error macro
-//-----------------------------------------------------------------------------
-//
-#define TRAP_ERROR( aErr, aFunction )\
-    {\
-    TRAP( aErr, aFunction );\
-    TPtrC8 file( ( TText8* )__FILE__ );\
-    ERROR_2( aErr, "Trapped leave in '%S' line %d", &file, __LINE__);\
-    }
-
-//-----------------------------------------------------------------------------
-// Info trace macros
-//-----------------------------------------------------------------------------
-//
-#ifdef INFO_TRACE
-
-    /**
-    * Info log message definitions.
-    */
-    #ifdef TRACE_INTO_FILE
-    
-        #define INFO( aMsg )\
-            {\
-            RFileLogger::Write( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ) );\
-            }
-        #define INFO_1( aMsg, aP1 )\
-            {\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1 );\
-            }
-        #define INFO_2( aMsg, aP1, aP2 )\
-            {\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2 );\
-            }
-        #define INFO_3( aMsg, aP1, aP2, aP3 )\
-            {\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2, aP3 );\
-            }
-        #define INFO_4( aMsg, aP1, aP2, aP3, aP4 )\
-            {\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2, aP3, aP4 );\
-            }
-        #define INFO_5( aMsg, aP1, aP2, aP3, aP4, aP5 )\
-            {\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2, aP3, aP4, aP5 );\
-            }
-        #define INFO_6( aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )\
-            {\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_INFO( aMsg ), aP1, aP2, aP3, aP4, aP5, aP6 );\
-            }
-
-    #else//TRACE_INTO_FILE not defined
-
-        #define INFO( aMsg )\
-            {\
-            RDebug::Print( _PREFIX_INFO( aMsg ) );\
-            }
-        #define INFO_1( aMsg, aP1 )\
-            {\
-            RDebug::Print( _PREFIX_INFO( aMsg ), aP1 );\
-            }
-        #define INFO_2( aMsg, aP1, aP2 )\
-            {\
-            RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2 );\
-            }
-        #define INFO_3( aMsg, aP1, aP2, aP3 )\
-            {\
-            RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2, aP3 );\
-            }
-        #define INFO_4( aMsg, aP1, aP2, aP3, aP4 )\
-            {\
-            RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2, aP3, aP4 );\
-            }
-        #define INFO_5( aMsg, aP1, aP2, aP3, aP4, aP5 )\
-            {\
-            RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2, aP3, aP4, aP5 );\
-            }
-        #define INFO_6( aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )\
-            {\
-            RDebug::Print( _PREFIX_INFO( aMsg ), aP1, aP2, aP3, aP4, aP5, aP6 );\
-            }
-
-    #endif//TRACE_INTO_FILE
-        
-#else//INFO_TRACE not defined
-
-    #define INFO( aMsg )
-    #define INFO_1( aMsg, aP1 )
-    #define INFO_2( aMsg, aP1, aP2 )
-    #define INFO_3( aMsg, aP1, aP2, aP3 )
-    #define INFO_4( aMsg, aP1, aP2, aP3, aP4 )
-    #define INFO_5( aMsg, aP1, aP2, aP3, aP4, aP5 )
-    #define INFO_6( aMsg, aP1, aP2, aP3, aP4, aP5, aP6 )
-
-#endif//INFO_TRACE
-
-//-----------------------------------------------------------------------------
-// Trace current client thread name and process id
-//-----------------------------------------------------------------------------
-//
-#ifdef CLIENT_TRACE
-
-    #define CLIENT_PROCESS\
-        {\
-        CLIENT_PROCESS_PREFIX( "" );\
-        }        
-
-    #define CLIENT_PROCESS_PREFIX( aPrefix )\
-        {\
-        RProcess process;\
-        TPtrC name( process.Name() );\
-        TSecureId sid( process.SecureId() );\
-        TPtrC prefix( _S( aPrefix ) );\
-        if( prefix.Length() )\
-            {\
-            INFO_3( "%S: CLIENT - Name: [%S], Sid: [0x%x]", &prefix, &name, sid.iId );\
-            }\
-        else\
-            {\
-            INFO_2( "CLIENT - Name: [%S], Sid: [0x%x]", &name, sid.iId );\
-            }\
-        process.Close();\
-        }        
-
-    #define CLIENT_MESSAGE( aMsg )\
-        {\
-        CLIENT_MESSAGE_PREFIX( "", aMsg );\
-        }
-
-    #define CLIENT_MESSAGE_PREFIX( aPrefix, aMsg )\
-        {\
-        RThread thread;\
-        TInt err = aMsg.Client( thread );\
-        if( err == KErrNone )\
-            {\
-            RProcess process;\
-            err = thread.Process( process );\
-            if( err == KErrNone )\
-                {\
-                TPtrC threadName( thread.Name() );\
-                TUid processUid( process.SecureId() );\
-                TPtrC prefix( _S( aPrefix ) );\
-                if( prefix.Length() )\
-                    {\
-                    INFO_4( "%S: MSG - Name: [%S], Sid: [0x%x], Message ID: [%d]",\
-                        &prefix,\
-                        &threadName,\
-                        processUid,\
-                        aMsg.Function() );\
-                    }\
-                else\
-                    {\
-                    INFO_3( "MSG - Name: [%S], Sid: [0x%x], Message ID: [%d]",\
-                        &threadName,\
-                        processUid,\
-                        aMsg.Function() );\
-                    }\
-                }\
-            process.Close();\
-            }\
-        thread.Close();\
-        }
-
-#else
-
-    #define CLIENT_PROCESS
-    #define CLIENT_PROCESS_PREFIX( aPrefix )
-    #define CLIENT_MESSAGE( aMsg )
-    #define CLIENT_MESSAGE_PREFIX( aPrefix, aMsg )
-
-#endif
-
-//-----------------------------------------------------------------------------
-// Function trace macros
-//-----------------------------------------------------------------------------
-//
-#ifdef FUNC_TRACE
-
-    /**
-    * Function logging definitions.
-    */
-    #ifdef TRACE_INTO_FILE
-    
-        #define FUNC( aMsg, aP1 )\
-            {\
-            TPtrC8 trace( _S8( aMsg ) );\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, trace, aP1 );\
-            }\
-    
-    #else//TRACE_INTO_FILE not defined
-    
-        #define FUNC( aMsg, aP1 )\
-            {\
-            RDebug::Printf( aMsg, aP1 );\
-            }\
-    
-    #endif//TRACE_INTO_FILE
-        
-    /**
-    * Function trace helper class.
-    * 
-    * NOTE:
-    * LC -methods cannot be trapped. Therefore if LC -method leaves
-    * END trace is used instead of LEAVE trace.
-    * If you have an idea how to round this problem please tell.
-    */
-    _LIT8( KFuncNameTerminator, "(" );
-    _LIT8( KFuncLeavePatternL, "L" );
-    class TFuncLog
-        {
-        public:
-            static void Cleanup( TAny* aPtr )
-                {
-                TFuncLog* self = static_cast< TFuncLog* >( aPtr );
-                self->iLeft = ETrue;
-                FUNC( _PREFIX_CHAR("%S-LEAVE"), &self->iFunc ); // Leave detected
-                }
-            inline TFuncLog( const char* aFunc ) :
-                    iFunc( aFunc ? _S8( aFunc ) : _S8("") ),
-                    iLeft( EFalse ),
-                    iCleanupItem( Cleanup, this ),
-                    iCanLeave( EFalse )
-                {
-                TInt pos( iFunc.Find( KFuncNameTerminator ) );
-                if( pos != KErrNotFound )
-                    {
-                    iFunc.Set( iFunc.Left( pos ) );
-                    iCanLeave = !iFunc.Right( KFuncLeavePatternL().Length() ).Compare( KFuncLeavePatternL );
-                    if ( iCanLeave )
-                        {
-                        CleanupStack::PushL( iCleanupItem ); // Ignore warnings
-                        }
-                    }
-                FUNC( _PREFIX_CHAR("%S-START"), &iFunc );
-                }
-
-            inline ~TFuncLog()
-                {
-                if ( !iLeft )
-                    {
-                    if ( iCanLeave )
-                        {
-                        CleanupStack::Pop( this ); // Pop the cleanup item
-                        }
-                    FUNC( _PREFIX_CHAR("%S-END"), &iFunc ); // Normally finished
-                    }
-                }
-
-        private: // Data
-            TPtrC8 iFunc;
-            TBool iLeft;
-            TCleanupItem iCleanupItem;
-            TBool iCanLeave;
-        };
-    #define FUNC_LOG TFuncLog _fl( __PRETTY_FUNCTION__ );
-    
-#else//FUNC_TRACE not defined
-
-    #define FUNC_LOG
-
-#endif//FUNC_TRACE
-
-//-----------------------------------------------------------------------------
-// Timestamp trace macros
-//-----------------------------------------------------------------------------
-//
-#ifdef TIMESTAMP_TRACE
-
-    #ifdef TRACE_INTO_FILE
-    
-        #define TIMESTAMP( aCaption )\
-            {\
-            TTime t;\
-            t.HomeTime();\
-            TDateTime dt = t.DateTime();\
-            _LIT( KCaption, aCaption );\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend,\
-                _PREFIX_TRACE("[TIMESTAMP] %S %d:%02d:%02d.%d us"),\
-                    &KCaption, dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond() );\
-            }
-
-    #else//TRACE_INTO_FILE not defined
-    
-        #define TIMESTAMP( aCaption )\
-            {\
-            TTime t;\
-            t.HomeTime();\
-            TDateTime dt = t.DateTime();\
-            _LIT( KCaption, aCaption );\
-            RDebug::Print( _PREFIX_TRACE("[TIMESTAMP] %S %d:%02d:%02d.%d us"),\
-                &KCaption, dt.Hour(), dt.Minute(), dt.Second(), dt.MicroSecond() );\
-            }
-
-    #endif//TRACE_INTO_FILE
-
-#else//TIMESTAMP_TRACE not defined
-
-    #define TIMESTAMP( aCaption )
-
-#endif//TIMESTAMP_TRACE
-
-#ifdef HEAP_TRACE
-
-    #ifdef TRACE_INTO_FILE
-
-        #define HEAP( aMsg )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace );\
-            }
-        #define HEAP_1( aMsg, aP1 )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1 );\
-            }
-        #define HEAP_2( aMsg, aP1, aP2 )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2 );\
-            }
-        #define HEAP_3( aMsg, aP1, aP2, aP3 )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2, aP3 );\
-            }
-        #define HEAP_4( aMsg, aP1, aP2, aP3, aP4 )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RFileLogger::WriteFormat( KDir, KFile, EFileLoggingModeAppend, _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2, aP3, aP4 );\
-            }
-
-    #else//TRACE_INTO_FILE not defined
-
-        #define HEAP( aMsg )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace );\
-            }
-        #define HEAP_1( aMsg, aP1 )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1 );\
-            }
-        #define HEAP_2( aMsg, aP1, aP2 )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2 );\
-            }
-        #define HEAP_3( aMsg, aP1, aP2, aP3 )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2, aP3 );\
-            }
-        #define HEAP_4( aMsg, aP1, aP2, aP3, aP4 )\
-            {\
-            TInt totalAllocSpace = 0;\
-            User::AllocSize( totalAllocSpace );\
-            RDebug::Print( _PREFIX_HEAP( aMsg ), totalAllocSpace, aP1, aP2, aP3, aP4 );\
-            }
-
-    #endif//TRACE_INTO_FILE
-
-#else//HEAP_TRACE not defined
-
-    #define HEAP( aMsg )
-    #define HEAP_1( aMsg, aP1 )
-    #define HEAP_2( aMsg, aP1, aP2 )
-    #define HEAP_3( aMsg, aP1, aP2, aP3 )
-    #define HEAP_4( aMsg, aP1, aP2, aP3, aP4 )
-
-#endif//HEAP_TRACE
-
-#endif
-
--- a/radioengine/settings/tsrc/inc/traceconfiguration.hrh	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +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:
-* Trace Macro Configurations.
-*
-*/
-
-#ifndef TRACECONFIGURATION_HRH
-#define TRACECONFIGURATION_HRH
-
-//-----------------------------------------------------------------------------
-// Trace definitions
-//-----------------------------------------------------------------------------
-//
-
-/**
-* Error trace enabled
-*/
-#ifdef _DEBUG
-    #define ERROR_TRACE
-#else
-    #undef ERROR_TRACE
-#endif
-
-/**
-* Info trace enabled
-*/
-#ifdef _DEBUG
-    #define INFO_TRACE
-#else
-    #undef INFO_TRACE
-#endif
-
-/**
-* Timestamp tracing on
-*/
-#ifdef _DEBUG
-    #define TIMESTAMP_TRACE
-#else
-    #undef TIMESTAMP_TRACE
-#endif
-
-/**
-* Tracing current client process and thread
-*/
-#ifdef _DEBUG
-    #define CLIENT_TRACE
-#else
-    #undef CLIENT_TRACE
-#endif
-
-/**
-* Function trace enabled
-*/
-#ifdef _DEBUG
-    #define FUNC_TRACE
-#else
-    #undef FUNC_TRACE
-#endif
-
-/**
-* Tracing into file enabled, default RDebug
-*/
-#undef TRACE_INTO_FILE
-
-#endif
-
--- a/radioengine/settings/tsrc/init/TestFramework.ini	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,197 +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.
-#
-#
-# This is STIFTestFramework 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'
-
-[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\SettingsTestModule.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 STIFTestFramework 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.
-#
-
-[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
-
-[End_Logger_Defaults]
-# -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
-
-# End of file
--- a/radioengine/settings/tsrc/rom/settingstestmodule.iby	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,29 +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:  IBY file for the SettingsTestModule
-*
-*/
-
-#ifndef __SETTINGSTESTMODULE_IBY__
-#define __SETTINGSTESTMODULE_IBY__
-
-// Use standard macros
-#include <data_caging_paths_for_iby.hrh>
-
-
-file=ABI_DIR\BUILD_DIR\settingstestmodule.dll         SHARED_LIB_DIR\settingstestmodule.dll	PAGED
-
-#endif
-
-
--- a/radioengine/settings/tsrc/src/SettingsTestModule.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,207 +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: This file contains testclass implementation.
-*
-*/
-
-// INCLUDE FILES
-#include <Stiftestinterface.h>
-#include <SettingServerClient.h>
-#include "SettingsTestModule.h"
-#include "trace.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 ===============================
-
-// -----------------------------------------------------------------------------
-// CSettingTestModule::CPresetUtilityTestModule
-// C++ default constructor can NOT contain any code, that
-// might leave.
-// -----------------------------------------------------------------------------
-//
-CSettingsTestModule::CSettingsTestModule( 
-    CTestModuleIf& aTestModuleIf ):
-        CScriptBase( aTestModuleIf )
-    {
-    FUNC_LOG;
-    }
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::ConstructL
-// Symbian 2nd phase constructor can leave.
-// -----------------------------------------------------------------------------
-//
-void CSettingsTestModule::ConstructL()
-    {
-    FUNC_LOG;
-    
-    //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(KSettingsTestModuleLogFileWithTitle, &title);
-        }
-    else
-        {
-        logFileName.Copy(KSettingsTestModuleLogFile);
-        }
-
-    iLog = CStifLogger::NewL( KSettingsTestModuleLogPath, 
-                          logFileName,
-                          CStifLogger::ETxt,
-                          CStifLogger::EFile,
-                          EFalse );
-    
-    SendTestClassVersion();
-    }
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::NewL
-// Two-phased constructor.
-// -----------------------------------------------------------------------------
-//
-CSettingsTestModule* CSettingsTestModule::NewL( 
-    CTestModuleIf& aTestModuleIf )
-    {
-    FUNC_LOG;
-    CSettingsTestModule* self = new (ELeave) CSettingsTestModule( aTestModuleIf );
-
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop();
-
-    return self;
-
-    }
-
-// Destructor
-CSettingsTestModule::~CSettingsTestModule()
-    { 
-    FUNC_LOG;
-
-    // Delete resources allocated from test methods
-    Delete();
-
-    // Delete logger
-    delete iLog; 
-
-    }
-
-//-----------------------------------------------------------------------------
-// CSettingsTestModule::SendTestClassVersion
-// Method used to send version of test class
-//-----------------------------------------------------------------------------
-//
-void CSettingsTestModule::SendTestClassVersion()
-	{
-	FUNC_LOG;
-	TVersion moduleVersion;
-	moduleVersion.iMajor = TEST_CLASS_VERSION_MAJOR;
-	moduleVersion.iMinor = TEST_CLASS_VERSION_MINOR;
-	moduleVersion.iBuild = TEST_CLASS_VERSION_BUILD;
-	
-	TFileName moduleName;
-	moduleName = _L("SettingsTestModule.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
-    {
-    FUNC_LOG;
-
-    return ( CScriptBase* ) CSettingsTestModule::NewL( aTestModuleIf );
-
-    }
-
-
-//  End of File
--- a/radioengine/settings/tsrc/src/SettingsTestModuleBlocks.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1203 +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: This file contains testclass implementation.
-*
-*/
-
-// [INCLUDE FILES] - do not remove
-#include <e32svr.h>
-#include <e32cmn.h>
-#include <StifParser.h>
-#include <Stiftestinterface.h>
-#include <data_caging_path_literals.hrh>
-#include <centralrepository.h>
-
-#include "SettingsTestModule.h"
-#include "cradiosettings.h"
-#include "cradiosettingsimp.h"
-#include "mradiosettingssetter.h"
-#include "mradioapplicationsettings.h"
-#include "mradioenginesettings.h"
-#include "radiointernalcrkeys.h"
-#include "radioengineutils.h"
-
-// EXTERNAL DATA STRUCTURES
-//extern  ?external_data;
-
-// EXTERNAL FUNCTION PROTOTYPES  
-//extern ?external_function( ?arg_type,?arg_type );
-
-// CONSTANTS
-//const ?type ?constant_var = ?constant;
-//_LIT( KStifScriptEmptyString, "EMPTYSTRING" );
-//_LIT( KEmptyString, "" );
-
-// 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 ===============================
-
-// -----------------------------------------------------------------------------
-// CPresetUtilityTestModule::Delete
-// Delete here all resources allocated and opened from test methods. 
-// Called from destructor. 
-// -----------------------------------------------------------------------------
-//
-void CSettingsTestModule::Delete() 
-    {
-    FUNC_LOG;
-
-    }
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::RunMethodL
-// Run specified method. Contains also table of test mothods and their names.
-// -----------------------------------------------------------------------------
-//
-TInt CSettingsTestModule::RunMethodL( 
-    CStifItemParser& aItem ) 
-    {
-    FUNC_LOG;
-
-    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( "Example", CSettingsTestModule::ExampleL ),
-        // [test cases entries] - Do not remove
-        ENTRY( "CreateSettingsL", CSettingsTestModule::CreateSettingsL ),
-        ENTRY( "DestroySettingsL", CSettingsTestModule::DestroySettingsL ),
-        ENTRY( "IsRegionAllowed", CSettingsTestModule::IsRegionAllowed ),
-        ENTRY( "ResolveDriveL", CSettingsTestModule::ResolveDriveL ),
-        ENTRY( "SetFirstTimeStartPerformed", CSettingsTestModule::SetFirstTimeStartPerformed ),
-        ENTRY( "IsFirstTimeStart", CSettingsTestModule::IsFirstTimeStart ),
-        ENTRY( "SetUiFlags", CSettingsTestModule::SetUiFlags ),
-        ENTRY( "UiFlags", CSettingsTestModule::UiFlags ),
-        ENTRY( "HeadsetVolume", CSettingsTestModule::HeadsetVolume ),
-        ENTRY( "SpeakerVolume", CSettingsTestModule::SpeakerVolume ),
-        ENTRY( "Volume", CSettingsTestModule::Volume ),
-        ENTRY( "OutputMode", CSettingsTestModule::OutputMode ),
-        ENTRY( "AudioRoute", CSettingsTestModule::AudioRoute ),
-        ENTRY( "IsHeadsetVolMuted", CSettingsTestModule::IsHeadsetVolMuted ),
-        ENTRY( "IsSpeakerVolMuted", CSettingsTestModule::IsSpeakerVolMuted ),
-        ENTRY( "IsVolMuted", CSettingsTestModule::IsVolMuted ),
-        ENTRY( "IsPowerOn", CSettingsTestModule::IsPowerOn ),
-        ENTRY( "TunedFrequency", CSettingsTestModule::TunedFrequency ),
-        ENTRY( "DefaultMinVolumeLevel", CSettingsTestModule::DefaultMinVolumeLevel ),
-        ENTRY( "CountRegions", CSettingsTestModule::CountRegions ),
-        ENTRY( "Region", CSettingsTestModule::Region ),
-        ENTRY( "RegionId", CSettingsTestModule::RegionId ),
-        ENTRY( "FrequencyStepSize", CSettingsTestModule::FrequencyStepSize ),
-        ENTRY( "MaxFrequency", CSettingsTestModule::MaxFrequency ),
-        ENTRY( "MinFrequency", CSettingsTestModule::MinFrequency ),
-        ENTRY( "DecimalCount", CSettingsTestModule::DecimalCount ),
-        ENTRY( "DefaultRegion", CSettingsTestModule::DefaultRegion ),
-        ENTRY( "NetworkId", CSettingsTestModule::NetworkId ),
-        ENTRY( "CountryCode", CSettingsTestModule::CountryCode ),
-        ENTRY( "SetHeadsetVolume", CSettingsTestModule::SetHeadsetVolume ),
-        ENTRY( "SetSpeakerVolume", CSettingsTestModule::SetSpeakerVolume ),
-        ENTRY( "SetVolume", CSettingsTestModule::SetVolume ),
-        ENTRY( "SetOutputMode", CSettingsTestModule::SetOutputMode ),
-        ENTRY( "SetAudioRoute", CSettingsTestModule::SetAudioRoute ),
-        ENTRY( "SetHeadsetVolMuted", CSettingsTestModule::SetHeadsetVolMuted ),
-        ENTRY( "SetSpeakerVolMuted", CSettingsTestModule::SetSpeakerVolMuted ),
-        ENTRY( "SetVolMuted", CSettingsTestModule::SetVolMuted ),
-        ENTRY( "SetPowerOn", CSettingsTestModule::SetPowerOn ),
-        ENTRY( "SetTunedFrequency", CSettingsTestModule::SetTunedFrequency ),
-        ENTRY( "SetRegionId", CSettingsTestModule::SetRegionId ),
-        ENTRY( "SetCountryCode", CSettingsTestModule::SetCountryCode ),
-        ENTRY( "SetNetworkId", CSettingsTestModule::SetNetworkId ),
-        ENTRY( "tstSetRegionIdL", CSettingsTestModule::tstSetRegionIdL ),
-        ENTRY( "tstResetStartCount", CSettingsTestModule::tstResetStartCount ),
-        ENTRY( "ReadConfigurableKeysL", CSettingsTestModule::ReadConfigurableKeysL )
-        //ADD NEW ENTRY HERE
-
-        };
-
-    const TInt count = sizeof( KFunctions ) / 
-                        sizeof( TStifFunctionInfo );
-
-    return RunInternalL( KFunctions, count, aItem );
-
-    }
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::ExampleL
-// Example test method function.
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-TInt CSettingsTestModule::ExampleL( CStifItemParser& aItem )
-    {
-    FUNC_LOG;
-
-    // Print to UI
-    _LIT( KSettingsTestModule, "SettingsTestModule" );
-    _LIT( KExample, "In Example" );
-    TestModuleIf().Printf( 0, KSettingsTestModule, KExample );
-    // Print to log file
-    iLog->Log( KExample );
-
-    TInt i = 0;
-    TPtrC string;
-    _LIT( KParam, "Param[%i]: %S" );
-    while ( aItem.GetNextString ( string ) == KErrNone )
-        {
-        TestModuleIf().Printf( i, KSettingsTestModule, 
-                                KParam, i, &string );
-        ++i;
-        }
-
-    return KErrNone;
-
-    }
-
-//-----------------------------------------------------------------------------
-// CPresetUtilityTest::CreateSettingsL
-//-----------------------------------------------------------------------------
-TInt CSettingsTestModule::CreateSettingsL(
-    CStifItemParser& /*aItem*/ )
-    {
-    FUNC_LOG;
-    
-    TInt err = KErrNone;
-    if( !iSettings )
-        {
-        RadioEngineUtils::InitializeL();
-        TRAPD( err, iSettings = CRadioSettings::NewL() );
-        if ( KErrNone == err )
-            {
-            iSettings->RadioSetter().SetObserver( this );            
-            }
-        else
-            {
-            RadioEngineUtils::Release();
-            INFO_1( "CRadioSettings::NewL() failed err = %i", err )
-            User::Leave(err );
-            }
-        }
-    else
-        {
-        err = KErrArgument;
-        }
-
-    return err;
-    }
-
-
-//-----------------------------------------------------------------------------
-// CSettingsTestModule::DestroyiSettingsL
-//-----------------------------------------------------------------------------
-TInt CSettingsTestModule::DestroySettingsL(
-    CStifItemParser& /*aItem*/ )
-    {
-    FUNC_LOG;
-
-    delete iSettings;    
-    iSettings = NULL;
-    RadioEngineUtils::Release();
-    return KErrNone;
-    }
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::ResolveDriveL()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::ResolveDriveL( CStifItemParser& /*aItem*/ )
-{
-    FUNC_LOG;    
-    TFileName resourceFileName;
-    resourceFileName.Append( KRadioSettingsResourceFile );
-    iSettings->ResolveDriveL( resourceFileName, KDC_RESOURCE_FILES_DIR );
-    return KErrNone;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::IsRegionAllowed()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::IsRegionAllowed( CStifItemParser& /*aItem*/ )
-{
-    FUNC_LOG;
-    TRadioRegion regionId( iSettings->EngineSettings().RegionId() );
-    TUint currentAllowedStatus( iSettings->IsRegionAllowed( regionId ) );
-    TInt err( KErrNone);
-    INFO_1( "Failed: currentAllowedStatus=%i", currentAllowedStatus  );
-    return err;
-
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::IsFirstTimeStart()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::IsFirstTimeStart( CStifItemParser& aItem )
-{
-    FUNC_LOG;
-    TInt err( KErrNone);
-    TBool expectedFirstTimeStartStatus( EFalse );
-    // read parameters
-    if ( aItem.GetNextInt(expectedFirstTimeStartStatus) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: expectedFirstTimeStartStatus." );
-    }        
-    TBool firstTimeStartStatus( iSettings->ApplicationSettings().IsFirstTimeStart() );
-    if ( expectedFirstTimeStartStatus != firstTimeStartStatus )
-        {
-        INFO_2( "Failed: firstTimeStartStatus=%i, expectedFirstTimeStartStatus=%i.", firstTimeStartStatus, expectedFirstTimeStartStatus  );
-        err = KErrUnexpectedValue;
-        }
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::SetFirstTimeStart()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::SetFirstTimeStartPerformed( CStifItemParser& aItem )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TBool firstTimeStartPerformed( EFalse );
-    // read parameters
-    if ( aItem.GetNextInt( firstTimeStartPerformed ) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: firstTimeStartPerformed." );
-    }
-    
-    iSettings->ApplicationSettings().SetFirstTimeStartPerformed( firstTimeStartPerformed );
-    return err;
-}
-
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::SetUiFlags()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::SetUiFlags( CStifItemParser& aItem )
-{
-    FUNC_LOG;    
-    TUint uiFlags( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt(uiFlags) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: uiFlags." );
-    }
-    err = iSettings->ApplicationSettings().SetUiFlags( uiFlags );
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::UiFlags()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::UiFlags( CStifItemParser& aItem )
-{
-    FUNC_LOG;    
-    TUint expectedUiFlags( 0 );
-    TUint currentUiFlags( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt(expectedUiFlags) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: expectedUiFlags." );
-    }
-    currentUiFlags = iSettings->ApplicationSettings().UiFlags();
-    if ( expectedUiFlags != currentUiFlags )
-        {
-        INFO_2( "Failed: currentUiFlags=%i, expectedUiFlags=%i.", currentUiFlags, expectedUiFlags  );
-        err = KErrUnexpectedValue;
-        }
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::HeadsetVolume()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::HeadsetVolume( CStifItemParser& aItem )
-{
-    FUNC_LOG;    
-    TUint expectedVolume( 0 );
-    TUint currentVolume( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt(expectedVolume) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: expectedVolume." );
-    }
-    currentVolume = iSettings->EngineSettings().HeadsetVolume();
-    if ( expectedVolume != currentVolume )
-        {
-        INFO_2( "Failed: currentVolume=%i, expectedVolume=%i.", currentVolume, expectedVolume  );
-        err = KErrUnexpectedValue;
-        }
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::SetHeadsetVolume()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::SetHeadsetVolume( CStifItemParser& aItem )
-{
-    FUNC_LOG;    
-    TUint volume( 0 );
-    TInt err( KErrNone );
-    // read parameters
-    if ( aItem.GetNextInt(volume) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: volume." );
-    }
-    err = iSettings->RadioSetter().SetHeadsetVolume( volume );
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::SpeakerVolume()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::SpeakerVolume( CStifItemParser& aItem )
-{
-    FUNC_LOG;    
-    TUint expectedVolume( 0 );
-    TUint currentVolume( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt(expectedVolume) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: expectedVolume." );
-    }
-    currentVolume = iSettings->EngineSettings().SpeakerVolume();
-    if ( expectedVolume != currentVolume )
-        {
-        INFO_2( "Failed: currentVolume=%i, expectedVolume=%i.", currentVolume, expectedVolume  );
-        err = KErrUnexpectedValue;
-        }
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::SetSpeakerVolume()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::SetSpeakerVolume( CStifItemParser& aItem )
-{
-    FUNC_LOG;    
-    TUint volume( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt(volume) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: volume." );
-    }
-    err = iSettings->RadioSetter().SetSpeakerVolume( volume );
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::Volume()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::Volume( CStifItemParser& aItem )
-{
-    FUNC_LOG;    
-    TUint expectedVolume( 0 );
-    TUint currentVolume( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt(expectedVolume) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: expectedVolume." );
-    }
-    currentVolume = iSettings->EngineSettings().Volume();
-    if ( expectedVolume != currentVolume )
-        {
-        INFO_2( "Failed: currentVolume=%i, expectedVolume=%i.", currentVolume, expectedVolume  );
-        err = KErrUnexpectedValue;
-        }
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::SetVolume()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::SetVolume( CStifItemParser& aItem )
-{
-    FUNC_LOG;    
-    TUint volume( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt(volume) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: volume." );
-    }
-    err = iSettings->RadioSetter().SetVolume( volume );
-    return err;
-}
-
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::OutputMode()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::OutputMode( CStifItemParser& aItem )
-{
-    FUNC_LOG;    
-    TUint expectedMode( 0 );
-    TUint currentMode( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt(expectedMode) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: expectedMode." );
-    }
-    currentMode = iSettings->EngineSettings().OutputMode();
-    if ( expectedMode != currentMode )
-        {
-        INFO_2( "Failed: currentMode=%i, expectedMode=%i.", currentMode, expectedMode  );
-        err = KErrUnexpectedValue;
-        }
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::SetOutputMode()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::SetOutputMode( CStifItemParser& aItem )
-{
-    FUNC_LOG;    
-    TUint mode( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt(mode) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: mode." );
-    }
-    err = iSettings->RadioSetter().SetOutputMode( mode );
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::AudioRoute()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::AudioRoute( CStifItemParser& aItem )
-{
-    FUNC_LOG;    
-    TUint expectedRoute( 0 );
-    TUint currentRoute( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt(expectedRoute) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: expectedRoute." );
-    }
-    currentRoute = iSettings->EngineSettings().AudioRoute();
-    if ( expectedRoute != currentRoute )
-        {
-        INFO_2( "Failed: currentMode=%i, expectedRoute=%i.", currentRoute, expectedRoute  );
-        err = KErrUnexpectedValue;
-        }
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::SetAudioRoute()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::SetAudioRoute( CStifItemParser& aItem )
-{
-    FUNC_LOG;    
-    TUint route( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt(route) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: route." );
-    }
-    err = iSettings->RadioSetter().SetAudioRoute( route );
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::IsHeadsetVolMuted()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::IsHeadsetVolMuted( CStifItemParser& aItem )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TUint expectedMuteStatus( 0 );
-    TUint currentMuteStatus( 0 );
-    
-    // read parameters
-    if ( aItem.GetNextInt(expectedMuteStatus) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: expectedMuteStatus." );
-    }
-    currentMuteStatus = iSettings->EngineSettings().IsHeadsetVolMuted();
-    if ( currentMuteStatus != expectedMuteStatus )
-        {
-        INFO_2( "Failed: currentMuteStatus=%i, expectedMuteStatus=%i.", currentMuteStatus, expectedMuteStatus  );
-        err = KErrUnexpectedValue;
-        }
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::SetHeadsetVolMuted()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::SetHeadsetVolMuted( CStifItemParser& aItem )
-{
-    FUNC_LOG;    
-    TUint muteStatus( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt(muteStatus) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: muteStatus." );
-    }
-    err = iSettings->RadioSetter().SetHeadsetVolMuted( muteStatus );
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::IsSpeakerVolMuted()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::IsSpeakerVolMuted( CStifItemParser& aItem )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TUint expectedMuteStatus( 0 );
-    TUint currentMuteStatus( 0 );
-    
-    // read parameters
-    if ( aItem.GetNextInt(expectedMuteStatus) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: expectedMuteStatus." );
-    }
-    currentMuteStatus = iSettings->EngineSettings().IsSpeakerVolMuted();
-    if ( currentMuteStatus != expectedMuteStatus )
-        {
-        INFO_2( "Failed: currentMuteStatus=%i, expectedMuteStatus=%i.", currentMuteStatus, expectedMuteStatus  );
-        err = KErrUnexpectedValue;
-        }
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::SetSpeakerVolMuted()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::SetSpeakerVolMuted( CStifItemParser& aItem )
-{
-    FUNC_LOG;    
-    TUint muteStatus( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt(muteStatus) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: muteStatus." );
-    }
-    err = iSettings->RadioSetter().SetSpeakerVolMuted( muteStatus );
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::IsVolMuted()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::IsVolMuted( CStifItemParser& aItem )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TUint expectedMuteStatus( 0 );
-    TUint currentMuteStatus( 0 );
-    
-    // read parameters
-    if ( aItem.GetNextInt(expectedMuteStatus) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: expectedMuteStatus." );
-    }
-    currentMuteStatus = iSettings->EngineSettings().IsVolMuted();
-    if ( currentMuteStatus != expectedMuteStatus )
-        {
-        INFO_2( "Failed: currentMuteStatus=%i, expectedMuteStatus=%i.", currentMuteStatus, expectedMuteStatus  );
-        err = KErrUnexpectedValue;
-        }
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::SetVolMuted()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::SetVolMuted( CStifItemParser& aItem )
-{
-    FUNC_LOG;    
-    TUint muteStatus( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt(muteStatus) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: muteStatus." );
-    }
-    err = iSettings->RadioSetter().SetVolMuted( muteStatus );
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::IsPowerOn()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::IsPowerOn( CStifItemParser& aItem )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TUint expectedPowerStatus( 0 );
-    TUint currentPowerStatus( 0 );
-    
-    // read parameters
-    if ( aItem.GetNextInt(expectedPowerStatus) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: expectedPowerStatus." );
-    }
-    currentPowerStatus = iSettings->EngineSettings().IsPowerOn();
-    if ( currentPowerStatus != expectedPowerStatus )
-        {
-        INFO_2( "Failed: currentPowerStatus=%i, expectedPowerStatus=%i.", currentPowerStatus, expectedPowerStatus  );
-        err = KErrUnexpectedValue;
-        }
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::SetPowerOn()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::SetPowerOn( CStifItemParser& aItem )
-{
-    FUNC_LOG;    
-    TUint powerStatus( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt(powerStatus) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: powerStatus." );
-    }
-    err = iSettings->RadioSetter().SetPowerOn( powerStatus );
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::TunedFrequency()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::TunedFrequency( CStifItemParser& aItem )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TUint expectedTunedFrequency( 0 );
-    TUint currentTunedFrequency( 0 );
-    
-    // read parameters
-    if ( aItem.GetNextInt(expectedTunedFrequency) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: expectedTunedFrequency." );
-    }
-    currentTunedFrequency = iSettings->EngineSettings().TunedFrequency();
-    if ( currentTunedFrequency != expectedTunedFrequency )
-        {
-        INFO_2( "Failed: currentTunedFrequency=%i, expectedTunedFrequency=%i.", currentTunedFrequency, expectedTunedFrequency  );
-        err = KErrUnexpectedValue;
-        }
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::SetTunedFrequency()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::SetTunedFrequency( CStifItemParser& aItem )
-{
-    FUNC_LOG;    
-    TUint tunedFrequency( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt( tunedFrequency ) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: tunedFrequency." );
-    }
-    err = iSettings->RadioSetter().SetTunedFrequency( tunedFrequency );
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::DefaultMinVolumeLevel()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::DefaultMinVolumeLevel( CStifItemParser& /*aItem*/ )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TUint currentDefaultMinVolumeLevel( iSettings->EngineSettings().DefaultMinVolumeLevel() );
-    INFO_1( "OK currentDefaultMinVolumeLevel=%i", currentDefaultMinVolumeLevel );
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::CountRegions()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::CountRegions( CStifItemParser& /*aItem*/ )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-     TUint currentRegionCount( iSettings->EngineSettings().CountRegions() );
-    INFO_1( "OK currentRegionCount=%i", currentRegionCount );
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::Region()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::Region( CStifItemParser& /*aItem*/ )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TInt regionIndex( iSettings->EngineSettings().RegionId() );
-    //CRadioRegion& radioRegion( iSettings->EngineSettings().RegionIndexForId( regionIndex ) );
-    // 17.5.2010: Region handling has to be reimplemented anyways, so don't make any detailed tets
-    // Above won't work because called function RegionIndexForId() is private one.
-    
-    return err;
-}
-
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::RegionId()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::RegionId( CStifItemParser& aItem )
-{
-    FUNC_LOG;
-    TInt expectedRegionIndex( 0 );
-    TInt currentRegionIndex( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt( expectedRegionIndex ) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: expectedRegionIndex." );
-    }
-    currentRegionIndex = iSettings->EngineSettings().RegionId();
-    if ( currentRegionIndex != expectedRegionIndex )
-        {
-        INFO_2( "Failed: currentRegionIndex=%i, expectedRegionIndex=%i.", currentRegionIndex, expectedRegionIndex );
-        err = KErrUnexpectedValue;
-        }
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::SetRegionId()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::SetRegionId( CStifItemParser& aItem )
-{
-    FUNC_LOG;    
-    TInt regionId( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt( regionId ) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: regionId." );
-    }
-    err = iSettings->RadioSetter().SetRegionId( regionId );
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::FrequencyStepSize()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::FrequencyStepSize( CStifItemParser& /*aItem*/ )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TUint32 currentFrequencyStepSize( iSettings->EngineSettings().FrequencyStepSize() );
-    INFO_1( "OK currentFrequencyStepSize=%i", currentFrequencyStepSize );
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::MaxFrequency()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::MaxFrequency( CStifItemParser& /*aItem*/ )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TUint32 currentMaxFrequency( iSettings->EngineSettings().MaxFrequency() );
-    INFO_1( "OK currentMaxFrequency=%i", currentMaxFrequency );
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::MinFrequency()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::MinFrequency( CStifItemParser& /*aItem*/ )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TUint32 currentMinFrequency( iSettings->EngineSettings().MinFrequency() );
-    INFO_1( "OK currentMinFrequency=%i", currentMinFrequency );
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::DecimalCount()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::DecimalCount( CStifItemParser& /*aItem*/ )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TInt currentDecimalCount( iSettings->EngineSettings().DecimalCount() );
-    INFO_1( "OK currentDecimalCount=%i", currentDecimalCount );
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::DefaultRegion()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::DefaultRegion( CStifItemParser& /*aItem*/ )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TRadioRegion defaultRegion( iSettings->EngineSettings().DefaultRegion() );
-    INFO_1( "OK defaultRegion=%i", defaultRegion );
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::NetworkId()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::NetworkId( CStifItemParser& aItem )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TPtrC expectedNetworkId;
-    if ( aItem.GetNextString(expectedNetworkId) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: expectedNetworkId." );
-    }
-    INFO_1( "expectedNetworkId=%S.", &expectedNetworkId  );
-    TPtrC actualNetworkId( iSettings->EngineSettings().NetworkId() );
-    if ( !actualNetworkId.Compare( expectedNetworkId ) )
-    {
-        INFO_2( "Failed: actualNetworkId=%S, expectedNetworkId=%S.", &actualNetworkId, &expectedNetworkId  );
-        err = KErrUnexpectedValue;
-    }
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::CountryCode()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::CountryCode( CStifItemParser& aItem )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TPtrC expectedCountryCode;
-    if ( aItem.GetNextString(expectedCountryCode) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: expectedCountryCode." );
-    }
-    INFO_1( "expectedCountryCode=%S.", &expectedCountryCode  );
-    TPtrC actualCountryCode( iSettings->EngineSettings().CountryCode() );
-    if ( !actualCountryCode.Compare( expectedCountryCode ) )
-    {
-        INFO_2( "Failed: actualCountryCode=%S, expectedCountryCode=%S.", &actualCountryCode, &expectedCountryCode  );
-        err = KErrUnexpectedValue;
-    }
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::SetNetworkId()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::SetNetworkId( CStifItemParser& aItem )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TPtrC networkId;
-    aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing );
-    if ( aItem.GetNextString(networkId) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: networkId." );
-    }
-    err = iSettings->RadioSetter().SetNetworkId( networkId );
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::SetCountryCode()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::SetCountryCode( CStifItemParser& aItem )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TPtrC countryCode;
-    aItem.SetParsingType( CStifItemParser::EQuoteStyleParsing );
-    if ( aItem.GetNextString(countryCode) )
-    {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: countryCode." );
-    }
-    err = iSettings->RadioSetter().SetCountryCode( countryCode );
-    return err;
-}
-
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::ReadConfigurableKeysL()
-// Returns: Errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::ReadConfigurableKeysL( CStifItemParser& /*aItem*/ )
-{
-    FUNC_LOG;
-    TInt err( KErrNone );
-    TInt regionAllowed( EFalse );
-    CRepository* cr( CRepository::NewL(KRadioCRUid) );
-    if ( cr )
-        {
-        cr->Get( KRadioCRRegionAllowedJapan, regionAllowed );
-        delete cr;
-        }
-    INFO_1( "KRadioCRRegionAllowedJapan status = %i", regionAllowed  );
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::RdsAfSearchSettingChangedL()
-// Returns: None.
-// -----------------------------------------------------------------------------
-void CSettingsTestModule::RdsAfSearchSettingChangedL( TBool /*aEnabled*/ )
-{
-    FUNC_LOG;    
-}
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::RegionSettingChangedL()
-// Returns: None.
-// -----------------------------------------------------------------------------
-void CSettingsTestModule::RegionSettingChangedL( TInt /*aRegion*/ )
-{
-    FUNC_LOG;
-    iRegionSettingChangeNotified = ETrue;   
-}
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::tstSetRegionIdL()
-// Returns: errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::tstSetRegionIdL( CStifItemParser& aItem )
-{
-    FUNC_LOG;
-    TInt regionId( 0 );
-    TInt err( KErrNone );
-    
-    // read parameters
-    if ( aItem.GetNextInt( regionId ) )
-        {
-        err = KErrBadTestParameter;
-        ERROR( err, "Missing Parameter: regionId." );
-        }
-    CRepository* cr( CRepository::NewLC(KRadioCRUid) );
-    User::LeaveIfError( cr->Set( KRadioCRCurrentRegion,  regionId ) );
-    CleanupStack::Pop(cr);
-    delete cr;
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModule::tstResetStartCount()
-// Returns: errors.
-// -----------------------------------------------------------------------------
-TInt CSettingsTestModule::tstResetStartCount( CStifItemParser& /*aItem*/ )
-{
-    FUNC_LOG;
-    TInt countResetValue( 0 );
-    TInt err( KErrNone );
-    
-    CRepository* cr( CRepository::NewLC(KRadioCRUid) );
-    User::LeaveIfError( cr->Set( KRadioCRLaunchCount,  countResetValue ) );
-    CleanupStack::Pop(cr);
-    delete cr;
-    return err;
-}
-
-// -----------------------------------------------------------------------------
-// CSettingsTestModuleModule::?member_function
-// ?implementation_description
-// (other items were commented in a header).
-// -----------------------------------------------------------------------------
-//
-/*
-TInt CSettingsTestModule::?member_function(
-   CItemParser& aItem )
-   {
-   FUNC_LOG;
-
-   ?code
-
-   }
-*/
-
-// ========================== OTHER EXPORTED FUNCTIONS =========================
-// None
-
-//  [End of File] - Do not remove
--- a/radioengine/utils/api/cradioaudiorouter.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,85 +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 C_RADIOAUDIOROUTER_H
-#define C_RADIOAUDIOROUTER_H
-
-#include <e32base.h>
-
-#include "radioenginedef.h"
-
-// Forward declarations
-class CRadioRoutableAudio;
-class MRadioAudioRoutingObserver;
-
-/**
- * CRadioAudioRouter
- *
- */
-NONSHARABLE_CLASS( CRadioAudioRouter ) : public CBase
-    {
-public:
-
-    IMPORT_C static CRadioAudioRouter* NewL( MRadioAudioRoutingObserver& aAudioRoutingObserver );
-
-    IMPORT_C ~CRadioAudioRouter();
-
-    /**
-     * Sets audio route
-     *
-     * @param aAudioRoute new audio route
-     */
-    IMPORT_C void SetAudioRouteL( RadioEngine::TRadioAudioRoute aAudioRoute );
-
-    /**
-     * Register routable audio which routing will be changed via this class.
-     *
-     * @param aRoutableAudio audio which routing will be added to routable
-     * audios. Ownership is not moved.
-     */
-    IMPORT_C void RegisterRoutableAudio( CRadioRoutableAudio* aRoutableAudio );
-
-    /**
-     * Removes registration of routable audio.
-     *
-     * @param aRoutableAudio audio which routing registration will be
-     * removed. Ownership is not moved.
-     */
-    IMPORT_C void UnRegisterRoutableAudio( CRadioRoutableAudio* aRoutableAudio );
-
-private:
-
-    CRadioAudioRouter( MRadioAudioRoutingObserver& aAudioRoutingObserver );
-
-    void ConstructL();
-
-private: // data
-
-    /**
-     * Reference to audio routing observer. Gets informed when audio routing
-     * is changed.
-     */
-    MRadioAudioRoutingObserver& iAudioRoutingObserver;
-
-    /**
-     * Contains routable audios.
-     */
-    RArray<CRadioRoutableAudio*> iRoutableAudios;
-
-    };
-
-#endif // C_RADIOAUDIOROUTER_H
--- a/radioengine/utils/api/cradioenginelogger.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,512 +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 C_RADIOENGINELOGGER_H
-#define C_RADIOENGINELOGGER_H
-
-// System includes
-#include <e32base.h>
-
-// User includes
-#include "mradioenginelogger.h"
-
-/**
- * Main logging macro.
- * When the macro is defined, logging is on
- */
-#ifdef _DEBUG
-    #define LOGGING_ENABLED
-#endif
-
-#define LOGGING_LEVEL 1
-
-/**
- * Logging level macro definitions
- * Level 1 - No level macro needed. The trace is shown when logging is on.
- * Level 2 - Wrap log line with LEVEL2 macro. Traces of level 1 and 2 are shown.
- * Level 3 - Wrap log line with LEVEL3 macro. Traces of level 1, 2 and 3 are shown.
- */
-#if LOGGING_LEVEL == 2
-#   define LEVEL2( expr ) expr
-#   define LEVEL3( expr )
-#elif LOGGING_LEVEL == 3
-#   define LEVEL2( expr ) expr
-#   define LEVEL3( expr ) expr
-#else
-#   define LEVEL2( expr )
-#   define LEVEL3( expr )
-#endif
-
-#ifdef LOGGING_ENABLED
-
-/**
- * Debug var macros for all logging levels
- */
-#if LOGGING_LEVEL == 2
-#   define DEBUGVAR( var ) var
-#   define DEBUGVAR2( var ) var
-#   define DEBUGVAR3( var )
-#elif LOGGING_LEVEL == 3
-#   define DEBUGVAR( var ) var
-#   define DEBUGVAR2( var ) var
-#   define DEBUGVAR3( var ) var
-#else
-#   define DEBUGVAR( var ) var
-#   define DEBUGVAR2( var )
-#   define DEBUGVAR3( var )
-#endif
-
-/**
- * Log file path.
- * If the path points to memory card and the card is not present or is read only,
- * the log is written to C: drive.
- */
-_LIT( KLogFile, "c:\\logs\\radio\\radioenginelog.txt" );
-
-/**
- * Logging buffer length. Should be big enough to hold one line of text
- */
-const TInt KLogBufferLength = 512;
-
-
-// ===========================================================================
-// ===========================================================================
-//
-// BEGIN LOGGING MACROS. Use these to write log prints
-//
-// ===========================================================================
-// ===========================================================================
-
-// All macros except LOG_METHOD and LOG_METHOD_RET are enclosed in do { }while( 0 );
-// statements to make them form a complete code block that can be used anywhere.
-
-/**
- * Function entry, exit and leave logging.
- *
- *  @code
- *   LOG_METHOD( "CSomeClass::SomeFunctionL" );
- *  @endcode
- */
-#define LOG_METHOD( func ) TRadioMethodLogger ___methodLogger( _S( func ), _S( "" ) )
-
-/**
- * Function entry, exit and leave logging.
- * Gets the function name automatically
- *
- *  @code
- *   LOG_METHOD_AUTO;
- *  @endcode
- */
-// Substract 1 from MaxLength() because PtrZ() adds the zero terminator
-#define LOG_METHOD_AUTO \
-    TPtrC8 __ptr8( (const TUint8*)__PRETTY_FUNCTION__ ); \
-    TBuf<150> __buf; \
-    __buf.Copy( __ptr8.Left( __buf.MaxLength() - 1 ) ); \
-    TRadioMethodLogger ___methodLogger( __buf.PtrZ(), _S( "" ) )
-
-/**
- * Function entry, exit and leave logging. Logs also returned value
- * NOTE! At the moment return value is only logged in emulator builds.
- *
- *  @code
- *   // Function returns an integer value
- *   LOG_METHOD_RET( "CSomeClass::SomeFunctionL", "Error: %d" );
- *
- *   // Function returns an HBufC pointer
- *   LOG_METHOD_RET( "CSomeClass::SomeFunctionL", "HBufC: %S" );
- *  @endcode
- */
-#define LOG_METHOD_RET( func,fmt ) TRadioMethodLogger ___methodLogger( _S( func ), _S( fmt ) )
-
-/**
- * Function entry, exit and leave logging. Logs also returned value
- * Gets the function name automatically
- * NOTE! At the moment return value is only logged in emulator builds.
- *
- *  @code
- *   // Function returns an integer value
- *   LOG_METHOD_RET( "CSomeClass::SomeFunctionL", "Error: %d" );
- *
- *   // Function returns an HBufC pointer
- *   LOG_METHOD_RET( "CSomeClass::SomeFunctionL", "HBufC: %S" );
- *  @endcode
- */
-// Substract 1 from MaxLength() because PtrZ() adds the zero terminator
-#define LOG_METHOD_AUTO_RET( fmt ) \
-    TPtrC8 __ptr8( (const TUint8*)__PRETTY_FUNCTION__ ); \
-    TBuf<150> __buf; \
-    __buf.Copy( __ptr8.Left( __buf.MaxLength() - 1 ) ); \
-    TRadioMethodLogger ___methodLogger( __buf.PtrZ(), _S( fmt ) )
-
-/**
- * Simple assert macro that works like normal asserts. The expression ( expr ) is
- * expected to be true in which case nothing is done. If the expression is false the
- * statement ( stmt ) is executed.
- *
- * Note! As with normal asserts, do not put a function call as the expression because
- * it will not be executed when logging is off!
- *
- *  @code
- *   // Log error code if it is not KErrNone
- *   TRAPD( err, SomeFunctionL() );
- *   MTV_ASSERT( !err, LOG_FORMAT( "Operation failed. error: %d", err ) );
- *  @endcode
- */
-#define LOG_ASSERT( expr, stmt ) do { if ( !( expr )) { stmt; } }while( 0 )
-
-/**
- * Writes a formatted string to log. Accepts variable number of parameters
- *
- *  @code
- *   LOG_FORMAT( "Integer: %d", 1 );
- *   LOG_FORMAT( "Integer: %d Desc %S", 1, &desc );
- *   LOG_FORMAT( "Integer: %d Desc %S hex 0x%X", 1, &desc, 0xC0FFEE );
- *  @endcode
- */
-#define LOG_FORMAT( fmt,args...) do{MRadioEngineLogger::Logger()->AddIndent( KMarkerEngine()).AddFormat( _L( fmt ),args ).Commit();}while( 0 )
-
-/**
- * Writes current time to log. Example: Time: 13.9.2007 13:23:25.383750
- */
-#define LOG_CURRENT_TIME() do{MRadioEngineLogger::Logger()->AddIndent( KMarkerEngine()).AddTimestamp().Commit();}while( 0 )
-
-/**
- * Writes a time to log. Accepts a TTime as parameter
- *
- *  @code
- *   TTime now;
- *   now.HomeTime();
- *   LOG_TIME( now );
- *  @endcode
- */
-#define LOG_TIME( x ) do{MRadioEngineLogger::Logger()->AddIndent( KMarkerEngine()).AddTimestamp( x ).Commit();}while( 0 )
-
-/**
- * Writes a time to log. Accepts a string and a TTime as parameter
- *
- *  @code
- *   TTime now;
- *   now.HomeTime();
- *   LOG_TIME2( "Current time", now );
- *  @endcode
- */
-#define LOG_TIME2( desc, time ) do{MRadioEngineLogger::Logger()->AddIndent( KMarkerEngine()).Add( desc ).Add( ": " ).Add( time ).Commit();}while( 0 )
-
-/**
- * Clear the log contents
- */
-#define LOG_CLEAR() do{MRadioEngineLogger::Logger()->ClearLog();}while( 0 )
-
-/**
- * Construct a log line one item at a time. No newline at end
- */
-//#define LOG( x ) do{CRadioEngineLogger::Logger()->Add( x );}while( 0 )
-
-/**
- * Write a newline to log
- */
-#define LOG_NEWLINE() do{MRadioEngineLogger::Logger()->Commit();}while( 0 )
-
-/**
- * Macro that behaves like User::LeaveIfError except it logs the leave
- * The line "TInt __error_code = expr;" makes sure the expression is evaluated only once
- */
-#define LEAVEIFERROR( expr )                                                \
-    do {                                                                    \
-        TInt __err = expr;                                                  \
-        if ( __err )                                                        \
-            {                                                               \
-            _LIT( KExpression, #expr );                                     \
-            LOG_FORMAT( "%S leaving with code %d!", &KExpression, __err );  \
-            User::Leave( __err );                                           \
-            }                                                               \
-        } while( 0 )
-
-/**
- * Macro that behaves like User::Leave except it logs the leave
- * The line "TInt __error_code = expr;" makes sure the expression is evaluated only once
- */
-#define LEAVE( expr )                                   \
-    do {                                                \
-        TInt __err = expr;                              \
-        LOG_FORMAT( "Leaving with code %d!", __err );   \
-        User::Leave( __err );                           \
-        } while( 0 )
-
-/**
- * Macro that behaves like TRAP except it logs the possible error
- */
-#define TRAP_AND_LOG_ERR( err, expr )                               \
-    TRAP( err, expr );                                              \
-    if ( err )                                                      \
-        {                                                           \
-        _LIT( KExpression, #expr );                                 \
-        LOG_FORMAT( "%S failed with err %d", &KExpression, err );   \
-        }                                                           \
-
-/**
- * Macro that behaves like TRAPD except it logs the possible error
- */
-#define TRAPD_AND_LOG_ERR( err, expr )  \
-    TInt err = 0;                       \
-    TRAP_AND_LOG_ERR( err, expr )
-
-
-/**
- * Macro that behaves like TRAP_IGNORE except it logs the possible error
- */
-#define TRAP_IGNORE_AND_LOG_ERR( expr )     \
-    do {                                    \
-        TRAPD_AND_LOG_ERR( __err, expr );     \
-        } while ( 0 )
-
-/**
- * Write a single log line.
- */
-#define LOGGER_WRITE( x ) do{MRadioEngineLogger::Logger()->AddIndent( KMarkerEngine ).Add( _L8( x ) ).Commit();}while( 0 )
-#define LOG( x ) do{MRadioEngineLogger::Logger()->AddIndent( KMarkerEngine ).Add( x ).Commit();}while( 0 )
-//#define LOG2( x1, x2 ) do{CRadioEngineLogger::Logger()->AddIndent().Add( x1 ).Add( x2 ).Commit();}while( 0 )
-//#define LOG3( x1, x2, x3 ) do{CRadioEngineLogger::Logger()->AddIndent().Add( x1 ).Add( x2 ).Add( x3 ).Commit();}while( 0 )
-//#define LOG4( x1, x2, x3, x4 ) do{CRadioEngineLogger::Logger()->AddIndent().Add( x1 ).Add( x2 ).Add( x3 ).Add( x4 ).Commit();}while( 0 )
-//#define LOG5( x1, x2, x3, x4, x5 ) do{CRadioEngineLogger::Logger()->AddIndent().Add( x1 ).Add( x2 ).Add( x3 ).Add( x4 ).Add( x5 ).Commit();}while( 0 )
-
-// ===========================================================================
-// ===========================================================================
-//
-// END LOGGING MACROS. Do not use anything below this line directly!
-//
-// ===========================================================================
-// ===========================================================================
-
-
-#include <f32file.h>
-#include <e32debug.h>
-
-class TRadioMethodLogger;
-
-const TInt KTimestampLength = 40;
-typedef TBuf8<KTimestampLength> TTimestamp;
-
-/**
- * Logger for writing log to a file and RDebug
- *
- *  @lib mtvcommon.lib
- *  @since Live TV UI v1.0
- */
-NONSHARABLE_CLASS( CRadioEngineLogger ) : public CBase
-                                        , public MRadioEngineLogger
-                                        , public TDes16Overflow
-    {
-    friend class CRadioEngineTls;
-public:
-
-// from base class MRadioEngineLogger
-
-    MRadioEngineLogger& ClearLog();
-    MRadioEngineLogger& Add( const TDesC8& aMsg );
-    MRadioEngineLogger& Add( const TDesC& aMsg );
-    MRadioEngineLogger& Add( TInt aInt );
-    MRadioEngineLogger& Add( const TReal& aReal );
-    MRadioEngineLogger& Add( const char* aText );
-    MRadioEngineLogger& Add( const TAny* aPtr );
-    MRadioEngineLogger& Add( const TTime& aTime );
-    MRadioEngineLogger& AddTimestamp();
-    MRadioEngineLogger& AddFormat( TRefByValue<const TDesC> aFmt, ... );
-    MRadioEngineLogger& AddIndent( const TDesC& aMarker );
-    MRadioEngineLogger& AddIndentClear( const TDesC& aMarker );
-    MRadioEngineLogger& IncIndent();
-    MRadioEngineLogger& DecIndent();
-    MRadioEngineLogger& Commit( TBool aNewLine = ETrue );
-
-// from base class TDes16Overflow
-
-    /**
-     * Handles the overflow from AppendFormatList()
-     *
-     * @since Live TV UI v1.0
-     * @param aDes The 16-bit modifiable descriptor whose overflow results in the
-     *             call to this overflow handler.
-     */
-    void Overflow( TDes16 &aDes );
-
-private:
-
-    static CRadioEngineLogger* NewL( RFs& aFs );
-
-    ~CRadioEngineLogger();
-
-    CRadioEngineLogger( RFs& aFs );
-
-    void ConstructL();
-
-    /**
-     * Returns the amount of characters that still fit in the buffer
-     *
-     * @since Live TV UI v1.0
-     * @return Amount of space available
-     */
-    TInt Available() const;
-
-    /**
-     * Templated function to add either 8-bit or 16-bit descriptor to buffer
-     *
-     * @since Live TV UI v1.0
-     * @param aDesc Descriptor to add
-     */
-    template<class PTR, class DESC>
-    void AddDesC( const DESC& aDesc );
-
-    /**
-     * Parses the timestamp from the given TTime
-     *
-     * @since Live TV UI v1.0
-     * @param aTime Time to parse
-     * @param aTimestamp On return, the parsed timestamp
-     */
-    void ParseTimestamp( const TTime& aTime, TTimestamp& aTimestamp );
-
-private: // data
-
-    /**
-     * Reference to file server session.
-     */
-    RFs&    iFs;
-
-    /**
-     * File handle
-     */
-    RFile   iFile;
-
-    /**
-     * Name of the log file.
-     * Own.
-     */
-    HBufC*  iFileName;
-
-    /**
-     * Logging buffer. holds one log line at a time
-     */
-    TBuf8<KLogBufferLength> iBuf8;
-
-    /**
-     * Indentation
-     */
-    TInt    iIndent;
-
-    /**
-     * Flag to indicate whether or not timestamp has already been written to the beginning of line
-     */
-    TBool   iTimeStampWritten;
-
-    };
-
-/**
- * Helper class for method entry, exit and leave logging.
- * Used as automatic variable declared by LOG_METHOD() macro.
- */
-NONSHARABLE_CLASS( TRadioMethodLogger )
-    {
-public:
-
-    /**
-     * Constructor. Writes method entry log.
-     */
-    IMPORT_C TRadioMethodLogger( const TText* aFunc, const TText* aRetFormat );
-
-    /**
-     * Destructor. Writes method exit log.
-     */
-    IMPORT_C ~TRadioMethodLogger();
-
-private: // data
-
-    /**
-     * Pointer descriptor to function signature that is to be logged.
-     */
-    TPtrC iFunc;
-
-    /**
-     * Formatting string used to print the function return value
-     */
-    TPtrC iRetFormat;
-
-    };
-
-#else // LOGGING_ENABLED
-
-// Empty macro definitions for non logging build.
-
-#define LOG_METHOD_AUTO
-#define LOG_METHOD_AUTO_RET( fmt )
-
-#define LOG_METHOD( func )
-#define LOG_METHOD_RET( func,fmt )
-#define LOG_FORMAT( fmt,args...)
-#define LOG_ASSERT( expr, stmt )
-#define DEBUGVAR( var )
-#define DEBUGVAR2( var )
-#define DEBUGVAR3( var )
-
-#define LOG_CURRENT_TIME()
-#define LOG_TIME( x )
-#define LOG_TIME2( desc, time )
-
-#define LOG_CLEAR()
-#define LOG( x )
-#define LOG_NEWLINE()
-#define LOG1( x )
-#define LOG2( x1, x2 )
-#define LOG3( x1, x2, x3 )
-#define LOG4( x1, x2, x3, x4 )
-#define LOG5( x1, x2, x3, x4, x5 )
-
-// Default implementations for leave macros.
-// Note! These can NOT be empty macros because the errors would not be checked when logging is off
-#define LEAVEIFERROR( expr )    User::LeaveIfError( expr )
-#define LEAVE( expr )           User::Leave( expr )
-
-// Default implementation for trap macros
-// Note! As with leave macros, these can not be empty
-#define TRAP_AND_LOG_ERR( err,stmt )      TRAP( err, stmt )
-#define TRAPD_AND_LOG_ERR( err,stmt )     TRAPD( err, stmt )
-#define TRAP_IGNORE_AND_LOG_ERR( stmt )   TRAP_IGNORE( stmt )
-
-#define LOGGER_WRITE( x )
-
-// ===========================================================================
-// Dummy classes to keep the exports unchanged when logging is turned off
-// These can not be used.
-// ===========================================================================
-class RFs;
-NONSHARABLE_CLASS( CRadioEngineLogger ) : public CBase
-    {
-    friend class CRadioEngineImp;
-private:
-    static void InitializeL( RFs& aFs );
-    static void Release();
-    };
-
-NONSHARABLE_CLASS( TRadioMethodLogger )
-    {
-public:
-    IMPORT_C TRadioMethodLogger( const TText* /*aFunc*/, const TText* /*aRetFormat*/ );
-    IMPORT_C ~TRadioMethodLogger();
-    };
-
-#endif // LOGGING_ENABLED
-
-#endif // C_RADIOENGINELOGGER_H
--- a/radioengine/utils/api/cradioremcontarget.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,45 +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 CRADIOREMCONTARGET_H
-#define CRADIOREMCONTARGET_H
-
-// System includes
-#include <e32base.h>
-
-// Forward declarations
-class MRadioControlEventObserver;
-
-// Class declaration
-
-NONSHARABLE_CLASS( CRadioRemConTarget ) : public CBase
-    {
-public:
-
-    IMPORT_C static CRadioRemConTarget* NewL();
-
-    virtual ~CRadioRemConTarget();
-
-    /**
-     * Sets control event observer.
-     * @param aControlEventObserver the observer for control events
-     */
-    virtual void SetControlEventObserver( MRadioControlEventObserver* aControlEventObserver ) = 0;
-
-    };
-
-#endif // CRADIOREMCONTARGET_H
--- a/radioengine/utils/api/cradioroutableaudio.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,95 +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 C_RADIOROUTABLEAUDIO_H
-#define C_RADIOROUTABLEAUDIO_H
-
-// System includes
-#include <e32base.h>
-
-// User includes
-#include "radioenginedef.h"
-
-// Forward declarations
-class CAudioOutput;
-class CRadioAudioRouter;
-
-/**
- * CRadioRoutableAudio
- *
- * Defines common functionality for routable audio sources by defining common
- * skeleton method for routing.
- *
- */
-class CRadioRoutableAudio : public CBase
-    {
-
-public:
-
-    IMPORT_C CRadioRoutableAudio( CRadioAudioRouter* aAudioRouter );
-
-    IMPORT_C ~CRadioRoutableAudio();
-
-    /**
-     * Sets audio routing. Please note that subclasses must define
-     * <code>RoutedAudio</code> method otherwise this will not do anything.
-     * @param aDestination 'Not documented'? old documentation: if <code>true</code> audio routing will be set to
-     * speaker otherwise to headset.
-     */
-    IMPORT_C void SetAudioRouteL( RadioEngine::TRadioAudioRoute aRoute );
-
-    /**
-     * Tells if audio routing is supported
-     * @return EFalse if routing is not supported, otherwise true
-     */
-    IMPORT_C TBool AudioRoutingSupported() const;
-
-protected:
-
-    /**
-     * Sets audio output. Must be called from subclass.
-     * Ownership is moved.
-     * @param aAudioOutput for setting routing.
-     */
-    IMPORT_C void SetAudioOutput( CAudioOutput* aAudioOutput );
-
-    /**
-     * Deletes audio output.
-     * Must be called from subclass before
-     * the actual audio utility class is deleted.
-     */
-    IMPORT_C void DeleteAudioOutput();
-
-protected: //data
-
-    /**
-     * Routes audio. Used to register/unregister this routable audio for routing.
-     * Own.
-     */
-    CRadioAudioRouter* iAudioRouter;
-
-private: // data
-
-    /**
-     * AudioOutput for setting routing.
-     * Own.
-     */
-    CAudioOutput*       iAudioOutput;
-
-    };
-
-#endif // C_RADIOROUTABLEAUDIO_H
--- a/radioengine/utils/api/cradiosystemeventcollector.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,84 +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 CRADIOSYSTEMEVENTCOLLECTOR_H
-#define CRADIOSYSTEMEVENTCOLLECTOR_H
-
-#include <e32std.h>
-
-class MRadioSystemEventObserver;
-
-NONSHARABLE_CLASS( CRadioSystemEventCollector )
-    {
-public:
-
-    IMPORT_C static CRadioSystemEventCollector* NewL();
-
-    IMPORT_C virtual ~CRadioSystemEventCollector();
-
-    /**
-     * Adds a system event observer
-     *
-     * @param aSystemObserver The observer to be added
-     */
-    virtual void AddObserverL( MRadioSystemEventObserver* aSystemObserver ) = 0;
-
-    /**
-    * Removes a system event observer
-    *
-    * @param aSystemObserver The observer to be removed
-    */
-    virtual void RemoveObserver( MRadioSystemEventObserver* aSystemObserver ) = 0;
-
-    /**
-    * Returns data network coverage state ( wlan or mobile ).
-    *
-    * @return ETrue if there is network coverage
-    */
-    virtual TBool IsNetworkCoverage() const = 0;
-
-    /**
-    * Returns mobile network coverage state.
-    *
-    * @return ETrue if there is network coverage
-    */
-    virtual TBool IsMobileNetworkCoverage() const = 0;
-
-    /**
-    * Returns current call state.
-    *
-    * @return ETrue if call is active
-    */
-    virtual TBool IsCallActive() const = 0;
-
-    /**
-    * Returns current audio resources state.
-    *
-    * @return ETrue if audio resources are available
-    */
-    virtual TBool IsAudioResourcesAvailable() const = 0;
-
-    /**
-     * Returns current headset connection status
-     *
-     * @return
-     */
-    virtual TBool IsHeadsetConnectedL() const = 0;
-
-    };
-
-#endif // CRADIOSYSTEMEVENTCOLLECTOR_H
--- a/radioengine/utils/api/mradioaudioroutingobserver.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +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 MRADIOAUDIOROUTINGOBSERVER_H
-#define MRADIOAUDIOROUTINGOBSERVER_H
-
-#include "radioenginedef.h"
-
-/**
- *  Interface for observing audio routing events.
- *
- *  Implementer will be notified when audio routing changes
- *  between IHF and headset.
- *
- */
-NONSHARABLE_CLASS( MRadioAudioRoutingObserver )
-    {
-public:
-
-    /**
-     * Notifies of a requested audio routing change. Changes requested
-     * by other applications do not generate a notification.
-     *
-     * @param aRoute Current audio route
-     */
-    virtual void AudioRouteChangedL( RadioEngine::TRadioAudioRoute aRoute ) = 0;
-
-    };
-
-#endif // MRADIOAUDIOROUTINGOBSERVER_H
--- a/radioengine/utils/api/mradiocontroleventobserver.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,185 +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 MRADIOCONTROLEVENTOBSERVER_H
-#define MRADIOCONTROLEVENTOBSERVER_H
-
-// System includes
-#include <e32std.h>
-
-// User includes
-#include "radioenginedef.h"
-
-/**
- *  MRadioControlEventObserver
- *
- *  MRadioControlEventObserver defines observer interface for radio engine control events.
- */
-NONSHARABLE_CLASS( MRadioControlEventObserver )
-    {
-public:
-
-    /**
-     * Called when "step to channel" request occurs.
-     *
-     * @param aDirection If ERadioUp steps up, otherwise steps down
-     */
-    virtual void StepToChannelL( RadioEngine::TRadioTuneDirection aDirection ) = 0;
-
-    /**
-     * Called when "set channel" request occurs.
-     *
-     * @param aChannelId Channel id to set
-     */
-    virtual void SetChannelL( TInt aChannelId ) = 0;
-
-    /**
-     * Called when "seek" request occurs.
-     *
-     * @param aDirection If ERadioUp seeks up, otherwise seeks down
-     */
-    virtual void SeekL( RadioEngine::TRadioTuneDirection aDirection ) = 0;
-
-    /**
-     * Called when "set frequency" request occurs.
-     *
-     * @param aFreq Frequency to set
-     */
-    virtual void SetFrequencyL( TUint32 aFreq ) = 0;
-
-    /**
-     * Called when "adjust volume" request occurs.
-     *
-     * @param aDirection If ERadioDecVolume decreases, otherwise increases
-     * volume
-     */
-    virtual void AdjustVolumeL( RadioEngine::TRadioVolumeSetDirection aDirection ) = 0;
-
-    /**
-     * Called when "mute" request occurs.
-     *
-     * @param aMute if ETrue mutes, else unmutes radio
-     */
-    virtual void MuteL( TBool aMute ) = 0;
-
-    /**
-    * Called when "play" request occurs.
-    *
-    * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
-    */
-    virtual void PlayL( TBool aDownPressed ) = 0;
-
-    /**
-     * Called when "pause" request occurs.
-     *
-     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
-     */
-    virtual void PauseL( TBool aDownPressed ) = 0;
-
-    /**
-     * Called when "play", "pause" or "pauseplay" request occurs.
-     *
-     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
-     */
-    virtual void PausePlayL( TBool aDownPressed ) = 0;
-
-    /**
-     * Called when "stop" request occurs.
-     *
-     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
-     */
-    virtual void StopL( TBool aDownPressed ) = 0;
-
-    /**
-     * Called when "forward" request occurs.
-     *
-     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
-     */
-    virtual void ForwardL( TBool aDownPressed ) = 0;
-
-    /**
-     * Called when "fast forward" request occurs.
-     *
-     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
-     */
-    virtual void FastForwardL( TBool aDownPressed ) = 0;
-
-    /**
-     * Called when "backward" request occurs.
-     *
-     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
-     */
-    virtual void BackwardL( TBool aDownPressed ) = 0;
-
-    /**
-     * Called when "rewind" request occurs.
-     *
-     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
-     */
-    virtual void RewindL( TBool aDownPressed ) = 0;
-
-    /**
-     * Called when "channel up" request occurs.
-     *
-     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
-     */
-    virtual void ChannelUpL( TBool aDownPressed ) = 0;
-
-    /**
-     * Called when "channel down" request occurs.
-     *
-     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
-     */
-    virtual void ChannelDownL( TBool aDownPressed ) = 0;
-
-    /**
-     * Called when "volume up" request occurs.
-     *
-     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
-     */
-    virtual void VolumeUpL( TBool aDownPressed ) = 0;
-
-    /**
-     * Called when "volume down" request occurs.
-     *
-     * @param aDownPressed If ETrue, button is down. If EFalse, button is up.
-     */
-    virtual void VolumeDownL( TBool aDownPressed ) = 0;
-
-    /**
-     * Called when "change view" request occurs
-     *
-     * @param aViewId the id of activated view
-     * @param aForceChange if ETrue, view changing is forced and state
-     * of visual radio is not checked
-     */
-    virtual void ChangeViewL( TUid aViewId, TBool aForceChange ) = 0;
-
-    /**
-     * Called when audio route is changed
-     * @param aRoute the current audio route
-     */
-    virtual void SetAudioRouteL( RadioEngine::TRadioAudioRoute aRoute ) = 0;
-
-    /**
-     * Called when headset button answer/end call is pressed
-     */
-    virtual void AnswerEndCallL() = 0;
-
-    };
-
-#endif // MRADIOCONTROLEVENTOBSERVER_H
--- a/radioengine/utils/api/mradioenginelogger.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,114 +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 M_RADIOENGINELOGGER_H
-#define M_RADIOENGINELOGGER_H
-
-#include <e32std.h>
-
-_LIT( KMarkerEngine, "RadioEngine:" );
-_LIT( KMarkerUi,     "RadioUI:    " );
-
-/**
- * Common interface for logger types.
- */
-NONSHARABLE_CLASS( MRadioEngineLogger )
-    {
-
-public:
-
-    IMPORT_C static MRadioEngineLogger* Logger();
-
-    /**
-     * Clear the log.
-     */
-    virtual MRadioEngineLogger& ClearLog() = 0;
-
-    /**
-     * Adds a 8-bit string to log line
-     */
-    virtual MRadioEngineLogger& Add( const TDesC8& aMsg ) = 0;
-
-    /**
-     * Adds a 16-bit string to log line
-     */
-    virtual MRadioEngineLogger& Add( const TDesC& aMsg ) = 0;
-
-    /**
-     * Adds a TInt to log line
-     */
-    virtual MRadioEngineLogger& Add( TInt aInt ) = 0;
-
-    /**
-     * Adds a TReal to log line
-     */
-    virtual MRadioEngineLogger& Add( const TReal& aReal ) = 0;
-
-    /**
-     * Adds a c-style string to log line
-     */
-    virtual MRadioEngineLogger& Add( const char* aText ) = 0;
-
-    /**
-     * Adds a pointer value to log line
-     */
-    virtual MRadioEngineLogger& Add( const TAny* aPtr ) = 0;
-
-    /**
-     * Adds a timestamp of current time to log line
-     */
-    virtual MRadioEngineLogger& Add( const TTime& aTime ) = 0;
-
-    /**
-     * Adds a timestamp of current time to log line
-     */
-    virtual MRadioEngineLogger& AddTimestamp() = 0;
-
-    /**
-     * Adds a formatted string to log line
-     */
-    virtual MRadioEngineLogger& AddFormat( TRefByValue<const TDesC> aFmt, ... ) = 0;
-
-    /**
-     * Adds the line indentation to log line
-     */
-    virtual MRadioEngineLogger& AddIndent( const TDesC& aMarker ) = 0;
-
-    /**
-     * Adds the line indentation to log line
-     */
-    virtual MRadioEngineLogger& AddIndentClear( const TDesC& aMarker ) = 0;
-
-    /**
-     * Increment indentation
-     */
-    virtual MRadioEngineLogger& IncIndent() = 0;
-
-    /**
-     * Decrement indentation
-     */
-    virtual MRadioEngineLogger& DecIndent() = 0;
-
-    /**
-     * Commits the log line to file and RDebug and resets internal buffer
-     * @param aNewLine ETrue if newline is to be added, EFalse if not
-     */
-    virtual MRadioEngineLogger& Commit( TBool aNewLine = ETrue ) = 0;
-
-    };
-
-#endif // M_RADIOENGINELOGGER_H
--- a/radioengine/utils/api/mradiosystemeventobserver.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,59 +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 MRADIOSYSTEMEVENTOBSERVER_H
-#define MRADIOSYSTEMEVENTOBSERVER_H
-
-// Data types
-
-/** Type of system event */
-enum TRadioSystemEventType
-    {
-    ERadioHeadsetConnected,         ///< Headset was connected
-    ERadioHeadsetDisconnected,      ///< Headset was disconnected
-    ERadioNetworkCoverageUp,        ///< Network coverage detected
-    ERadioNetworkCoverageDown,      ///< Network coverage lost
-    ERadioCallActivated,            ///< Call activated or ringing
-    ERadioCallDeactivated,          ///< Call disconnected
-    ERadioEmergencyCallActivated,   ///< Call activated or ringing
-    ERadioEmergencyCallDeactivated, ///< Call disconnected
-    ERadioLowDiskSpace,             ///< Low disk space
-    ERadioAudioRouteHeadset,        ///< Audio routed through headset
-    ERadioAudioRouteSpeaker,        ///< Audio routed through speaker ( IHF )
-    ERadioAudioResourcesAvailable,  ///< Audio resources have become available
-    ERadioAudioAutoResumeForbidden  ///< Audio auto resuming is forbidden
-    };
-
-
-/**
- * Observer for any system event state change.
- */
-NONSHARABLE_CLASS( MRadioSystemEventObserver )
-    {
-public:
-
-    /**
-     * Called when system event occurs.
-     * @param aEventType Type of the event
-     */
-    virtual void HandleSystemEventL( TRadioSystemEventType aEventType ) = 0;
-
-    };
-
-#endif // MRADIOSYSTEMEVENTOBSERVER_H
-
-
--- a/radioengine/utils/api/radioengine.hrh	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +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 RADIOENGINE_HRH
-#define RADIOENGINE_HRH
-
-/** Regions*/
-enum TRadioRegion
-    {
-    ERadioRegionNone = -1,
-    ERadioRegionDefault,
-    ERadioRegionJapan,
-    ERadioRegionAmerica,
-    ERadioRegionPoland
-    };
-
-#endif // RADIOENGINE_HRH
--- a/radioengine/utils/api/radioenginedef.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +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 RADIOENGINEDEF_H_
-#define RADIOENGINEDEF_H_
-
-namespace RadioEngine
-    {
-
-    /**
-     * Headset volume.
-     */
-    enum TRadioHeadsetVolume
-        {
-        ERadioHeadsetDefaultVolume = 4   /**< Headset default volume. */
-        };
-
-    /**
-     * Speaker volume.
-     */
-    enum TRadioSpeakerVolume
-        {
-        ERadioSpeakerDefaultVolume = 4   /**< Speaker default volume. */
-        };
-
-    /** Minimum volume */
-    enum TRadioMinVolume
-        {
-        ERadioDefaultMinVolume = 1   /**< Default minimum volume. */
-        };
-
-    /**
-     * Output sources.
-     */
-    enum TRadioAudioRoute
-        {
-        ERadioHeadset = 0,  /**< Headset in use. */
-        ERadioSpeaker = 1   /**< Speaker in use. */
-        };
-
-    /** Direction of tuning */
-    enum TRadioTuneDirection
-        {
-        ERadioDown,
-        ERadioUp
-        };
-
-    /** Direction when setting the volume */
-    enum TRadioVolumeSetDirection
-        {
-        ERadioDecVolume,
-        ERadioIncVolume
-        };
-
-    /** Audio mode */
-    enum TRadioAudioMode
-        {
-        ERadioStereo = 0,
-        ERadioMono
-        };
-
-    /** Seeking state */
-    enum TRadioSeeking
-        {
-        ERadioNotSeeking,
-        ERadioSeekingUp,
-        ERadioSeekingDown,
-        };
-
-    enum TRadioFrequencyEventReason
-        {
-        ERadioFrequencyEventReasonUnknown,     // Default reason
-        ERadioFrequencyEventReasonNext,        // Step to next preset
-        ERadioFrequencyEventReasonPrevious,    // Step to previous preset
-        ERadioFrequencyEventReasonUp,          // Tune or step to higher frequency
-        ERadioFrequencyEventReasonDown,        // Tune or step to lower frequency
-        ERadioFrequencyEventReasonSeekUp,      // Seek to higher frequency
-        ERadioFrequencyEventReasonSeekDown,    // Seek to lower frequency
-        ERadioFrequencyEventReasonImplicit,    // Event originated by radio component
-        ERadioFrequencyEventReasonDummy        // Dummy event, doesn't cause any actions
-        };
-    }
-
-#endif // RADIOENGINEDEF_H_
--- a/radioengine/utils/api/radioengineutils.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef RADIOENGINEUTILS_H
-#define RADIOENGINEUTILS_H
-
-// System includes
-#include <e32std.h>
-
-// User includes
-
-// Forward declarations
-class MRadioEngineLogger;
-class CCoeEnv;
-class RFs;
-
-/**
- * System utility collection class.
- */
-class RadioEngineUtils
-    {
-
-public:
-
-    IMPORT_C static void InitializeL();
-
-    IMPORT_C static void Release();
-
-    IMPORT_C static MRadioEngineLogger* Logger();
-
-    /**
-     * Returns the file server session
-     *
-     * @return Reference to file server session
-     */
-    IMPORT_C static RFs& FsSession();
-
-    };
-
-#endif // RADIOENGINEUTILS_H
--- a/radioengine/utils/api/radiointernalcrkeys.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +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 RADIOINTERNALCRKEYS_H
-#define RADIOINTERNALCRKEYS_H
-
-#include <e32cmn.h>
-
-/** The UID of the category we use. Must be the same as FM Radio's UID3 ( SID ). */
-const TUid KRadioCRUid = { 0x2002FF52 };
-
-
-// APPLICATION SETTINGS
-
-/** The base value for application setting keys. */
-const TUint32 KRadioCRApplicationSettingsBase                   = { 0x100 };
-
-/** The key associated with the http cache limit setting. */
-const TUint32 KRadioCRUiFlags                                   = { KRadioCRApplicationSettingsBase + 0x0 };
-
-/* The key associated with the application launch count setting */
-const TUint32 KRadioCRLaunchCount                               = { KRadioCRApplicationSettingsBase + 0x1 };
-
-
-// RADIO SETTINGS
-
-/** The base value for radio setting keys. */
-const TUint32 KRadioCRRadioSettingsBase                         = { 0x200 };
-
-/** The key associated with the headset volume setting. */
-const TUint32 KRadioCRHeadsetVolume                             = { KRadioCRRadioSettingsBase + 0x0 };
-
-/** The key associated with the speaker volume setting. */
-const TUint32 KRadioCRSpeakerVolume                             = { KRadioCRRadioSettingsBase + 0x1 };
-
-/** The key associated with the output mode setting. */
-const TUint32 KRadioCROutputMode                                = { KRadioCRRadioSettingsBase + 0x2 };
-
-/** The key associated with the audio route setting. */
-const TUint32 KRadioCRAudioRoute                                = { KRadioCRRadioSettingsBase + 0x3 };
-
-/** The key associated with the headset volume mute setting. */
-const TUint32 KRadioCRHeadsetMuteState                          = { KRadioCRRadioSettingsBase + 0x4 };
-
-/** The key associated with the speaker volume mute setting. */
-const TUint32 KRadioCRSpeakerMuteState                          = { KRadioCRRadioSettingsBase + 0x5 };
-
-/** The key associated with the radio power state. */
-const TUint32 KRadioCRRadioPowerState                           = { KRadioCRRadioSettingsBase + 0x6 };
-
-/** The key associated with the tuned frequency setting.  */
-const TUint32 KRadioCRTunedFrequency                            = { KRadioCRRadioSettingsBase + 0x7 };
-
-/** The key associated with the default minimum volume level setting.  */
-const TUint32 KRadioCRDefaultMinVolumeLevel                     = { KRadioCRRadioSettingsBase + 0x8 };
-
-/** The key associated with the current region setting. */
-const TUint32 KRadioCRCurrentRegion                             = { KRadioCRRadioSettingsBase + 0x9 };
-
-/*** Region Japan allowed. */
-const TUint32 KRadioCRRegionAllowedJapan                        = { KRadioCRRadioSettingsBase + 0xA };
-
-/*** Default region. */
-const TUint32 KRadioCRDefaultRegion                             = { KRadioCRRadioSettingsBase + 0xB };
-
-/** The key associated with the network id setting. */
-const TUint32 KRadioCRNetworkId                                 = { KRadioCRRadioSettingsBase + 0xC };
-
-/** The key associated with the country code setting. */
-const TUint32 KRadioCRCountryCode                               = { KRadioCRRadioSettingsBase + 0xD };
-
-#endif // RADIOINTERNALCRKEYS_H
--- a/radioengine/utils/api/radiouid.hrh	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +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 RADIOUID_HRH
-#define RADIOUID_HRH
-
-//TODO: Get uid. this is from visual radio
-#define KUidRadioApplication 0x2002FF4E
-
-#endif // RADIOUID_HRH
--- a/radioengine/utils/bwins/fmradioengineutilsu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-EXPORTS
-	?ValueDes8@CRadioPropertyObserver@@QBEABVTDesC8@@XZ @ 1 NONAME ; class TDesC8 const & CRadioPropertyObserver::ValueDes8(void) const
-	?SetAudioRouteL@CRadioRoutableAudio@@QAEXW4TRadioAudioRoute@RadioEngine@@@Z @ 2 NONAME ; void CRadioRoutableAudio::SetAudioRouteL(enum RadioEngine::TRadioAudioRoute)
-	??0CRadioRoutableAudio@@QAE@PAVCRadioAudioRouter@@@Z @ 3 NONAME ; CRadioRoutableAudio::CRadioRoutableAudio(class CRadioAudioRouter *)
-	?InitializeL@RadioEngineUtils@@SAXXZ @ 4 NONAME ; void RadioEngineUtils::InitializeL(void)
-	?NewL@CRadioRemConTarget@@SAPAV1@XZ @ 5 NONAME ; class CRadioRemConTarget * CRadioRemConTarget::NewL(void)
-	??1TRadioMethodLogger@@QAE@XZ @ 6 NONAME ; TRadioMethodLogger::~TRadioMethodLogger(void)
-	??1CRadioRoutableAudio@@UAE@XZ @ 7 NONAME ; CRadioRoutableAudio::~CRadioRoutableAudio(void)
-	?SetAudioOutput@CRadioRoutableAudio@@IAEXPAVCAudioOutput@@@Z @ 8 NONAME ; void CRadioRoutableAudio::SetAudioOutput(class CAudioOutput *)
-	?RegisterRoutableAudio@CRadioAudioRouter@@QAEXPAVCRadioRoutableAudio@@@Z @ 9 NONAME ; void CRadioAudioRouter::RegisterRoutableAudio(class CRadioRoutableAudio *)
-	?ValueDes@CRadioPropertyObserver@@QBEABVTDesC16@@XZ @ 10 NONAME ; class TDesC16 const & CRadioPropertyObserver::ValueDes(void) const
-	??1CRadioSystemEventCollector@@UAE@XZ @ 11 NONAME ; CRadioSystemEventCollector::~CRadioSystemEventCollector(void)
-	??1CRadioAudioRouter@@UAE@XZ @ 12 NONAME ; CRadioAudioRouter::~CRadioAudioRouter(void)
-	?ActivateL@CRadioPropertyObserver@@QAEXXZ @ 13 NONAME ; void CRadioPropertyObserver::ActivateL(void)
-	?Logger@RadioEngineUtils@@SAPAVMRadioEngineLogger@@XZ @ 14 NONAME ; class MRadioEngineLogger * RadioEngineUtils::Logger(void)
-	?NewL@CRadioSystemEventCollector@@SAPAV1@XZ @ 15 NONAME ; class CRadioSystemEventCollector * CRadioSystemEventCollector::NewL(void)
-	?Logger@MRadioEngineLogger@@SAPAV1@XZ @ 16 NONAME ; class MRadioEngineLogger * MRadioEngineLogger::Logger(void)
-	?Release@RadioEngineUtils@@SAXXZ @ 17 NONAME ; void RadioEngineUtils::Release(void)
-	?DeleteAudioOutput@CRadioRoutableAudio@@IAEXXZ @ 18 NONAME ; void CRadioRoutableAudio::DeleteAudioOutput(void)
-	?ValueInt@CRadioPropertyObserver@@QBEHXZ @ 19 NONAME ; int CRadioPropertyObserver::ValueInt(void) const
-	?SetAudioRouteL@CRadioAudioRouter@@QAEXW4TRadioAudioRoute@RadioEngine@@@Z @ 20 NONAME ; void CRadioAudioRouter::SetAudioRouteL(enum RadioEngine::TRadioAudioRoute)
-	?FsSession@RadioEngineUtils@@SAAAVRFs@@XZ @ 21 NONAME ; class RFs & RadioEngineUtils::FsSession(void)
-	?NewL@CRadioAudioRouter@@SAPAV1@AAVMRadioAudioRoutingObserver@@@Z @ 22 NONAME ; class CRadioAudioRouter * CRadioAudioRouter::NewL(class MRadioAudioRoutingObserver &)
-	?UnRegisterRoutableAudio@CRadioAudioRouter@@QAEXPAVCRadioRoutableAudio@@@Z @ 23 NONAME ; void CRadioAudioRouter::UnRegisterRoutableAudio(class CRadioRoutableAudio *)
-	?AudioRoutingSupported@CRadioRoutableAudio@@QBEHXZ @ 24 NONAME ; int CRadioRoutableAudio::AudioRoutingSupported(void) const
-	??0TRadioMethodLogger@@QAE@PBG0@Z @ 25 NONAME ; TRadioMethodLogger::TRadioMethodLogger(unsigned short const *, unsigned short const *)
-	?NewL@CRadioPropertyObserver@@SAPAV1@AAVMRadioPropertyChangeObserver@@ABVTUid@@IW4TRadioPropertyType@1@@Z @ 26 NONAME ; class CRadioPropertyObserver * CRadioPropertyObserver::NewL(class MRadioPropertyChangeObserver &, class TUid const &, unsigned int, enum CRadioPropertyObserver::TRadioPropertyType)
-
--- a/radioengine/utils/eabi/fmradioengineutilsu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-EXPORTS
-	_ZN16RadioEngineUtils11InitializeLEv @ 1 NONAME
-	_ZN16RadioEngineUtils6LoggerEv @ 2 NONAME
-	_ZN16RadioEngineUtils7ReleaseEv @ 3 NONAME
-	_ZN16RadioEngineUtils9FsSessionEv @ 4 NONAME
-	_ZN17CRadioAudioRouter14SetAudioRouteLEN11RadioEngine16TRadioAudioRouteE @ 5 NONAME
-	_ZN17CRadioAudioRouter21RegisterRoutableAudioEP19CRadioRoutableAudio @ 6 NONAME
-	_ZN17CRadioAudioRouter23UnRegisterRoutableAudioEP19CRadioRoutableAudio @ 7 NONAME
-	_ZN17CRadioAudioRouter4NewLER26MRadioAudioRoutingObserver @ 8 NONAME
-	_ZN17CRadioAudioRouterD0Ev @ 9 NONAME
-	_ZN17CRadioAudioRouterD1Ev @ 10 NONAME
-	_ZN17CRadioAudioRouterD2Ev @ 11 NONAME
-	_ZN18CRadioRemConTarget4NewLEv @ 12 NONAME
-	_ZN18MRadioEngineLogger6LoggerEv @ 13 NONAME
-	_ZN18TRadioMethodLoggerC1EPKtS1_ @ 14 NONAME
-	_ZN18TRadioMethodLoggerC2EPKtS1_ @ 15 NONAME
-	_ZN18TRadioMethodLoggerD1Ev @ 16 NONAME
-	_ZN18TRadioMethodLoggerD2Ev @ 17 NONAME
-	_ZN19CRadioRoutableAudio14SetAudioOutputEP12CAudioOutput @ 18 NONAME
-	_ZN19CRadioRoutableAudio14SetAudioRouteLEN11RadioEngine16TRadioAudioRouteE @ 19 NONAME
-	_ZN19CRadioRoutableAudio17DeleteAudioOutputEv @ 20 NONAME
-	_ZN19CRadioRoutableAudioC1EP17CRadioAudioRouter @ 21 NONAME
-	_ZN19CRadioRoutableAudioC2EP17CRadioAudioRouter @ 22 NONAME
-	_ZN19CRadioRoutableAudioD0Ev @ 23 NONAME
-	_ZN19CRadioRoutableAudioD1Ev @ 24 NONAME
-	_ZN19CRadioRoutableAudioD2Ev @ 25 NONAME
-	_ZN22CRadioPropertyObserver4NewLER28MRadioPropertyChangeObserverRK4TUidjNS_18TRadioPropertyTypeE @ 26 NONAME
-	_ZN22CRadioPropertyObserver9ActivateLEv @ 27 NONAME
-	_ZN26CRadioSystemEventCollector4NewLEv @ 28 NONAME
-	_ZN26CRadioSystemEventCollectorD0Ev @ 29 NONAME
-	_ZN26CRadioSystemEventCollectorD1Ev @ 30 NONAME
-	_ZN26CRadioSystemEventCollectorD2Ev @ 31 NONAME
-	_ZNK19CRadioRoutableAudio21AudioRoutingSupportedEv @ 32 NONAME
-	_ZNK22CRadioPropertyObserver8ValueDesEv @ 33 NONAME
-	_ZNK22CRadioPropertyObserver8ValueIntEv @ 34 NONAME
-	_ZNK22CRadioPropertyObserver9ValueDes8Ev @ 35 NONAME
-	_ZTI15CRadioEngineTls @ 36 NONAME
-	_ZTI19CRadioRoutableAudio @ 37 NONAME
-	_ZTV15CRadioEngineTls @ 38 NONAME
-	_ZTV19CRadioRoutableAudio @ 39 NONAME
-
--- a/radioengine/utils/group/bld.inf	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#include "../../group/buildflags.hrh"
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-WINSCW ARMV5
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-radioengineutils.mmp
--- a/radioengine/utils/group/radioengineutils.mmp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,66 +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 "../../group/buildflags.hrh"
-
-#include <platform_paths.hrh>
-
-#include <data_caging_paths.hrh>
-
-TARGET                  fmradioengineutils.dll
-TARGETTYPE              DLL
-UID                     0x1000008D 0x2002FF51
-VERSION                 10.0
-
-CAPABILITY              CAP_GENERAL_DLL
-VENDORID                VID_DEFAULT
-PAGED
-SMPSAFE
-
-USERINCLUDE             ../api
-USERINCLUDE             ../inc
-
-APP_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE           /epoc32/include/remcon
-SYSTEMINCLUDE           /epoc32/include/mmf/common
-SYSTEMINCLUDE           /epoc32/include/platform/mw
-
-SOURCEPATH              ../src
-SOURCE                  radioengineutils.cpp
-SOURCE                  cradioenginetls.cpp
-SOURCE                  cradioroutableaudio.cpp
-SOURCE                  cradioaudiorouter.cpp
-SOURCE                  cradioaccessoryobserver.cpp
-SOURCE                  cradiopropertyobserver.cpp
-SOURCE                  cradioremcontarget.cpp
-SOURCE                  cradioremcontargetimp.cpp
-SOURCE                  cradiosystemeventdetector.cpp
-SOURCE                  cradiosystemeventcollector.cpp
-SOURCE                  cradiosystemeventcollectorimp.cpp
-SOURCE                  cradioenginelogger.cpp
-
-LIBRARY                 bafl.lib
-LIBRARY                 accclient.lib
-LIBRARY                 accpolicy.lib
-LIBRARY                 centralrepository.lib
-LIBRARY                 CommonEngine.lib
-LIBRARY                 efsrv.lib
-LIBRARY                 euser.lib
-LIBRARY                 cone.lib
-LIBRARY                 remconcoreapi.lib
-LIBRARY                 remconextensionapi.lib
-LIBRARY                 remconinterfacebase.lib
--- a/radioengine/utils/inc/cradioaccessoryobserver.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,170 +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 CRADIOACCESSORYOBSERVER_H
-#define CRADIOACCESSORYOBSERVER_H
-
-#include <AccessoryServer.h>
-#include <AccessoryConnection.h>
-#include <AccPolSubblockNameArray.h>
-
-class MRadioHeadsetEventObserver;
-
-/**
- *  Observer of accessory states.
- *
- *  Instance of this class observes notifications of headset state changes.
- *  In its turn it sends notifications to its observer of those changes.
- *
- */
-NONSHARABLE_CLASS( CRadioAccessoryObserver ): public CActive
-    {
-public:
-
-    /**
-     * C++ default constructor.
-     */
-    CRadioAccessoryObserver();
-
-    /**
-     * Static constructor.
-     */
-    static CRadioAccessoryObserver* NewL();
-
-    /**
-     * Destructor.
-     */
-    virtual ~CRadioAccessoryObserver();
-
-    /**
-     * Sets observer. The observer will be notified when headset has been
-     * pressed or headset is connected/disconnected.
-      *
-     * @param aObserver Observer
-     */
-    void SetObserver( MRadioHeadsetEventObserver* aObserver );
-
-    /**
-     * Tells if there is a headset connected.
-     *
-     * @return <code>ETrue </code> if headset accessory is connected,
-     * <code>EFalse</code> otherwise
-     */
-    TBool IsHeadsetConnectedL() const;
-
-// from base class CActive
-    /**
-     * From CActive
-     *
-     * @see CActive::RunL()
-     */
-    void RunL();
-
-    /**
-     * From CActive
-     *
-     * @see CActive::DoCancel()
-     */
-    void DoCancel();
-
-private:
-
-    /**
-     * Finds an accessory. All wired and bluetooth accessories are taken into account.
-     *
-     * @param aAcceptOnlyHeadset If ETrue, search is succesful only if there is a headset connected.
-     * @param aOutputType The output type of the found accessory ( private/public )
-     * @return ETrue, if suitable accessory was found, EFalse otherwise
-     */
-    TBool FindAccessoryL( TBool aAcceptOnlyHeadset, TAccAudioOutPutType& aOutputType ) const;
-
-    /**
-     * Tells whether the given accessory is a lineout ( and not a headset ).
-     *
-     * @param aAccPolGenId The accessory being investigated.
-     * @return ETrue if the accessory is a lineout, EFalse otherwise.
-     */
-    TBool IsLineoutConnectedL( TAccPolGenericID& aAccPolGenId ) const;
-
-private:
-
-    /**
-     * By default Symbian 2nd phase constructor is private.
-     *
-     * @param aAccessoryServer Existing session for The Accessory Server.
-     */
-    void ConstructL();
-
-private:
-
-    /**
-     * Updates the set of known accessories.
-     * Method also informs the caller about added/removed accessories.
-     *
-     * @param aNroChangedAccessories On return contains the number of added/removed accessories.
-     */
-    void UpdateCurrentAccessoriesL( TInt& aNroChangedAccessories );
-
-    /**
-     * Counts the removed accessories.
-     *
-     * @return The number of removed accessories.
-     */
-    TInt CountRemovedAccessoriesL() const;
-
-    /**
-     * Counts the added accessories.
-     *
-     * @return The number of added accessories.
-     */
-    TInt CountAddedAccessoriesL() const;
-
-private:
-
-    /**
-     * Instance that gets notifications of the headset state changes
-     * Not owned.
-     */
-    MRadioHeadsetEventObserver* iObserver;
-
-    /**
-     * Session for The Accessory Server.
-     * Owned.
-     */
-    RAccessoryServer iAccessoryServer;
-
-    /**
-     * Accessory Connection.
-     * Owned.
-     */
-    RAccessoryConnection iAccessoryConn;
-
-    /**
-     * Known set of accessories. CRadioAccessoryObserver uses this set to deduce
-     * which accessory has been removed ( or added ) and whether or not it was an acceptable accessory.
-     * Owned.
-     */
-    RArray<TAccPolGenericID> iSavedAccessories;
-
-    /**
-     * Array of connected accessories.
-     */
-    TAccPolGenericIDArray iAccPolGenIdArr;
-
-    };
-
-#endif // CRADIOACCESSORYOBSERVER_H
--- a/radioengine/utils/inc/cradioenginetls.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,108 +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 C_RADIOENGINETLS_H
-#define C_RADIOENGINETLS_H
-
-#include <e32base.h>
-
-class MRadioEngineLogger;
-class CCoeEnv;
-class RFs;
-
-/**
- * TLS handler
- */
-class CRadioEngineTls : public CBase
-    {
-
-friend class RadioEngineUtils;
-
-public:
-
-    /**
-     * Returns the CRadioEngineTls instance from TLS
-     *
-     * @since Live TV UI v1.0
-     * @return Reference to CRadioEngineTls instance
-     */
-    static CRadioEngineTls& Instance();
-
-    /**
-     * Return the logger storage if logging is enabled
-     *
-     * @since Live TV UI v1.0
-     */
-    static MRadioEngineLogger* Logger();
-
-    /**
-     * Returns the file server session
-     *
-     * @since Live TV UI v1.0
-     * @return Reference to file server session
-     */
-    static RFs& FsSession();
-
-    /**
-     * Increase reference count
-     */
-    void AddRef();
-
-    /**
-     * Decrease reference count
-     * Deletes self when ref count reaches zero.
-     */
-    void Release();
-
-private:
-
-    static void InitializeL( RFs* aFs = NULL );
-
-    CRadioEngineTls( RFs* aFs );
-
-    ~CRadioEngineTls();
-
-    void ConstructL();
-
-#ifdef LOGGING_ENABLED
-    /**
-     * File logger
-     * Own.
-     */
-    CRadioEngineLogger* iLogger;
-#endif
-
-    /**
-     * Flag to indicate whether or not the file server session is owned
-     */
-    TBool       iFsOwned;
-
-    /**
-     * File server session.
-     * Own status determined by iFsOwned member variable
-     */
-    RFs*        iFs;
-
-    /**
-     * Reference count
-     */
-    TInt        iRefs;
-
-    };
-
-#endif // C_RADIOENGINETLS_H
--- a/radioengine/utils/inc/cradiopropertyobserver.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,244 +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 CRADIOPROPERTYOBSERVER_H
-#define CRADIOPROPERTYOBSERVER_H
-
-#include <e32base.h>
-#include <e32property.h>
-
-/**
- * MRadioPropertyChangeObserver
- *
- * Abstract interface for handling property change events.
- */
-class MRadioPropertyChangeObserver
-{
-
-public:
-
-    /**
-     * This is a callback function which is called when a property value of
-     * type int is changed.
-     *
-     * @param aCategory UID of Publish And Subscribe category
-     * @param aKey subkey to specify the category event; to be used with
-     * Publish And Subscribe
-     *
-     * @param aValue the new value
-     */
-    virtual void HandlePropertyChangeL(
-        const TUid& aCategory,
-        const TUint aKey,
-        const TInt aValue ) = 0;
-
-    /**
-     * This is a callback function which is called when a property value of
-     * type byte array is changed.
-     *
-     * @param aCategory UID of Publish And Subscribe category
-     * @param aKey subkey to specify the category event; to be used with
-     * Publish And Subscribe
-     * @param aValue the new value
-     **/
-    virtual void HandlePropertyChangeL(
-        const TUid& aCategory,
-        const TUint aKey,
-        const TDesC8& aValue ) = 0;
-
-    /**
-     * This is a callback function which is called when a property value of
-     * type text is changed.
-     *
-     * @param aCategory UID of Publish And Subscribe category
-     * @param aKey subkey to specify the category event; to be used with
-     * Publish And Subscribe
-     * @param aValue the new value
-     **/
-    virtual void HandlePropertyChangeL(
-        const TUid& aCategory,
-        const TUint aKey,
-        const TDesC& aValue ) = 0;
-
-    /**
-     * This is a callback function which is called when a P&S components
-     * returns an error
-     *
-     * @param aCategory UID of Publish And Subscribe category
-     * @param aKey subkey to specify the category event
-     * @param aError an error code
-     */
-    virtual void HandlePropertyChangeErrorL(
-        const TUid& aCategory,
-        const TUint aKey,
-        TInt aError ) = 0;
-
-};
-
-
-/**
- * Observer class that observes changes of Property values and propogates
- * them further.
- * The class defines a handle to a property, a single data value representing
- * an item of state information.
- *
- */
-NONSHARABLE_CLASS( CRadioPropertyObserver ) : public CActive
-    {
-
- public:
-
-    /**
-     * Property type. Cannot use RProperty::TType because EByteArray == EText.
-     */
-    enum TRadioPropertyType
-        {
-        ERadioPropertyInt, // Integral property type.
-        ERadioPropertyByteArray, // Byte-array ( 8 bit ), max size 512 bytes
-        ERadioPropertyText // Text ( 16 bit ), max size 512 bytes
-        };
-
-    /**
-     * Two-phased constructor.
-     *
-     * @param aObserver a reference to the observer interface implementer
-     * @param aCategory UID of Publish And Subscribe category
-     * @param aKey subkey to specify the category event; to be used with
-     * Publish And Subscribe
-     * @param aPropertyType property type to observe
-     */
-    IMPORT_C static CRadioPropertyObserver* NewL(
-        MRadioPropertyChangeObserver& aObserver,
-        const TUid& aCategory,
-        const TUint aKey,
-        const TRadioPropertyType aPropertyType );
-
-    ~CRadioPropertyObserver();
-
-    /**
-     * Subscribes the object to listen to the specified key. Does nothing if already active.
-     * Must be called after construction, or after calling Cancel().
-     */
-    IMPORT_C void ActivateL();
-
-    /**
-     * Returns current integer property value
-     *
-     * @return int value
-     */
-    IMPORT_C TInt ValueInt() const;
-
-    /**
-     * Returns current byte array property value
-     *
-     * @return byte array value
-     */
-    IMPORT_C const TDesC8& ValueDes8() const;
-
-    /**
-     * Returns current text property value
-     *
-     * @return text value
-     */
-    IMPORT_C const TDesC& ValueDes() const;
-
-private:
-
-    /**
-     * C++ default constructor overload.
-     * Two-phased constructor.
-     *
-     * @param aObserver a reference to the observer interface implementer
-     * @param aCategory UID of Publish And Subscribe category
-     * @param aKey subkey to specify the category event; to be used with
-     * Publish And Subscribe
-     * @param aPropertyType property type to observe
-     */
-    CRadioPropertyObserver(
-        MRadioPropertyChangeObserver& aObserver,
-        const TUid& aCategory,
-        const TUint aKey,
-        const TRadioPropertyType aPropertyType );
-
-    /**
-     * By default Symbian 2nd phase constructor is private.
-     **/
-    void ConstructL();
-
-protected:
-
-    // from base class Cactive
-    /**
-     * From CActive
-     *
-     * @see CActive::RunL()
-     */
-    void RunL();
-
-    /**
-     * From CActive,
-     *
-     * @see CActive::DoCancel()
-     */
-    void DoCancel();
-
-private: // data
-
-    /**
-     * Value of a subscribed category property of type int.
-     */
-    TInt                            iValueInt;
-
-    /**
-     * Value of a subscribed category property of type byte array.
-     */
-    HBufC8*                         iValueByteArray;
-
-    /**
-     * Value of a subscribed category property of type text.
-     */
-    HBufC*                          iValueText;
-
-    /**
-     * Handle to Publish And Subscribe component
-     */
-    RProperty                       iProperty;
-
-    /**
-     * Observer to be notified when particular Property value has changed
-     */
-    MRadioPropertyChangeObserver&   iObserver;
-
-    /**
-     * UID of Publish And Subscribe category
-     */
-    TUid                            iCategory;
-
-    /**
-     * Subkey to be used with Publish And Subscribe
-     */
-    TUint                           iKey;
-
-    /**
-     * Type of the observed property.
-     */
-    TRadioPropertyType              iPropertyType;
-
-    };
-
-#endif  // CRADIOPROPERTYOBSERVER_H
-
--- a/radioengine/utils/inc/cradioremcontargetimp.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef CRADIOREMCONTARGETIMP_H
-#define CRADIOREMCONTARGETIMP_H
-
-// System includes
-#include <RemConCallHandlingTargetObserver.h>
-#include <remconcoreapitargetobserver.h>
-
-// User includes
-#include "cradioremcontarget.h"
-
-// Forward declarations
-class CRemConCallHandlingTarget;
-class CRemConCoreApiTarget;
-class CRemConInterfaceSelector;
-
-// Class declaration
-
-/**
- * Media key listener
- */
-NONSHARABLE_CLASS( CRadioRemConTargetImp ) : public CRadioRemConTarget
-                                           , public MRemConCoreApiTargetObserver
-                                           , public MRemConCallHandlingTargetObserver
-    {
-public:
-
-    static CRadioRemConTargetImp* NewL();
-
-    virtual ~CRadioRemConTargetImp();
-
-private:
-
-// from base class CRadioRemConTarget
-
-    void SetControlEventObserver( MRadioControlEventObserver* aControlEventObserver );
-
-// from base class MRemConCoreApiTargetObserver
-
-    void MrccatoCommand( TRemConCoreApiOperationId aOperationId, TRemConCoreApiButtonAction aButtonAct );
-    void MrccatoPlay( TRemConCoreApiPlaybackSpeed aSpeed, TRemConCoreApiButtonAction aButtonAct );
-    void MrccatoTuneFunction( TBool aTwoPart, TUint aMajorChannel, TUint aMinorChannel, TRemConCoreApiButtonAction aButtonAct );
-    void MrccatoSelectDiskFunction( TUint aDisk, TRemConCoreApiButtonAction aButtonAct );
-    void MrccatoSelectAvInputFunction( TUint8 aAvInputSignalNumber, TRemConCoreApiButtonAction aButtonAct );
-    void MrccatoSelectAudioInputFunction( TUint8 aAudioInputSignalNumber, TRemConCoreApiButtonAction aButtonAct );
-
-// from base class MRemConCallHandlingTargetObserver
-
-    void AnswerCall();
-    void AnswerEndCall();
-    void DialCall( const TDesC8& aTelNumber );
-    void EndCall();
-    void GenerateDTMF( const TChar aChar );
-    void LastNumberRedial();
-    void MultipartyCalling( const TDesC8& aData );
-    void SpeedDial( const TInt aIndex );
-    void VoiceDial( const TBool aActivate );
-
-private:
-
-    CRadioRemConTargetImp();
-
-    void ConstructL();
-
-    /**
-     * Callback for repeat timer.
-     * @param aPtr Pointer to this class.
-     */
-    static TInt RepeatTimerCallback( TAny* aPtr );
-
-private: // data
-
-    /** Pointer to observer in UI side, can be NULL. Not owned. */
-    MRadioControlEventObserver* iObserver;
-
-    /** RemCon interface selector. */
-    CRemConInterfaceSelector*   iInterfaceSelector;
-
-    /** RemCon Core API target class. */
-    CRemConCoreApiTarget*       iCoreTarget;
-
-    /** RemCon Call API target class. */
-    CRemConCallHandlingTarget*  iCallTarget;
-
-    /** Timer for generating repeat events. */
-    CPeriodic*                  iRepeatTimer;
-
-    /** Operation id to repeat. */
-    TRemConCoreApiOperationId   iRepeatId;
-
-    };
-
-#endif // CRADIOREMCONTARGETIMP_H
--- a/radioengine/utils/inc/cradiosystemeventcollectorimp.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,101 +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 CRADIOSYSTEMEVENTCOLLECTORIMP_H
-#define CRADIOSYSTEMEVENTCOLLECTORIMP_H
-
-#include "cradiosystemeventcollector.h"
-#include "mradioaudioroutingobserver.h"
-#include "mradioheadseteventobserver.h"
-#include "mradiosystemeventdetectorobserver.h"
-#include "mradiosystemeventobserver.h"
-
-class CRadioAccessoryObserver;
-class CRadioSystemEventDetector;
-
-/**
- *  Collects system events and forwards them to observers
- *  Class also wraps up the getters for some system states
- */
-NONSHARABLE_CLASS( CRadioSystemEventCollectorImp ) : public CRadioSystemEventCollector
-                                                   , public MRadioAudioRoutingObserver
-                                                   , public MRadioHeadsetEventObserver
-                                                   , public MRadioSystemEventDetectorObserver
-    {
-public:
-
-    static CRadioSystemEventCollectorImp* NewL();
-
-    ~CRadioSystemEventCollectorImp();
-
-private:
-
-    CRadioSystemEventCollectorImp();
-
-    void ConstructL();
-
-// from base class CRadioSystemEventCollector
-
-    void AddObserverL( MRadioSystemEventObserver* aSystemObserver );
-    void RemoveObserver( MRadioSystemEventObserver* aSystemObserver );
-    TBool IsNetworkCoverage() const;
-    TBool IsMobileNetworkCoverage() const;
-    TBool IsCallActive() const;
-    TBool IsAudioResourcesAvailable() const;
-    TBool IsHeadsetConnectedL() const;
-
-    void NotifyObserversL( TRadioSystemEventType aEvent );
-
-// from base class MRadioSystemEventDetectorObserver
-
-    void NetworkUpCallbackL();
-    void NetworkDownCallbackL();
-    void CallActivatedCallbackL();
-    void CallDeactivatedCallbackL();
-    void AudioResourcesAvailableL();
-    void AudioAutoResumeForbiddenL();
-    void ErrorCallbackL( TInt aError );
-
-// from base class MRadioHeadsetEventObserver
-
-    void HeadsetConnectedCallbackL();
-    void HeadsetDisconnectedCallbackL();
-
-// from base class MRadioAudioRoutingObserver
-
-    void AudioRouteChangedL( RadioEngine::TRadioAudioRoute aRoute );
-
-private: // data
-
-    /**
-     * Array of system event observers
-     */
-    RPointerArray<MRadioSystemEventObserver> iSystemEventObservers;
-
-    /**
-     * Detects system events
-     */
-    CRadioSystemEventDetector* iSystemEventDetector;
-
-    /**
-     * Observer for accessory events
-     */
-    CRadioAccessoryObserver* iHeadsetObserver;
-
-    };
-
-#endif // CRADIOSYSTEMEVENTCOLLECTORIMP_H
--- a/radioengine/utils/inc/cradiosystemeventdetector.h	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#ifndef CRADIOSYSTEMEVENTDETECTOR_H
-#define CRADIOSYSTEMEVENTDETECTOR_H
-
-#include <e32base.h>
-
-#include "cradiopropertyobserver.h"
-
-class MRadioSystemEventDetectorObserver;
-
-/**
-* Catches notification of the call and network state changes.
-*
-* Class provides implementation to detect system events and notify UI components of the event,
-* Class keeps several instances of CVPropertyObserver, and those instances send event notifications
-* about the particular system component state change.
-*/
-NONSHARABLE_CLASS( CRadioSystemEventDetector ) : public CBase
-                                               , public MRadioPropertyChangeObserver
-    {
-public:
-
-    static CRadioSystemEventDetector* NewL( MRadioSystemEventDetectorObserver&  aObserver );
-
-    virtual ~CRadioSystemEventDetector();
-
-    /**
-     * Returns network coverage state ( wlan or mobile ).
-     */
-    TBool IsNetworkCoverage() const;
-
-    /**
-     * Returns mobile network coverage state.
-     */
-    TBool IsMobileNetworkCoverage() const;
-
-    /**
-     * Returns current call state.
-     */
-    TBool IsCallActive() const;
-
-    /**
-     * Returns current audio resources state.
-     * @return audio resources state
-     */
-    TBool IsAudioResourcesAvailable() const;
-
-    /**
-     * Returns current Voice UI state.
-     * @return ETrue if Voice UI is active, EFalse otherwise
-     */
-    TBool IsVoiceUiActive() const;
-
-protected:
-
-// from base class MRadioPropertyChangeObserver
-
-    void HandlePropertyChangeL( const TUid& aCategory, const TUint aKey, const TInt aValue );
-    void HandlePropertyChangeL( const TUid& aCategory, const TUint aKey, const TDesC8& aValue );
-    void HandlePropertyChangeL( const TUid& aCategory, const TUint aKey, const TDesC& aValue );
-    void HandlePropertyChangeErrorL( const TUid& aCategory, const TUint aKey, TInt aError );
-
-private:
-
-    void ConstructL();
-
-    CRadioSystemEventDetector( MRadioSystemEventDetectorObserver&  aObserver );
-
-private: // data
-
-    /** Observer which will be notified of the call and network state changes*/
-    MRadioSystemEventDetectorObserver&  iObserver;
-
-    /** handler to Publish & Subscribe interface*/
-    CRadioPropertyObserver*     iCallStatusObserver;
-    /** handler to Publish & Subscribe interface*/
-    CRadioPropertyObserver*     iNetworkStatusObserver;
-    /** handler to Publish & Subscribe interface*/
-    CRadioPropertyObserver*     iAudioPolicyObserver;
-
-    /**Indicator for the mobile network status*/
-    TBool                       iIsMobileNetworkCoverage;
-
-    /**Indicator for the call status*/
-    TBool                       iIsCallActive;
-
-    /** Array of audio policy categories that radio must not resume after. */
-    RArray<TInt>                iNoAutoResumeAudioCategories;
-
-    /** Indicator for audio resource status. */
-    TBool                       iIsAudioResourcesAvailable;
-    
-    };
-
-#endif // CRADIOSYSTEMEVENTDETECTOR_H
--- a/radioengine/utils/inc/mradioheadseteventobserver.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +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 MRADIOHEADSETEVENTOBSERVER_H
-#define MRADIOHEADSETEVENTOBSERVER_H
-
-
-// Class declaration
-/**
-*
-*  Observer for the Headset button state. Implementer will be notified each time the headset button
-*  state has changed ( button pressed ).
-*/
-NONSHARABLE_CLASS( MRadioHeadsetEventObserver )
-    {
-public:
-
-    /**
-    * This callback will notify of the Headset to be connected
-    */
-    virtual void HeadsetConnectedCallbackL() = 0;
-
-    /**
-    * This callback will notify of the Headset to be disconnected
-    */
-    virtual void HeadsetDisconnectedCallbackL() = 0;
-
-    };
-
-#endif // MRADIOHEADSETEVENTOBSERVER_H
-
-
--- a/radioengine/utils/inc/mradiosystemeventdetectorobserver.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,70 +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 MRADIOSYSTEMEVENTDETECTOROBSERVER_H
-#define MRADIOSYSTEMEVENTDETECTOROBSERVER_H
-
-// Class declaration
-/**
-*
-*  Observer for the call and network state. Implementer will be notified each time the state has changed
-*/
-NONSHARABLE_CLASS( MRadioSystemEventDetectorObserver )
-    {
-public:
-
-    /**
-    * This callback notifies when networks comes up.
-    */
-    virtual void NetworkUpCallbackL() = 0;
-
-    /**
-    * This callback notifies when network goes down.
-    */
-    virtual void NetworkDownCallbackL() = 0;
-
-    /**
-    * This callback notifies when call becomes active.
-    */
-    virtual void CallActivatedCallbackL() = 0;
-
-    /**
-    * This callback notifies when call becomes deactive.
-    */
-    virtual void CallDeactivatedCallbackL() = 0;
-
-    /**
-    * This callback notifies when audio resources become available.
-    */
-    virtual void AudioResourcesAvailableL() = 0;
-
-    /**
-    * This callback notifies when audio auto resuming is forbidden.
-    */
-    virtual void AudioAutoResumeForbiddenL() = 0;
-
-    /**
-    * This callback notifies when an error occured
-    * @param aError an error code
-    */
-    virtual void ErrorCallbackL( TInt aError ) = 0;
-
-    };
-
-#endif // MRADIOSYSTEMEVENTDETECTOROBSERVER_H
-
-
--- a/radioengine/utils/src/cradioaccessoryobserver.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,390 +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:
-*
-*/
-
-// System includes
-#include <ncp_feature_settings.hrh>
-
-// User includes
-#include "cradioaccessoryobserver.h"
-#include "mradioheadseteventobserver.h"
-#include "cradioenginelogger.h"
-
-#ifdef ASW_CORE_AUDIO_PLATFORM_VERSION // Nokia specific adaptation
-//#include <accpolpropgenericid.h>
-#include <AccPolGenericIdDefinitions.h>
-
-#ifndef __WINS__
-// See accpolpropgenericid.h definitions KPCNokiaAV == 0x20000,
-// Forced to use hard coded value here to avoid including from epoc32/include/internal
-const TUint KPhysicalConnectionBitmask = 0x20000 | KPCWired;
-
-#else
-// See accpolpropgenericid.h definitions KPCNokiaAV == 0x20000, 
-// Forced to use hard coded value here to avoid including from epoc32/include/internal
-const TUint KPhysicalConnectionBitmask = 0x20000 | KPCWired;
-
-#endif // __WINS__
-
-#else
-const TUint KPhysicalConnectionBitmask = KPCWired;
-#endif // ASW_CORE_AUDIO_PLATFORM_VERSION
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioAccessoryObserver::CRadioAccessoryObserver()
-    : CActive( CActive::EPriorityStandard )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioAccessoryObserver::ConstructL()
-    {
-    LEVEL2( LOG_METHOD_AUTO );
-    User::LeaveIfError( iAccessoryServer.Connect() );
-
-    // Creates a new sub-session within an existing session.
-    User::LeaveIfError( iAccessoryConn.CreateSubSession( iAccessoryServer ) );
-    User::LeaveIfError( iAccessoryConn.GetAccessoryConnectionStatus( iAccPolGenIdArr ) );
-
-    TInt nroChangedAccessories( 0 );
-    UpdateCurrentAccessoriesL( nroChangedAccessories );
-    LOG_FORMAT( "Found %d wired/BT accessories ( %d accessories in total ).",
-              nroChangedAccessories, iAccPolGenIdArr.Count() );
-    CActiveScheduler::Add( this );
-    // Accessory is always listened
-    iAccessoryConn.NotifyAccessoryConnectionStatusChanged( iStatus, iAccPolGenIdArr );
-    SetActive();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioAccessoryObserver* CRadioAccessoryObserver::NewL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    CRadioAccessoryObserver* self = new( ELeave ) CRadioAccessoryObserver;
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioAccessoryObserver::~CRadioAccessoryObserver()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    Cancel();
-    iAccessoryConn.CloseSubSession();
-    iAccessoryServer.Close();
-    iSavedAccessories.Close();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioAccessoryObserver::FindAccessoryL( TBool aAcceptOnlyHeadset, TAccAudioOutPutType& aOutputType ) const
-    {
-    LEVEL2( LOG_METHOD_AUTO );
-#ifdef __WINS__
-    TBool accessoryFound = ETrue;
-    aAcceptOnlyHeadset = ETrue;
-    aOutputType = EAccAudioOutPutTypePrivate;
-#else
-    TBool accessoryFound = EFalse;
-
-    LOG_FORMAT( "Connected accessories count = %d", iAccPolGenIdArr.Count());
-    for ( TInt i = 0; i < iAccPolGenIdArr.Count() && !accessoryFound; ++i )
-        {
-        TAccPolGenericID accPolGenId = iAccPolGenIdArr.GetGenericIDL( i );
-
-        //Check if physical connection is of acceptable type
-        TUint32 physicalConnectionCaps = accPolGenId.PhysicalConnectionCaps();
-        if ( physicalConnectionCaps & KPhysicalConnectionBitmask || physicalConnectionCaps & KPCBluetooth )
-            {
-            LOG_FORMAT( "is wired or BT ( physicalConnectionCaps = %d )", physicalConnectionCaps );
-
-            if ( !aAcceptOnlyHeadset )
-                {
-                accessoryFound = ETrue;
-                }
-            //Get device type ( check if is HeadSet )
-            TUint32 deviceType = accPolGenId.DeviceTypeCaps();
-            if ( deviceType & KDTHeadset )
-                {
-                LOG_FORMAT( "is HeadSet( deviceType = %d )", deviceType );
-                if ( !IsLineoutConnectedL( accPolGenId ) )
-                    {
-                    LOG( "Is a normal headSet" );
-                    accessoryFound = ETrue;
-                    }
-                }
-            else if ( deviceType & KDTLoopset )
-                {
-                LOG_FORMAT( "is Loopset( deviceType = %d )", deviceType );
-                accessoryFound = ETrue;
-                }
-            else
-                {
-                LOG_FORMAT( "is NOT HeadSet or Loopset( deviceType = %d )", deviceType );
-                }
-
-            if ( accessoryFound )
-                {
-                // get the public/private status
-                TAccPolNameRecord nameRecord;
-                nameRecord.SetNameL( KAccAudioOutputType );
-
-                TAccValueTypeTInt audioOutputTypeValue;
-                iAccessoryConn.GetValueL( accPolGenId, nameRecord, audioOutputTypeValue );
-
-                aOutputType = static_cast<TAccAudioOutPutType>( audioOutputTypeValue.iValue );
-                LOG_FORMAT( "AudioOutputType = %d", aOutputType );
-                }
-            }
-        else
-            {
-            LOG_FORMAT( "is NOT wired or BT ( physicalConnectionCaps = %d )", physicalConnectionCaps );
-            }
-        }
-#endif
-    return accessoryFound;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioAccessoryObserver::IsHeadsetConnectedL() const
-    {
-    TAccAudioOutPutType audioOutputType( EAccAudioOutPutTypePrivate );
-    return FindAccessoryL( ETrue , audioOutputType );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioAccessoryObserver::IsLineoutConnectedL( TAccPolGenericID& aAccPolGenId ) const
-    {
-    LEVEL2( LOG_METHOD_AUTO );
-    TBool isLineOut( EFalse );
-
-    CAccPolSubblockNameArray* nameArray = CAccPolSubblockNameArray::NewL();
-    CleanupStack::PushL( nameArray );
-    iAccessoryConn.GetSubblockNameArrayL( aAccPolGenId, *nameArray );
-
-    TBool isAudioOutValue = nameArray->HasName( KAccAudioOut );
-    CleanupStack::PopAndDestroy( nameArray );
-    if ( isAudioOutValue )
-        {
-        LOG_FORMAT( "isAudioOutValue = ( %d )", isAudioOutValue );
-
-        TAccPolNameRecord nameRecord;
-        nameRecord.SetNameL( KAccAudioOut );
-
-        //Check if connected accessory is LineOut
-        TAccValueTypeTInt audioOutValue;
-        iAccessoryConn.GetValueL( aAccPolGenId, nameRecord, audioOutValue );
-
-        LOG( "CRadioAccessoryObserver::IsLineoutConnectedL - GetValueL() - OK" );
-        if ( TAccAudioOutLineout == audioOutValue.iValue )
-            {
-            //is lineout
-            LOG_FORMAT( "Accessory is LineOut( audioOutValue = %d )", audioOutValue.iValue );
-            isLineOut = ETrue;
-            }
-        }
-    return isLineOut;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioAccessoryObserver::UpdateCurrentAccessoriesL( TInt& aNroChangedAccessories )
-    {
-    LEVEL2( LOG_METHOD_AUTO );
-    // first check, the removed accessories.
-    TInt removedAccessories = CountRemovedAccessoriesL();
-    LOG_FORMAT( "- %d accessories removed.", removedAccessories );
-    aNroChangedAccessories += removedAccessories;
-    TInt addedAccessories = CountAddedAccessoriesL();
-    LOG_FORMAT( "- %d accessories added.", addedAccessories );
-    aNroChangedAccessories += addedAccessories;
-
-    iSavedAccessories.Reset();
-
-    for ( TInt i = 0; i < iAccPolGenIdArr.Count(); ++i )
-        {
-        iSavedAccessories.AppendL( iAccPolGenIdArr.GetGenericIDL( i ) );
-        LOG_FORMAT( "- accessory in slot %d: %d",
-                  i, iAccPolGenIdArr.GetGenericIDL( i ).UniqueID() );
-        }
-    LOG_FORMAT( "- %d accessories in total.", iSavedAccessories.Count() );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioAccessoryObserver::CountRemovedAccessoriesL() const
-    {
-    LEVEL2( LOG_METHOD_AUTO );
-    TInt removedAccessories( 0 );
-
-    for ( TInt i = 0; i < iSavedAccessories.Count(); ++i )
-        {
-        TAccPolGenericID savedAcc = iSavedAccessories[i];
-
-        TUint32 physicalConnectionCaps = savedAcc.PhysicalConnectionCaps();
-
-        if ( physicalConnectionCaps & KPhysicalConnectionBitmask || physicalConnectionCaps & KPCBluetooth )
-            {
-            TBool found( EFalse );
-
-            for ( TInt j = 0; j < iAccPolGenIdArr.Count() && !found; j++ )
-                {
-                TAccPolGenericID freshAcc = iAccPolGenIdArr.GetGenericIDL( j );
-                if ( freshAcc.UniqueID() == savedAcc.UniqueID() )
-                    {
-                    LOG_FORMAT( "- Accessory with id = %d found.", savedAcc.UniqueID() );
-                    found = ETrue;
-                    }
-                }
-            if ( !found )
-                {
-                LOG_FORMAT( "- Accessory with id = %d removed.", savedAcc.UniqueID() );
-                removedAccessories++;
-                }
-            }
-        }
-    return removedAccessories;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioAccessoryObserver::CountAddedAccessoriesL() const
-    {
-    LEVEL2( LOG_METHOD_AUTO );
-    TInt addedAccessories( 0 );
-
-    for ( TInt i = 0; i < iAccPolGenIdArr.Count(); ++i )
-        {
-        TAccPolGenericID freshAcc = iAccPolGenIdArr.GetGenericIDL( i );
-
-        TUint32 physicalConnectionCaps = freshAcc.PhysicalConnectionCaps();
-
-        if ( physicalConnectionCaps & KPhysicalConnectionBitmask || physicalConnectionCaps & KPCBluetooth )
-            {
-            TBool found( EFalse );
-
-            for ( TInt j = 0; j < iSavedAccessories.Count() && !found; j++ )
-                {
-                TAccPolGenericID savedAcc = iSavedAccessories[j];
-                if ( savedAcc.UniqueID() == freshAcc.UniqueID() )
-                    {
-                    LOG_FORMAT( "- Accessory with id = %d found.", freshAcc.UniqueID() );
-                    found = ETrue;
-                    }
-                }
-            if ( !found )
-                {
-                LOG_FORMAT( "- Accessory with id = %d added.", freshAcc.UniqueID() );
-                addedAccessories++;
-                }
-            }
-        }
-    return addedAccessories;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioAccessoryObserver::SetObserver( MRadioHeadsetEventObserver* aObserver )
-    {
-    iObserver = aObserver;
-    }
-
-// ---------------------------------------------------------------------------
-// From class CActive
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioAccessoryObserver::RunL()
-    {
-    LEVEL2( LOG_METHOD_AUTO );
-    TRequestStatus status = iStatus;
-    iAccessoryConn.NotifyAccessoryConnectionStatusChanged( iStatus, iAccPolGenIdArr );
-
-    SetActive();
-
-    TInt nroChangedAccessories( 0 );
-    UpdateCurrentAccessoriesL( nroChangedAccessories );
-
-    if ( status == KErrNone && nroChangedAccessories != 0 )
-        {
-        TAccAudioOutPutType audioOutputType( EAccAudioOutPutTypePrivate );
-
-        if ( FindAccessoryL( EFalse, audioOutputType ) )
-            {
-            // Accessory mode may change when combined connection status changes
-            // or when audio routing status changes.
-            if ( audioOutputType == EAccAudioOutPutTypePrivate )
-                {
-                LOG( "Headset connected" );
-                iObserver->HeadsetConnectedCallbackL();
-                }
-            else
-                {
-                LOG( "Public wired or BT accessory connected." );
-                iObserver->HeadsetDisconnectedCallbackL();
-                }
-            }
-        else
-            {
-            LOG( "No wired or BT accessories available" );
-            iObserver->HeadsetDisconnectedCallbackL();
-            }
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-// From class CActive
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioAccessoryObserver::DoCancel()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iAccessoryConn.CancelNotifyAccessoryConnectionStatusChanged();
-    }
--- a/radioengine/utils/src/cradioaudiorouter.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +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:
-*
-*/
-
-// User includes
-#include "cradioenginelogger.h"
-#include "cradioaudiorouter.h"
-#include "mradioaudioroutingobserver.h"
-#include "cradioroutableaudio.h"
-#include "radioengineutils.h"
-
-
-const TInt KVisualRadioInitialRoutableAudioArraySize( 2 );
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioAudioRouter::CRadioAudioRouter( MRadioAudioRoutingObserver& aAudioRoutingObserver )
-    : iAudioRoutingObserver( aAudioRoutingObserver )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CRadioAudioRouter* CRadioAudioRouter::NewL( MRadioAudioRoutingObserver& aAudioRoutingObserver )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    CRadioAudioRouter* self = new( ELeave ) CRadioAudioRouter( aAudioRoutingObserver );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CRadioAudioRouter::~CRadioAudioRouter()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iRoutableAudios.Close();
-    RadioEngineUtils::Release();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioAudioRouter::ConstructL()
-    {
-    RadioEngineUtils::InitializeL();
-    LEVEL3( LOG_METHOD_AUTO );
-    iRoutableAudios = RArray<CRadioRoutableAudio*>( KVisualRadioInitialRoutableAudioArraySize );
-    }
-
-// ---------------------------------------------------------------------------
-// Sets audio route
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CRadioAudioRouter::SetAudioRouteL( RadioEngine::TRadioAudioRoute aAudioRoute )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-
-    for ( TInt i = 0; i < iRoutableAudios.Count(); ++i )
-        {
-        iRoutableAudios[i]->SetAudioRouteL( aAudioRoute );
-        }
-    iAudioRoutingObserver.AudioRouteChangedL( aAudioRoute );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CRadioAudioRouter::RegisterRoutableAudio( CRadioRoutableAudio* aRoutableAudio )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iRoutableAudios.Append( aRoutableAudio );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CRadioAudioRouter::UnRegisterRoutableAudio( CRadioRoutableAudio* aRoutableAudio )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-
-    TInt objectIndex = iRoutableAudios.Find( aRoutableAudio );
-
-    __ASSERT_DEBUG( objectIndex != KErrNotFound, User::Panic( _L("VisualRadio" ), KErrAbort ) );
-
-    if ( objectIndex != KErrNotFound )
-        {
-        iRoutableAudios.Remove( objectIndex );
-        }
-    }
-
--- a/radioengine/utils/src/cradioenginelogger.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,481 +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:
-*
-*/
-
-// User includes
-#include "cradioenginelogger.h"
-#include "cradioenginetls.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-// Return the logger instance.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C MRadioEngineLogger* MRadioEngineLogger::Logger()
-    {
-    return CRadioEngineTls::Logger();
-    }
-
-#ifdef LOGGING_ENABLED
-
-#include <bautils.h>
-
-// Indentation
-_LIT( KLogSpace,    "                                " ); // 32 empty spaces
-const TInt KMaxIndent = 32;
-
-/**
- * Timestamp formatter string
- */
-_LIT8( KTimestampFormat, "%02d.%02d.%4d %02d:%02d:%02d.%05d" );
-
-/**
- * Timestamp separator string
- */
-_LIT8( KTimestampSeparator, " " );
-
-// Memory card path. Has to contain directory ( \\) or BaflUtils::PathExists fails
-_LIT( KMemoryCard, "E:\\" );
-
-_LIT( KLogEnter,     "\\ %S" );
-_LIT( KLogExit,      "/ %S" );
-_LIT8( KLogLine,     "| " );
-_LIT( KLogLeave,     "#+ %S: LEAVE!" );
-_LIT( KLogExitRet,   "/ %S, Returning " );
-
-_LIT8( KNewLine, "\r\n" );
-_LIT8( KHexFormat, "ptr: 0x%X" );
-
-
-// ======== MEMBER FUNCTIONS ========
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioEngineLogger* CRadioEngineLogger::NewL( RFs& aFs )
-    {
-    CRadioEngineLogger* self = new (ELeave) CRadioEngineLogger( aFs );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioEngineLogger::CRadioEngineLogger( RFs& aFs )
-    : iFs( aFs )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineLogger::ConstructL()
-    {
-    if ( KLogFile().FindF( KMemoryCard ) == 0 )
-        {
-        TBool readOnly = EFalse;
-
-        // Returns KErrPathNotFound if memory card is not present
-        TInt err = BaflUtils::DiskIsReadOnly( iFs, KMemoryCard, readOnly );
-        if ( err || readOnly )
-            {
-            // Log file path points to the memory card and the card is not
-            // present or is read only => change the drive to C:
-            TFileName fileName( _L( "C:" ) );
-            TParsePtrC parse( KLogFile );
-            fileName.Append( parse.Path() );
-            fileName.Append( parse.NameAndExt() );
-            iFileName = fileName.AllocL();
-            }
-        }
-
-    if ( !iFileName )
-        {
-        iFileName = KLogFile().AllocL();
-        }
-
-    BaflUtils::EnsurePathExistsL( iFs, *iFileName );
-
-    User::LeaveIfError( Dll::SetTls( this ) );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioEngineLogger::~CRadioEngineLogger()
-    {
-    iFile.Close();
-    delete iFileName;
-    }
-
-// ---------------------------------------------------------------------------
-// Clear the log by deleting the logfile.
-// ---------------------------------------------------------------------------
-//
-MRadioEngineLogger& CRadioEngineLogger::ClearLog()
-    {
-    if ( BaflUtils::FileExists( iFs, *iFileName ) )
-        {
-        // Returned error code ignored intentionally because there is no way
-        // to report an error
-        BaflUtils::DeleteFile( iFs, *iFileName );
-        }
-
-    return *this;
-    }
-
-// ---------------------------------------------------------------------------
-// Adds a 8-bit string to log line
-// ---------------------------------------------------------------------------
-//
-MRadioEngineLogger& CRadioEngineLogger::Add( const TDesC8& aMsg )
-    {
-    AddDesC<TPtrC8, TDesC8>( aMsg );
-    return *this;
-    }
-
-// ---------------------------------------------------------------------------
-// Adds a 16-bit string to log line
-// ---------------------------------------------------------------------------
-//
-MRadioEngineLogger& CRadioEngineLogger::Add( const TDesC& aMsg )
-    {
-    // Note! No character conversion is performed while going from 16-bit
-    // descriptor to 8-bit descriptor. This is considered acceptable in a
-    // debugging utility
-    AddDesC<TPtrC, TDesC>( aMsg );
-    return *this;
-    }
-
-// ---------------------------------------------------------------------------
-// Adds a TInt to log line
-// ---------------------------------------------------------------------------
-//
-MRadioEngineLogger& CRadioEngineLogger::Add( TInt aInt )
-    {
-    TBuf8<20> buf8;
-    buf8.Num( aInt );
-    Add( buf8 );
-    return *this;
-    }
-
-// ---------------------------------------------------------------------------
-// Adds a TReal to log line
-// ---------------------------------------------------------------------------
-//
-MRadioEngineLogger& CRadioEngineLogger::Add( const TReal& aReal )
-    {
-    TBuf8<20> buf8;
-    buf8.Format( _L8( "%f" ), aReal );
-    Add( buf8 );
-    return *this;
-    }
-
-// ---------------------------------------------------------------------------
-// Adds a c-style string to log line
-// ---------------------------------------------------------------------------
-//
-MRadioEngineLogger& CRadioEngineLogger::Add( const char* aText )
-    {
-    Add( TPtrC8( reinterpret_cast<const TText8*>( aText ) ) );
-    return *this;
-    }
-
-// ---------------------------------------------------------------------------
-// Adds a pointer value to log line
-// ---------------------------------------------------------------------------
-//
-MRadioEngineLogger& CRadioEngineLogger::Add( const TAny* aPtr )
-    {
-    TBuf8<20> buf8;
-    buf8.Format( KHexFormat, aPtr );
-    Add( buf8 );
-    return *this;
-    }
-
-// ---------------------------------------------------------------------------
-// Adds a timestamp of current time to log line
-// ---------------------------------------------------------------------------
-//
-MRadioEngineLogger& CRadioEngineLogger::Add( const TTime& aTime )
-    {
-    TTimestamp timestamp;
-    ParseTimestamp( aTime, timestamp );
-    Add( timestamp );
-    return *this;
-    }
-
-// ---------------------------------------------------------------------------
-// Adds a timestamp of current time to log line
-// ---------------------------------------------------------------------------
-//
-MRadioEngineLogger& CRadioEngineLogger::AddTimestamp()
-    {
-    TTime now;
-    now.HomeTime();
-    return Add( now );
-    }
-
-// ---------------------------------------------------------------------------
-// Adds a formatted string to log line
-// ---------------------------------------------------------------------------
-//
-MRadioEngineLogger& CRadioEngineLogger::AddFormat( TRefByValue<const TDesC> aFmt, ... )
-    {
-    VA_LIST list;
-    VA_START( list, aFmt );
-
-    TBuf<KLogBufferLength> buf16;
-
-    // Calls Overflow() if it doesn't fit
-    buf16.AppendFormatList( aFmt, list, this );
-
-    VA_END( list );
-
-    Add( buf16 );
-    return *this;
-    }
-
-// ---------------------------------------------------------------------------
-// Adds the line indentation with line prefix to log line
-// ---------------------------------------------------------------------------
-//
-MRadioEngineLogger& CRadioEngineLogger::AddIndent( const TDesC& aMarker )
-    {
-    Add( aMarker );
-    Add( KLogSpace().Mid( 0, iIndent ) );
-    Add( KLogLine() );
-    return *this;
-    }
-
-// ---------------------------------------------------------------------------
-// Adds the line indentation to log line
-// ---------------------------------------------------------------------------
-//
-MRadioEngineLogger& CRadioEngineLogger::AddIndentClear( const TDesC& aMarker )
-    {
-    Add( aMarker );
-    Add( KLogSpace().Mid( 0, iIndent ) );
-    return *this;
-    }
-
-// ---------------------------------------------------------------------------
-// From TDes16Overflow
-// Handles the overflow from AppendFormatList()
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineLogger::Overflow( TDes16& /*aDes*/ )
-    {
-    // aDes contains the part that did fit in the descriptor, but the part that
-    // didn't is lost. Modifying the descriptor here would modify it in AddFormat(),
-    // but since it gets logged there we only need to add a message about the overflow.
-    Add( _L( "FORMAT OVERFLOW! " ) );
-    }
-
-// ---------------------------------------------------------------------------
-// Increment indentation
-// ---------------------------------------------------------------------------
-//
-MRadioEngineLogger& CRadioEngineLogger::IncIndent()
-    {
-    if ( ++iIndent > KMaxIndent )
-        {
-        iIndent = KMaxIndent;
-        }
-
-    return *this;
-    }
-
-// ---------------------------------------------------------------------------
-// Decrement indentation
-// ---------------------------------------------------------------------------
-//
-MRadioEngineLogger& CRadioEngineLogger::DecIndent()
-    {
-    if ( --iIndent < 0 )
-        {
-        iIndent = 0;
-        }
-
-    return *this;
-    }
-
-// ---------------------------------------------------------------------------
-// Commits the log line to file and RDebug and resets internal buffer
-// ---------------------------------------------------------------------------
-//
-MRadioEngineLogger& CRadioEngineLogger::Commit( TBool aNewLine )
-    {
-    // Write log buffer to RDebug
-    RDebug::RawPrint( iBuf8 );
-
-    // Write log buffer to file
-    TInt err = iFile.Open( iFs, *iFileName, EFileWrite );
-    if ( err )
-        {
-        err = iFile.Create( iFs, *iFileName, EFileWrite );
-        }
-
-    if ( !err )
-        {
-        TInt unused = 0;
-        if ( iFile.Seek( ESeekEnd, unused ) == KErrNone )
-            {
-            if ( !iTimeStampWritten )
-                {
-                // First print a timestamp to log
-                TTimestamp timestamp;
-                TTime now;
-                now.HomeTime();
-                ParseTimestamp( now, timestamp );
-                iFile.Write( timestamp );
-                iFile.Write( KTimestampSeparator );
-                iTimeStampWritten = ETrue;
-                }
-
-            iFile.Write( iBuf8 );
-
-            if ( aNewLine )
-                {
-                iFile.Write( KNewLine );
-                iTimeStampWritten = EFalse;
-                }
-            }
-
-        iFile.Close();
-        }
-
-    iBuf8.Zero();
-    return *this;
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the amount of characters that still fit in the buffer
-// ---------------------------------------------------------------------------
-//
-TInt CRadioEngineLogger::Available() const
-    {
-    return iBuf8.MaxLength() - iBuf8.Length();
-    }
-
-// ---------------------------------------------------------------------------
-// Templated function to add either 8-bit or 16-bit descriptor to buffer
-// ---------------------------------------------------------------------------
-//
-template<class PTR, class DESC>
-void CRadioEngineLogger::AddDesC( const DESC& aDesc )
-    {
-    PTR ptr( aDesc );
-    while ( ptr.Length() > Available() )
-        {
-        PTR writePtr = ptr.Left( Available() );
-        iBuf8.Append( writePtr );
-
-        ptr.Set( ptr.Mid( writePtr.Length() ) );
-        Commit( EFalse );
-        }
-
-    iBuf8.Append( ptr );
-    }
-
-// ---------------------------------------------------------------------------
-// Parses the timestamp from the given TTime
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineLogger::ParseTimestamp( const TTime& aTime, TTimestamp& aTimestamp )
-    {
-    TDateTime dateTime = aTime.DateTime();
-    aTimestamp.Zero();
-    aTimestamp.Format( KTimestampFormat, dateTime.Day() + 1,
-                                         dateTime.Month() + 1,
-                                         dateTime.Year(),
-                                         dateTime.Hour(),
-                                         dateTime.Minute(),
-                                         dateTime.Second(),
-                                         dateTime.MicroSecond() );
-    }
-
-// ---------------------------------------------------------------------------
-// Constructor. Log method entry
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TRadioMethodLogger::TRadioMethodLogger( const TText* aFunc,
-                                                 const TText* aRetFormat )
-    : iFunc( aFunc )
-    , iRetFormat( aRetFormat )
-    {
-    MRadioEngineLogger* logger = MRadioEngineLogger::Logger();
-    logger->AddIndentClear( KMarkerEngine ).AddFormat( KLogEnter, &iFunc ).Commit();
-    logger->IncIndent();
-    }
-
-// ---------------------------------------------------------------------------
-// Destructor. Log method exit
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TRadioMethodLogger::~TRadioMethodLogger()
-    {
-    MRadioEngineLogger::Logger()->DecIndent();
-
-    if ( std::uncaught_exception() ) // Leave is an exception
-        {
-        // The function exited with a leave
-        MRadioEngineLogger::Logger()->AddIndentClear( KMarkerEngine ).AddFormat( KLogLeave, &iFunc ).Commit();
-        }
-    else
-        {
-        // The function exited normally
-        if ( iRetFormat.Length() == 0 )
-            {
-            MRadioEngineLogger::Logger()->AddIndentClear( KMarkerEngine ).AddFormat( KLogExit, &iFunc ).Commit();
-            }
-        else
-            {
-            TBuf<100> format( KLogExitRet );
-            format.Append( iRetFormat );
-            #if defined( __WINS__ )
-
-                TInt32 retVal = 0;
-                _asm( mov retVal, ebx );
-                MRadioEngineLogger::Logger()->AddIndentClear( KMarkerEngine ).AddFormat( format, &iFunc, retVal ).Commit();
-
-            #else
-
-                MRadioEngineLogger::Logger()->AddIndentClear( KMarkerEngine ).AddFormat( KLogExit, &iFunc ).Commit();
-
-            #endif
-            }
-        }
-    }
-
-#else // #ifdef LOGGING_ENABLED
-
-// ===========================================================================
-// Dummy function definitions to keep the exports unchanged when logging is turned off
-// These can not be used.
-// ===========================================================================
-EXPORT_C TRadioMethodLogger::TRadioMethodLogger( const TText*, const TText* ) {}
-EXPORT_C TRadioMethodLogger::~TRadioMethodLogger() {}
-
-#endif // #ifdef LOGGING_ENABLED
--- a/radioengine/utils/src/cradioenginetls.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,153 +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:
-*
-*/
-
-// System includes
-#include <coemain.h>
-#include <e32svr.h>
-
-// User includes
-#include "cradioenginelogger.h"
-#include "cradioenginetls.h"
-
-const int KUidRadioEngineTls = 0x10281CB8;
-
-// ======== MEMBER FUNCTIONS ========
-
-
-// ---------------------------------------------------------------------------
-// Returns the CRadioEngineTls instance from TLS
-// ---------------------------------------------------------------------------
-//
-CRadioEngineTls& CRadioEngineTls::Instance()
-    {
-    return *static_cast<CRadioEngineTls*>( UserSvr::DllTls( KUidRadioEngineTls ) );
-    }
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineTls::InitializeL( RFs* aFs )
-    {
-    if ( !UserSvr::DllTls( KUidRadioEngineTls ) )
-        {
-        CRadioEngineTls* self = new ( ELeave ) CRadioEngineTls( aFs );
-        CleanupStack::PushL( self );
-        self->ConstructL();
-        User::LeaveIfError( UserSvr::DllSetTls( KUidRadioEngineTls, self ) );
-        CleanupStack::Pop( self );
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioEngineTls::CRadioEngineTls( RFs* aFs )
-    : iFs( aFs )
-    {
-    }
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineTls::ConstructL()
-    {
-    if ( !iFs || !iFs->Handle() )
-        {
-        iFsOwned = ETrue;
-        iFs = new ( ELeave ) RFs;
-        User::LeaveIfError( iFs->Connect() );
-        }
-
-    
-#ifdef LOGGING_ENABLED
-    iLogger = CRadioEngineLogger::NewL( *iFs );
-#endif // LOGGING_ENABLED
-
-    }
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioEngineTls::~CRadioEngineTls()
-    {
-    UserSvr::DllFreeTls( KUidRadioEngineTls );
-
-#ifdef LOGGING_ENABLED
-    delete iLogger;
-#endif
-
-    if ( iFs && iFsOwned )
-        {
-        iFs->Close();
-        delete iFs;
-        }
-    }
-
-
-// ---------------------------------------------------------------------------
-// Return the logger storage if logging is enabled
-// ---------------------------------------------------------------------------
-//
-MRadioEngineLogger* CRadioEngineTls::Logger()
-    {
-#ifdef LOGGING_ENABLED
-    return CRadioEngineTls::Instance().iLogger;
-#else
-    return NULL;
-#endif
-    }
-
-
-// ---------------------------------------------------------------------------
-// Returns the file server session
-// ---------------------------------------------------------------------------
-//
-RFs& CRadioEngineTls::FsSession()
-    {
-    return *CRadioEngineTls::Instance().iFs;
-    }
-
-
-// ---------------------------------------------------------------------------
-// CRadioEngineTls::AddRef
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineTls::AddRef()
-    {
-    ++iRefs;
-    }
-
-// ---------------------------------------------------------------------------
-// CRadioEngineTls::Release
-// ---------------------------------------------------------------------------
-//
-void CRadioEngineTls::Release()
-    {
-    __ASSERT_DEBUG( iRefs > 0 , User::Panic( _L( "CRadioEngineTls" ), KErrCorrupt ) );
-    if ( !--iRefs )
-        {
-        delete this;
-        }
-    }
--- a/radioengine/utils/src/cradiopropertyobserver.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,213 +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 "cradioenginelogger.h"
-
-#include "cradiopropertyobserver.h"
-
-// ============================ MEMBER FUNCTIONS ===============================
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CRadioPropertyObserver::CRadioPropertyObserver( MRadioPropertyChangeObserver& aObserver,
-                                                const TUid& aCategory,
-                                                const TUint aKey,
-                                                const TRadioPropertyType aPropertyType )
-    : CActive( CActive::EPriorityStandard )
-    , iObserver( aObserver )
-    , iCategory( aCategory )
-    , iKey( aKey )
-    , iPropertyType( aPropertyType )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CRadioPropertyObserver::ConstructL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    switch ( iPropertyType )
-        {
-        case ERadioPropertyInt:
-            {
-            break;
-            }
-        case ERadioPropertyByteArray:
-            {
-            iValueByteArray = HBufC8::NewL( RProperty::KMaxPropertySize );
-            break;
-            }
-        case ERadioPropertyText:
-            {
-            // Max size in bytes, length is size / 2
-            iValueText = HBufC::NewL( RProperty::KMaxPropertySize / 2 );
-            break;
-            }
-        default:
-            {
-            break;
-            }
-        }
-
-    User::LeaveIfError( iProperty.Attach( iCategory, iKey ) );
-    CActiveScheduler::Add( this );
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-EXPORT_C CRadioPropertyObserver* CRadioPropertyObserver::NewL( MRadioPropertyChangeObserver& aObserver,
-                                                               const TUid& aCategory,
-                                                               const TUint aKey,
-                                                               const TRadioPropertyType aPropertyType )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    CRadioPropertyObserver* self = new( ELeave )CRadioPropertyObserver( aObserver,
-                                            aCategory, aKey, aPropertyType );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-CRadioPropertyObserver::~CRadioPropertyObserver()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    Cancel();
-    iProperty.Close();
-    delete iValueByteArray;
-    delete iValueText;
-    }
-
-// ---------------------------------------------------------------------------
-// Subscribes to a property and reads the value, if not already active.
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CRadioPropertyObserver::ActivateL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    if ( !IsActive() )
-        {
-        RunL();
-        }
-    }
-
-// -----------------------------------------------------------------------------
-//
-// -----------------------------------------------------------------------------
-//
-void CRadioPropertyObserver::RunL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-
-    iProperty.Subscribe( iStatus );
-    SetActive();
-
-    TInt err( KErrNone );
-
-    switch ( iPropertyType )
-        {
-        case ERadioPropertyInt:
-            {
-            err = iProperty.Get( iValueInt );
-            if ( !err )
-                {
-                iObserver.HandlePropertyChangeL( iCategory, iKey, iValueInt );
-                }
-            break;
-            }
-        case ERadioPropertyByteArray:
-            {
-            TPtr8 ptr8( iValueByteArray->Des() );
-            err = iProperty.Get( ptr8 );
-            if ( !err )
-                {
-                iObserver.HandlePropertyChangeL( iCategory, iKey, *iValueByteArray );
-                }
-            break;
-            }
-        case ERadioPropertyText:
-            {
-            TPtr ptr( iValueText->Des() );
-            err = iProperty.Get( ptr );
-            if ( !err )
-                {
-                iObserver.HandlePropertyChangeL( iCategory, iKey, *iValueText );
-                }
-            break;
-            }
-        default:
-            {
-            break;
-            }
-        }
-
-    if ( err )
-        {
-        iObserver.HandlePropertyChangeErrorL( iCategory, iKey, err );
-        }
-    }
-
-// -----------------------------------------------------------------------------
-// Cancels an outstanding active request
-// -----------------------------------------------------------------------------
-//
-void CRadioPropertyObserver::DoCancel()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iProperty.Cancel();
-    }
-
-// -----------------------------------------------------------------------------
-// Getter for integer value
-// -----------------------------------------------------------------------------
-//
-EXPORT_C TInt CRadioPropertyObserver::ValueInt() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iValueInt;
-    }
-
-// -----------------------------------------------------------------------------
-// Getter for byte array value
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const TDesC8& CRadioPropertyObserver::ValueDes8() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return *iValueByteArray;
-    }
-
-// -----------------------------------------------------------------------------
-// Getter for text value
-// -----------------------------------------------------------------------------
-//
-EXPORT_C const TDesC& CRadioPropertyObserver::ValueDes() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return *iValueText;
-    }
--- a/radioengine/utils/src/cradioremcontarget.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +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:
-*
-*/
-
-
-// User includes
-#include "cradioremcontarget.h"
-#include "cradioremcontargetimp.h"
-#include "cradioenginelogger.h"
-
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CRadioRemConTarget* CRadioRemConTarget::NewL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return CRadioRemConTargetImp::NewL();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioRemConTarget::~CRadioRemConTarget()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
--- a/radioengine/utils/src/cradioremcontargetimp.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,439 +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:
-*
-*/
-
-// System includes
-#include <RemConCallHandlingTarget.h>
-#include <remconcoreapitarget.h>
-#include <remconinterfaceselector.h>
-
-// User includes
-#include "cradioenginelogger.h"
-#include "cradioremcontargetimp.h"
-#include "mradiocontroleventobserver.h"
-#include "radioengineutils.h"
-
-// Constants
-const TInt KVRVolumeTimerInitialDelay = 1000000; // Initial timer for headset volume up/down press event should expire immediately
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioRemConTargetImp::CRadioRemConTargetImp()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::ConstructL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    RadioEngineUtils::InitializeL();
-    // Create interface selector.
-    iInterfaceSelector = CRemConInterfaceSelector::NewL();
-    // Create a new CRemConCoreApiTarget, owned by the interface selector.
-    iCoreTarget = CRemConCoreApiTarget::NewL( *iInterfaceSelector, *this );
-    // Create a new CRemConCallHandlingTarget, owned by the interface selector.
-    iCallTarget = CRemConCallHandlingTarget::NewL( *iInterfaceSelector, *this );
-    // Start being a target.
-    iInterfaceSelector->OpenTargetL();
-    // Create repeat timer.
-    iRepeatTimer = CPeriodic::NewL( CActive::EPriorityStandard );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioRemConTargetImp* CRadioRemConTargetImp::NewL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    CRadioRemConTargetImp* self = new ( ELeave ) CRadioRemConTargetImp();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioRemConTargetImp::~CRadioRemConTargetImp()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    delete iRepeatTimer;
-    delete iInterfaceSelector; //deletes also iCallTarget and iCoreTarget
-    iCoreTarget = NULL;
-    iCallTarget = NULL;
-    RadioEngineUtils::Release();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::SetControlEventObserver( MRadioControlEventObserver* aControlEventObserver )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iObserver = aControlEventObserver;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::MrccatoCommand( TRemConCoreApiOperationId aOperationId,
-                                         TRemConCoreApiButtonAction aButtonAct )
-    {
-    LOG_METHOD_AUTO;
-    LOG_FORMAT( "aOperationId = %d, aButtonAct = %d", aOperationId, aButtonAct );
-    //TODO: Refactor
-    if ( iObserver )
-        {
-        switch ( aOperationId )
-            {
-            case ERemConCoreApiChannelUp:
-                {
-                if ( aButtonAct == ERemConCoreApiButtonClick )
-                    {
-                    TRAP_IGNORE( iObserver->ChannelUpL( ETrue ); iObserver->ChannelUpL( EFalse ));
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonPress )
-                    {
-                    TRAP_IGNORE( iObserver->ChannelUpL( ETrue ));
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonRelease )
-                    {
-                    TRAP_IGNORE( iObserver->ChannelUpL( EFalse ));
-                    }
-                else {}
-                break;
-                }
-            case ERemConCoreApiChannelDown:
-                {
-                if ( aButtonAct == ERemConCoreApiButtonClick )
-                    {
-                    TRAP_IGNORE( iObserver->ChannelDownL( ETrue ); iObserver->ChannelDownL( EFalse ));
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonPress )
-                    {
-                    TRAP_IGNORE( iObserver->ChannelDownL( ETrue ));
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonRelease )
-                    {
-                    TRAP_IGNORE( iObserver->ChannelDownL( EFalse ));
-                    }
-                else {}
-                break;
-                }
-            case ERemConCoreApiVolumeUp:
-                {
-                if ( aButtonAct == ERemConCoreApiButtonClick )
-                    {
-                    TRAP_IGNORE( iObserver->VolumeUpL( ETrue ); iObserver->VolumeUpL( EFalse ));
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonPress )
-                    {
-                    iRepeatTimer->Cancel();
-                    iRepeatId = ERemConCoreApiVolumeUp;
-                    iRepeatTimer->Start( KVRVolumeTimerInitialDelay, KVRVolumeTimerInitialDelay, TCallBack( RepeatTimerCallback, this ));
-                    TRAP_IGNORE( iObserver->VolumeUpL( ETrue ); iObserver->VolumeUpL( EFalse ));
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonRelease )
-                    {
-                    iRepeatTimer->Cancel();
-                    }
-                else {}
-                break;
-                }
-            case ERemConCoreApiVolumeDown:
-                {
-                if ( aButtonAct == ERemConCoreApiButtonClick )
-                    {
-                    TRAP_IGNORE( iObserver->VolumeDownL( ETrue ); iObserver->VolumeDownL( EFalse ));
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonPress )
-                    {
-                    iRepeatTimer->Cancel();
-                    iRepeatId = ERemConCoreApiVolumeDown;
-                    iRepeatTimer->Start( KVRVolumeTimerInitialDelay, KVRVolumeTimerInitialDelay, TCallBack( RepeatTimerCallback, this ));
-                    TRAP_IGNORE( iObserver->VolumeDownL( ETrue ); iObserver->VolumeDownL( EFalse ));
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonRelease )
-                    {
-                    iRepeatTimer->Cancel();
-                    }
-                else {}
-                break;
-                }
-            case ERemConCoreApiStop:
-                {
-                if ( aButtonAct == ERemConCoreApiButtonClick )
-                    {
-                    TRAP_IGNORE( iObserver->StopL( ETrue ); iObserver->StopL( EFalse ));
-                    }
-                break;
-                }
-            case ERemConCoreApiBackward:
-                {
-                if( aButtonAct == ERemConCoreApiButtonClick )
-                    {
-                    TRAP_IGNORE( iObserver->BackwardL( ETrue ); iObserver->BackwardL( EFalse ));
-                    }
-                break;
-                }
-            case ERemConCoreApiRewind:
-                {
-                if ( aButtonAct == ERemConCoreApiButtonPress )
-                    {
-                    LOG( "ERemConCoreApiRewind" );
-                    TRAP_IGNORE( iObserver->RewindL( ETrue ));
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonRelease )
-                    {
-                    TRAP_IGNORE( iObserver->RewindL( EFalse ));
-                    }
-                else {}
-                break;
-                }
-            case ERemConCoreApiForward:
-                {
-                if( aButtonAct == ERemConCoreApiButtonClick )
-                    {
-                    TRAP_IGNORE( iObserver->ForwardL( ETrue ); iObserver->ForwardL( EFalse ));
-                    }
-                break;
-                }
-            case ERemConCoreApiFastForward:
-                {
-                if ( aButtonAct == ERemConCoreApiButtonPress )
-                    {
-                    LOG( "ERemConCoreApiFastForward" );
-                    TRAP_IGNORE( iObserver->FastForwardL( ETrue ));
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonRelease )
-                    {
-                    TRAP_IGNORE( iObserver->FastForwardL( EFalse ));
-                    }
-                else {}
-                break;
-                }
-            case ERemConCoreApiPlay:
-            case ERemConCoreApiPause:
-            case ERemConCoreApiPausePlayFunction:
-                {
-                if ( aButtonAct == ERemConCoreApiButtonClick )
-                    {
-                    TRAP_IGNORE( iObserver->PausePlayL( ETrue ); iObserver->PausePlayL( EFalse ));
-                    }
-                break;
-                }
-            default:
-                {
-                break;
-                }
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::MrccatoPlay( TRemConCoreApiPlaybackSpeed /*aSpeed*/,
-                                      TRemConCoreApiButtonAction aButtonAct )
-    {
-    LOG_METHOD_AUTO;
-    if ( iObserver )
-        {
-        if ( aButtonAct == ERemConCoreApiButtonClick )
-            {
-            TRAP_IGNORE( iObserver->PlayL( ETrue ); iObserver->PlayL( EFalse ))
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::MrccatoTuneFunction( TBool /*aTwoPart*/,
-                                              TUint /*aMajorChannel*/,
-                                              TUint /*aMinorChannel*/,
-                                              TRemConCoreApiButtonAction /*aButtonAct*/)
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::MrccatoSelectDiskFunction( TUint /*aDisk*/,
-                                                    TRemConCoreApiButtonAction /*aButtonAct*/)
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::MrccatoSelectAvInputFunction( TUint8 /*aAvInputSignalNumber*/,
-                                                       TRemConCoreApiButtonAction /*aButtonAct*/)
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::MrccatoSelectAudioInputFunction( TUint8 /*aAudioInputSignalNumber*/,
-                                                          TRemConCoreApiButtonAction /*aButtonAct*/)
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioRemConTargetImp::RepeatTimerCallback( TAny* aPtr )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-
-    CRadioRemConTargetImp* self = reinterpret_cast<CRadioRemConTargetImp*>( aPtr );
-
-    if ( self )
-        {
-        if ( self->iObserver )
-            {
-            switch ( self->iRepeatId )
-                {
-                case ERemConCoreApiVolumeUp:
-                    {
-                    TRAP_IGNORE( self->iObserver->VolumeUpL( ETrue ); self->iObserver->VolumeUpL( EFalse ))
-                    break;
-                    }
-                case ERemConCoreApiVolumeDown:
-                    {
-                    TRAP_IGNORE( self->iObserver->VolumeDownL( ETrue ); self->iObserver->VolumeDownL( EFalse ))
-                    break;
-                    }
-                default:
-                    {
-                    break;
-                    }
-                }
-            }
-        }
-
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::AnswerCall()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LOG( "This function currently unsupported." );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::AnswerEndCall()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    if ( iObserver )
-        {
-        TRAP_IGNORE( iObserver->AnswerEndCallL())
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::DialCall( const TDesC8& /*aTelNumber*/ )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::EndCall()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::GenerateDTMF( const TChar /*aChar*/ )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::LastNumberRedial()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::MultipartyCalling( const TDesC8& /*aData*/ )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::SpeedDial( const TInt /*aIndex*/ )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::VoiceDial( const TBool /*aActivate*/ )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
--- a/radioengine/utils/src/cradioroutableaudio.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,98 +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:
-*
-*/
-
-// System includes
-#include <AudioOutput.h>
-
-// User includes
-#include "cradioroutableaudio.h"
-#include "cradioaudiorouter.h"
-#include "cradioenginelogger.h"
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CRadioRoutableAudio::CRadioRoutableAudio( CRadioAudioRouter* aAudioRouter )
-    : iAudioRouter( aAudioRouter )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iAudioRouter->RegisterRoutableAudio( this );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CRadioRoutableAudio::~CRadioRoutableAudio()
-    {
-    iAudioRouter->UnRegisterRoutableAudio( this );
-    delete iAudioOutput;
-    delete iAudioRouter;
-    }
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CRadioRoutableAudio::SetAudioOutput( CAudioOutput* aAudioOutput )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    delete iAudioOutput;
-    iAudioOutput = aAudioOutput;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CRadioRoutableAudio::DeleteAudioOutput()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    delete iAudioOutput;
-    iAudioOutput = NULL;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void CRadioRoutableAudio::SetAudioRouteL( RadioEngine::TRadioAudioRoute aRoute )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    if ( iAudioOutput )
-        {
-        iAudioOutput->SetAudioOutputL( aRoute == RadioEngine::ERadioSpeaker ? CAudioOutput::EPublic
-                                                                            : CAudioOutput::EPrivate );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C TBool CRadioRoutableAudio::AudioRoutingSupported() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-#ifdef __WINS__
-    return ETrue;
-#else
-    return iAudioOutput ? ETrue : EFalse;
-#endif
-    }
--- a/radioengine/utils/src/cradiosystemeventcollector.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +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:
-*
-*/
-
-// User includes
-#include "cradiosystemeventcollector.h"
-#include "cradiosystemeventcollectorimp.h"
-#include "cradioenginelogger.h"
-
-// ======== MEMBER FUNCTIONS ========
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CRadioSystemEventCollector* CRadioSystemEventCollector::NewL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return CRadioSystemEventCollectorImp::NewL();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C CRadioSystemEventCollector::~CRadioSystemEventCollector()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
--- a/radioengine/utils/src/cradiosystemeventcollectorimp.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,274 +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:
-*
-*/
-
-// System includes
-#include <e32cmn.h>
-
-// User includes
-#include "cradioaccessoryobserver.h"
-#include "cradiosystemeventcollectorimp.h"
-#include "cradiosystemeventdetector.h"
-#include "radioengineutils.h"
-#include "cradioenginelogger.h"
-
-const TInt KVRObserverArrayGranularity( 2 );
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioSystemEventCollectorImp::CRadioSystemEventCollectorImp() :
-    iSystemEventObservers( KVRObserverArrayGranularity )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventCollectorImp::ConstructL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    RadioEngineUtils::InitializeL();
-    iSystemEventDetector = CRadioSystemEventDetector::NewL( *this );
-
-    iHeadsetObserver = CRadioAccessoryObserver::NewL();
-    iHeadsetObserver->SetObserver( this );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioSystemEventCollectorImp* CRadioSystemEventCollectorImp::NewL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    CRadioSystemEventCollectorImp* self = new( ELeave ) CRadioSystemEventCollectorImp;
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioSystemEventCollectorImp::~CRadioSystemEventCollectorImp()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    delete iSystemEventDetector;
-    delete iHeadsetObserver;
-
-    iSystemEventObservers.Close();
-    RadioEngineUtils::Release();
-    }
-
-// ---------------------------------------------------------------------------
-// Adds a system event observer
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventCollectorImp::AddObserverL( MRadioSystemEventObserver* aHeadsetObserver )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    iSystemEventObservers.AppendL( aHeadsetObserver );
-    }
-
-// ---------------------------------------------------------------------------
-// Removes a system event observer
-// ---------------------------------------------------------------------------
-//
- void CRadioSystemEventCollectorImp::RemoveObserver( MRadioSystemEventObserver* aSystemObserver )
-    {
-     LEVEL3( LOG_METHOD_AUTO );
-    TInt objectIndex = iSystemEventObservers.Find( aSystemObserver );
-
-    if ( objectIndex != KErrNotFound )
-        {
-        iSystemEventObservers.Remove( objectIndex );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// Getter for mobile network state
-// ---------------------------------------------------------------------------
-//
-TBool CRadioSystemEventCollectorImp::IsMobileNetworkCoverage() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iSystemEventDetector->IsMobileNetworkCoverage();
-    }
-
-// ---------------------------------------------------------------------------
-// Getter for network state
-// ---------------------------------------------------------------------------
-//
-TBool CRadioSystemEventCollectorImp::IsNetworkCoverage() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iSystemEventDetector->IsNetworkCoverage();
-    }
-
-// ---------------------------------------------------------------------------
-// Getter for call state
-// ---------------------------------------------------------------------------
-//
-TBool CRadioSystemEventCollectorImp::IsCallActive() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iSystemEventDetector->IsCallActive();
-    }
-
-// ---------------------------------------------------------------------------
-// Getter for audio resource state
-// ---------------------------------------------------------------------------
-//
-TBool CRadioSystemEventCollectorImp::IsAudioResourcesAvailable() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iSystemEventDetector->IsAudioResourcesAvailable();
-    }
-
-// ---------------------------------------------------------------------------
-// Getter for headset connection status
-// ---------------------------------------------------------------------------
-TBool CRadioSystemEventCollectorImp::IsHeadsetConnectedL() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iHeadsetObserver->IsHeadsetConnectedL();
-    }
-
-// ---------------------------------------------------------------------------
-// Notifies the observers of system event
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventCollectorImp::NotifyObserversL( TRadioSystemEventType aEvent )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    for ( TInt i = 0; i < iSystemEventObservers.Count(); ++i )
-        {
-        iSystemEventObservers[i]->HandleSystemEventL( aEvent );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSystemEventDetectorObserver.
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventCollectorImp::NetworkUpCallbackL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    NotifyObserversL( ERadioNetworkCoverageUp );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSystemEventDetectorObserver.
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventCollectorImp::NetworkDownCallbackL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    NotifyObserversL( ERadioNetworkCoverageDown );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSystemEventDetectorObserver.
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventCollectorImp::CallActivatedCallbackL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    NotifyObserversL( ERadioCallActivated );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSystemEventDetectorObserver.
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventCollectorImp::CallDeactivatedCallbackL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    NotifyObserversL( ERadioCallDeactivated );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSystemEventDetectorObserver.
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventCollectorImp::AudioResourcesAvailableL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    NotifyObserversL( ERadioAudioResourcesAvailable );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSystemEventDetectorObserver.
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventCollectorImp::AudioAutoResumeForbiddenL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    NotifyObserversL( ERadioAudioAutoResumeForbidden );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioSystemEventDetectorObserver.
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventCollectorImp::ErrorCallbackL( TInt DEBUGVAR3( aError ) )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    LEVEL3( LOG_FORMAT( "aError = %d", aError ) );
-    // P&S get fail not considered as a critical issue.
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioHeadsetEventObserver.
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventCollectorImp::HeadsetConnectedCallbackL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    NotifyObserversL( ERadioHeadsetConnected );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioHeadsetEventObserver.
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventCollectorImp::HeadsetDisconnectedCallbackL()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    NotifyObserversL( ERadioHeadsetDisconnected );
-    }
-
-// ---------------------------------------------------------------------------
-// From class MRadioAudioRoutingObserver.
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventCollectorImp::AudioRouteChangedL( RadioEngine::TRadioAudioRoute aRoute )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    TRadioSystemEventType ev = ERadioAudioRouteHeadset;
-    if ( aRoute != RadioEngine::ERadioHeadset )
-        {
-        ev = ERadioAudioRouteSpeaker;
-        }
-
-    NotifyObserversL( ev );
-    }
--- a/radioengine/utils/src/cradiosystemeventdetector.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,312 +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 <e32def.h> // Define before audiopolicy defs
-#include <e32std.h> // Define before audiopolicy defs
-#include <eikdef.h>
-
-#ifndef __WINS__
-
-//#include <audiopolicypubsubdata.h>
-//#include <audiosw_pubsubkeys.h>
-#include <AudioClientsListPSKeys.h>
-
-#endif //__WINS__
-
-#include <ctsydomainpskeys.h>
-#include <publicruntimeids.hrh>
-#include <sacls.h>
-
-// User includes
-#include "cradioenginelogger.h"
-#include "cradiosystemeventdetector.h"
-#include "mradiosystemeventdetectorobserver.h"
-
-/** Granularity for audio category arrays. */
-//const TInt KVRAudioCategoryArrayGranularity = 3;
-
-// This has to be the last include. 
-#ifdef STUB_CONSTELLATION
-#   include "RadioStubManager.h"
-#   define KUidSystemCategory KStub_KUidSystemCategory
-#   define KPSUidCtsyCallInformation KStub_KPSUidCtsyCallInformation
-#   define KPSUidVoiceUiAccMonitor KStub_KPSUidVoiceUiAccMonitor
-#   define KPSUidMMFAudioServer KStub_KPSUidMMFAudioServer
-#endif //STUB_CONSTELLATION
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioSystemEventDetector::CRadioSystemEventDetector( MRadioSystemEventDetectorObserver&  aObserver )
-    : iObserver( aObserver )
-    , iIsMobileNetworkCoverage( EFalse )
-    , iIsCallActive( EFalse )
-    , iIsAudioResourcesAvailable( ETrue )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventDetector::ConstructL()
-    {
-    LOG_METHOD_AUTO;
-    iNetworkStatusObserver = CRadioPropertyObserver::NewL( *this,
-                                                           KUidSystemCategory,
-                                                           KUidNetworkStatusValue,
-                                                           CRadioPropertyObserver::ERadioPropertyInt );
-    iNetworkStatusObserver->ActivateL();
-
-    iIsMobileNetworkCoverage = iNetworkStatusObserver->ValueInt() == ESANetworkAvailable;
-
-    // Initialize call state observer.
-    iCallStatusObserver = CRadioPropertyObserver::NewL( *this,
-                                                        KPSUidCtsyCallInformation,
-                                                        KCTsyCallState,
-                                                        CRadioPropertyObserver::ERadioPropertyInt );
-    iCallStatusObserver->ActivateL();
-    iIsCallActive = iCallStatusObserver->ValueInt() != EPSCTsyCallStateNone;
-/*
-#ifndef __WINS__
-    // Define audio types for not resuming.
-    //TODO: Check these audio resume categories!
-    iNoAutoResumeAudioCategories = RArray<TInt>( KVRAudioCategoryArrayGranularity );
-    iNoAutoResumeAudioCategories.AppendL( ECatMediaPlayer );
-    iNoAutoResumeAudioCategories.AppendL( ECatMobileTv );
-    iNoAutoResumeAudioCategories.AppendL( ECatUnknownPlayer );
-    iNoAutoResumeAudioCategories.Compress();
-    // Start listening audio client events.
-    iAudioPolicyObserver = CRadioPropertyObserver::NewL( *this, KPSUidMMFAudioServer, KAudioPolicyAudioClients, CRadioPropertyObserver::ERadioPropertyByteArray );
-    iAudioPolicyObserver->ActivateL();
-#endif
-*/
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioSystemEventDetector::~CRadioSystemEventDetector()
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    delete iCallStatusObserver;
-    delete iNetworkStatusObserver;
-    delete iAudioPolicyObserver;
-
-    iNoAutoResumeAudioCategories.Close();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioSystemEventDetector* CRadioSystemEventDetector::NewL( MRadioSystemEventDetectorObserver&  aObserver )
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    CRadioSystemEventDetector* self = new ( ELeave ) CRadioSystemEventDetector( aObserver );
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-// Handling of the int property changes is done here.
-// Observer components are getting notifications in correspondence with what
-// has changed
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventDetector::HandlePropertyChangeL( const TUid& aCategory,
-                                                       const TUint aKey,
-                                                       const TInt aValue )
-    {
-    LEVEL2( LOG_METHOD_AUTO );
-    if ( aCategory == KPSUidCtsyCallInformation && aKey == KCTsyCallState )
-        {
-        if ( (!iIsCallActive ) && ( aValue > EPSCTsyCallStateNone ))
-            {
-            iIsCallActive = ETrue;
-            iObserver.CallActivatedCallbackL();
-            }
-        else if ( ( iIsCallActive ) && ( aValue <= EPSCTsyCallStateNone ))
-            {
-            iIsCallActive = EFalse;
-            iObserver.CallDeactivatedCallbackL();
-            }
-        }
-    }
-
-#ifndef __WINS__
-// ---------------------------------------------------------------------------
-// Handling of the byte array property changes is done here.
-// Observer components are getting notifications in correspondence with what
-// has changed
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventDetector::HandlePropertyChangeL( const TUid& aCategory,
-                                                       const TUint aKey,
-                                                       const TDesC8& aValue )
-    {
-#if 0
-    LEVEL2( LOG_METHOD_AUTO );
-    LOG_FORMAT( "Category: %d, Key: %d", aCategory, aKey );
-    if ( aCategory == KPSUidMMFAudioServer )
-        {
-        if ( aKey == KAudioPolicyAudioClients )
-            {
-            TBool atLeastOneAutoResumeAudioPlaying( EFalse );
-            TBool atLeastOneNoAutoResumeAudioPlaying( EFalse );
-            TBool radioPlaying( EFalse );
-            TAudioClientList audioClients;
-            audioClients.Copy( aValue );
-            // Check all playing audios!
-            for ( TInt i = 0; i < audioClients().iNumOfProcesses ; ++i )
-                {
-                TInt cat = audioClients().iClientCategoryList[i];
-                LOG_FORMAT( "Check audio cat %x", cat );
-                if ( cat == ECatFmRadio )
-                    {
-                    radioPlaying = ETrue;
-                    }
-                else if ( iNoAutoResumeAudioCategories.Find( cat ) != KErrNotFound )
-                    {
-                    atLeastOneNoAutoResumeAudioPlaying = ETrue;
-                    }
-                else
-                    {
-                    atLeastOneAutoResumeAudioPlaying = ETrue;
-                    }
-                }
-
-            if ( !radioPlaying )
-                {
-                // Decide audio resource availability from audio category info.
-                if ( atLeastOneNoAutoResumeAudioPlaying )
-                    {
-                    LOG( "Audio resources not available. Change informed." );
-                    iIsAudioResourcesAvailable = EFalse;
-                    iObserver.AudioAutoResumeForbiddenL();
-                    }
-                else if ( !atLeastOneAutoResumeAudioPlaying )
-                    {
-                    if ( !iIsVoiceUiActive )
-                        {
-                        LOG( "Audio resources available. Change informed." );
-                        iIsAudioResourcesAvailable = ETrue;
-                        iObserver.AudioResourcesAvailableL();
-                        }
-                    else
-                        {
-                        LOG( "Audio resources available. Change not informed." );
-                        iIsAudioResourcesAvailable = ETrue;
-                        }
-                    }
-                else
-                    {
-                    LOG( "Audio resources not available. Change not informed." );
-                    iIsAudioResourcesAvailable = EFalse;
-                    }
-                }
-            else // audio resources are considered to be available when radio is playing
-                {
-                iIsAudioResourcesAvailable = ETrue;
-                }
-            }
-        }
-#endif
-    }
-
-#else //__WINS__
-// ---------------------------------------------------------------------------
-// Dummy version for WINS in order to avoid compiler warnings.
-// The real implementation of function is above.
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventDetector::HandlePropertyChangeL( const TUid& /*aCategory*/,
-                                                       const TUint /*aKey*/,
-                                                        const TDesC8& /*aValue*/)
-    {
-    }
-#endif
-
-// ---------------------------------------------------------------------------
-// Handling of the text property changes is done here.
-// Observer components are getting notifications in correspondence with what
-// has changed
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventDetector::HandlePropertyChangeL( const TUid& /*aCategory*/,
-                                                       const TUint /*aKey*/,
-                                                       const TDesC& /*aValue*/)
-    {
-    }
-
-// ---------------------------------------------------------------------------
-// This is a callback function which is called when a P&S components returns
-// an error
-// ---------------------------------------------------------------------------
-//
-void CRadioSystemEventDetector::HandlePropertyChangeErrorL( const TUid& /*aCategory*/,
-                                                            const TUint /*aKey*/,
-                                                            TInt /*aError*/ )
-    {
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioSystemEventDetector::IsMobileNetworkCoverage() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iIsMobileNetworkCoverage;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioSystemEventDetector::IsNetworkCoverage() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iIsMobileNetworkCoverage;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioSystemEventDetector::IsCallActive() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iIsCallActive;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioSystemEventDetector::IsAudioResourcesAvailable() const
-    {
-    LEVEL3( LOG_METHOD_AUTO );
-    return iIsAudioResourcesAvailable;
-    }
--- a/radioengine/utils/src/radioengineutils.cpp	Tue Aug 31 15:15:02 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:
-*
-*/
-
-// System includes
-#include <StringLoader.h>
-
-// User includes
-#include "radioengineutils.h"
-#include "cradioenginetls.h"
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void RadioEngineUtils::InitializeL()
-    {
-    CRadioEngineTls::InitializeL();
-    CRadioEngineTls::Instance().AddRef();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C void RadioEngineUtils::Release()
-    {
-    CRadioEngineTls::Instance().Release();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-EXPORT_C MRadioEngineLogger* RadioEngineUtils::Logger()
-    {
-    return CRadioEngineTls::Instance().Logger();
-    }
-
-// ---------------------------------------------------------------------------
-// Returns the file server session
-// ---------------------------------------------------------------------------
-//
-EXPORT_C RFs& RadioEngineUtils::FsSession()
-    {
-    return CRadioEngineTls::Instance().FsSession();
-    }
--- a/radioengine/utils/stub/bwins/fmradioengineutils_stubu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,28 +0,0 @@
-EXPORTS
-	?ValueDes8@CRadioPropertyObserver@@QBEABVTDesC8@@XZ @ 1 NONAME ; class TDesC8 const & CRadioPropertyObserver::ValueDes8(void) const
-	?SetAudioRouteL@CRadioRoutableAudio@@QAEXW4TRadioAudioRoute@RadioEngine@@@Z @ 2 NONAME ; void CRadioRoutableAudio::SetAudioRouteL(enum RadioEngine::TRadioAudioRoute)
-	??0CRadioRoutableAudio@@QAE@PAVCRadioAudioRouter@@@Z @ 3 NONAME ; CRadioRoutableAudio::CRadioRoutableAudio(class CRadioAudioRouter *)
-	?InitializeL@RadioEngineUtils@@SAXXZ @ 4 NONAME ; void RadioEngineUtils::InitializeL(void)
-	?NewL@CRadioRemConTarget@@SAPAV1@XZ @ 5 NONAME ; class CRadioRemConTarget * CRadioRemConTarget::NewL(void)
-	??1TRadioMethodLogger@@QAE@XZ @ 6 NONAME ; TRadioMethodLogger::~TRadioMethodLogger(void)
-	??1CRadioRoutableAudio@@UAE@XZ @ 7 NONAME ; CRadioRoutableAudio::~CRadioRoutableAudio(void)
-	?SetAudioOutput@CRadioRoutableAudio@@IAEXPAVCAudioOutput@@@Z @ 8 NONAME ; void CRadioRoutableAudio::SetAudioOutput(class CAudioOutput *)
-	?RegisterRoutableAudio@CRadioAudioRouter@@QAEXPAVCRadioRoutableAudio@@@Z @ 9 NONAME ; void CRadioAudioRouter::RegisterRoutableAudio(class CRadioRoutableAudio *)
-	?ValueDes@CRadioPropertyObserver@@QBEABVTDesC16@@XZ @ 10 NONAME ; class TDesC16 const & CRadioPropertyObserver::ValueDes(void) const
-	??1CRadioSystemEventCollector@@UAE@XZ @ 11 NONAME ; CRadioSystemEventCollector::~CRadioSystemEventCollector(void)
-	??1CRadioAudioRouter@@UAE@XZ @ 12 NONAME ; CRadioAudioRouter::~CRadioAudioRouter(void)
-	?ActivateL@CRadioPropertyObserver@@QAEXXZ @ 13 NONAME ; void CRadioPropertyObserver::ActivateL(void)
-	?Logger@RadioEngineUtils@@SAPAVMRadioEngineLogger@@XZ @ 14 NONAME ; class MRadioEngineLogger * RadioEngineUtils::Logger(void)
-	?NewL@CRadioSystemEventCollector@@SAPAV1@XZ @ 15 NONAME ; class CRadioSystemEventCollector * CRadioSystemEventCollector::NewL(void)
-	?Logger@MRadioEngineLogger@@SAPAV1@XZ @ 16 NONAME ; class MRadioEngineLogger * MRadioEngineLogger::Logger(void)
-	?Release@RadioEngineUtils@@SAXXZ @ 17 NONAME ; void RadioEngineUtils::Release(void)
-	?DeleteAudioOutput@CRadioRoutableAudio@@IAEXXZ @ 18 NONAME ; void CRadioRoutableAudio::DeleteAudioOutput(void)
-	?ValueInt@CRadioPropertyObserver@@QBEHXZ @ 19 NONAME ; int CRadioPropertyObserver::ValueInt(void) const
-	?SetAudioRouteL@CRadioAudioRouter@@QAEXW4TRadioAudioRoute@RadioEngine@@@Z @ 20 NONAME ; void CRadioAudioRouter::SetAudioRouteL(enum RadioEngine::TRadioAudioRoute)
-	?FsSession@RadioEngineUtils@@SAAAVRFs@@XZ @ 21 NONAME ; class RFs & RadioEngineUtils::FsSession(void)
-	?NewL@CRadioAudioRouter@@SAPAV1@AAVMRadioAudioRoutingObserver@@@Z @ 22 NONAME ; class CRadioAudioRouter * CRadioAudioRouter::NewL(class MRadioAudioRoutingObserver &)
-	?UnRegisterRoutableAudio@CRadioAudioRouter@@QAEXPAVCRadioRoutableAudio@@@Z @ 23 NONAME ; void CRadioAudioRouter::UnRegisterRoutableAudio(class CRadioRoutableAudio *)
-	?AudioRoutingSupported@CRadioRoutableAudio@@QBEHXZ @ 24 NONAME ; int CRadioRoutableAudio::AudioRoutingSupported(void) const
-	??0TRadioMethodLogger@@QAE@PBG0@Z @ 25 NONAME ; TRadioMethodLogger::TRadioMethodLogger(unsigned short const *, unsigned short const *)
-	?NewL@CRadioPropertyObserver@@SAPAV1@AAVMRadioPropertyChangeObserver@@ABVTUid@@IW4TRadioPropertyType@1@@Z @ 26 NONAME ; class CRadioPropertyObserver * CRadioPropertyObserver::NewL(class MRadioPropertyChangeObserver &, class TUid const &, unsigned int, enum CRadioPropertyObserver::TRadioPropertyType)
-
--- a/radioengine/utils/stub/eabi/fmradioengineutils_stubu.def	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-EXPORTS
-	_ZN16RadioEngineUtils11InitializeLEv @ 1 NONAME
-	_ZN16RadioEngineUtils6LoggerEv @ 2 NONAME
-	_ZN16RadioEngineUtils7ReleaseEv @ 3 NONAME
-	_ZN16RadioEngineUtils9FsSessionEv @ 4 NONAME
-	_ZN17CRadioAudioRouter14SetAudioRouteLEN11RadioEngine16TRadioAudioRouteE @ 5 NONAME
-	_ZN17CRadioAudioRouter21RegisterRoutableAudioEP19CRadioRoutableAudio @ 6 NONAME
-	_ZN17CRadioAudioRouter23UnRegisterRoutableAudioEP19CRadioRoutableAudio @ 7 NONAME
-	_ZN17CRadioAudioRouter4NewLER26MRadioAudioRoutingObserver @ 8 NONAME
-	_ZN17CRadioAudioRouterD0Ev @ 9 NONAME
-	_ZN17CRadioAudioRouterD1Ev @ 10 NONAME
-	_ZN17CRadioAudioRouterD2Ev @ 11 NONAME
-	_ZN18CRadioRemConTarget4NewLEv @ 12 NONAME
-	_ZN18MRadioEngineLogger6LoggerEv @ 13 NONAME
-	_ZN18TRadioMethodLoggerC1EPKtS1_ @ 14 NONAME
-	_ZN18TRadioMethodLoggerC2EPKtS1_ @ 15 NONAME
-	_ZN18TRadioMethodLoggerD1Ev @ 16 NONAME
-	_ZN18TRadioMethodLoggerD2Ev @ 17 NONAME
-	_ZN19CRadioRoutableAudio14SetAudioOutputEP12CAudioOutput @ 18 NONAME
-	_ZN19CRadioRoutableAudio14SetAudioRouteLEN11RadioEngine16TRadioAudioRouteE @ 19 NONAME
-	_ZN19CRadioRoutableAudio17DeleteAudioOutputEv @ 20 NONAME
-	_ZN19CRadioRoutableAudioC1EP17CRadioAudioRouter @ 21 NONAME
-	_ZN19CRadioRoutableAudioC2EP17CRadioAudioRouter @ 22 NONAME
-	_ZN19CRadioRoutableAudioD0Ev @ 23 NONAME
-	_ZN19CRadioRoutableAudioD1Ev @ 24 NONAME
-	_ZN19CRadioRoutableAudioD2Ev @ 25 NONAME
-	_ZN22CRadioPropertyObserver4NewLER28MRadioPropertyChangeObserverRK4TUidjNS_18TRadioPropertyTypeE @ 26 NONAME
-	_ZN22CRadioPropertyObserver9ActivateLEv @ 27 NONAME
-	_ZN26CRadioSystemEventCollector4NewLEv @ 28 NONAME
-	_ZN26CRadioSystemEventCollectorD0Ev @ 29 NONAME
-	_ZN26CRadioSystemEventCollectorD1Ev @ 30 NONAME
-	_ZN26CRadioSystemEventCollectorD2Ev @ 31 NONAME
-	_ZNK19CRadioRoutableAudio21AudioRoutingSupportedEv @ 32 NONAME
-	_ZNK22CRadioPropertyObserver8ValueDesEv @ 33 NONAME
-	_ZNK22CRadioPropertyObserver8ValueIntEv @ 34 NONAME
-	_ZNK22CRadioPropertyObserver9ValueDes8Ev @ 35 NONAME
-	_ZTI15CRadioEngineTls @ 36 NONAME
-	_ZTI19CRadioRoutableAudio @ 37 NONAME
-	_ZTV15CRadioEngineTls @ 38 NONAME
-	_ZTV19CRadioRoutableAudio @ 39 NONAME
-
--- a/radioengine/utils/stub/group/bld.inf	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#include "../../../group/buildflags.hrh"
-
-#include <platform_paths.hrh>
-
-PRJ_PLATFORMS
-WINSCW ARMV5
-
-PRJ_EXPORTS
-
-PRJ_MMPFILES
-radioengineutils_stub.mmp
--- a/radioengine/utils/stub/group/radioengineutils_stub.mmp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,78 +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 "../../../group/buildflags.hrh"
-
-#include <platform_paths.hrh>
-
-#include <data_caging_paths.hrh>
-
-TARGET                  fmradioengineutils_stub.dll
-TARGETTYPE              DLL
-UID                     0x1000008D 0x01000002
-VERSION                 10.0
-
-CAPABILITY              CAP_GENERAL_DLL
-VENDORID                VID_DEFAULT
-PAGED
-SMPSAFE
-
-USERINCLUDE             ../inc
-USERINCLUDE             ../../api
-USERINCLUDE             ../../inc
-USERINCLUDE             /sf/mw/mmmw/mmserv/radioutility/inc
-USERINCLUDE             /sf/mw/mmmw/mmserv/inc
-USERINCLUDE             /sf/mw/mmmw/inc
-
-APP_LAYER_SYSTEMINCLUDE
-SYSTEMINCLUDE           /epoc32/include/remcon
-SYSTEMINCLUDE           /epoc32/include/mmf/common
-SYSTEMINCLUDE           /epoc32/include/platform/mw
-
-SOURCEPATH              ../../src
-SOURCE                  radioengineutils.cpp
-SOURCE                  cradioenginetls.cpp
-SOURCE                  cradioroutableaudio.cpp
-SOURCE                  cradioaudiorouter.cpp
-SOURCE                  cradiopropertyobserver.cpp
-SOURCE                  cradioremcontarget.cpp
-SOURCE                  cradiosystemeventdetector.cpp
-SOURCE                  cradiosystemeventcollector.cpp
-SOURCE                  cradiosystemeventcollectorimp.cpp
-SOURCE                  cradioenginelogger.cpp
-
-SOURCEPATH              ../src
-SOURCE                  cradioaccessoryobserver_stub.cpp
-SOURCE                  cradioremcontargetimp_stub.cpp
- 
-LIBRARY                 bafl.lib
-LIBRARY                 accclient.lib
-LIBRARY                 accpolicy.lib
-LIBRARY                 centralrepository.lib
-LIBRARY                 CommonEngine.lib
-LIBRARY                 efsrv.lib
-LIBRARY                 euser.lib
-LIBRARY                 cone.lib
-LIBRARY                 remconcoreapi.lib
-LIBRARY                 remconextensionapi.lib
-LIBRARY                 remconinterfacebase.lib
-LIBRARY                 featmgr.lib
-LIBRARY                 flogger.lib 
-LIBRARY                 Radio_Utility_Stub.lib
-LIBRARY                 RadioSession_Stub.lib // SRadioStubManager functions
-
-MACRO STUB_CONSTELLATION
--- a/radioengine/utils/stub/inc/cradioaccessoryobserver_stub.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,90 +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 the License "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 CRADIOACCESSORYOBSERVERSTUB_H
-#define CRADIOACCESSORYOBSERVERSTUB_H
-
-#include <AccessoryServer.h>
-#include <AccessoryConnection.h>
-#include <AccPolSubblockNameArray.h>
-#include <RadioStubManager.h>
-
-class MRadioHeadsetEventObserver;
-
-/**
- *  Observer of accessory states.
- *
- *  Instance of this class observes notifications of headset state changes.
- *  In its turn it sends notifications to its observer of those changes.
- *
- */
-NONSHARABLE_CLASS( CRadioAccessoryObserver ): public CBase
-{
-public:
-
-    /**
-     * C++ default constructor.
-     */
-    CRadioAccessoryObserver();
-
-    /**
-     * Static constructor.
-     */
-    static CRadioAccessoryObserver* NewL();
-
-    /**
-     * Destructor.
-     */
-    virtual ~CRadioAccessoryObserver();
-
-    /**
-     * Sets observer. The observer will be notified when headset has been
-     * pressed or headset is connected/disconnected.
-      *
-     * @param aObserver Observer
-     */
-    void SetObserver( MRadioHeadsetEventObserver* aObserver );
-
-    /**
-     * Tells if there is a headset connected.
-     *
-     * @return <code>ETrue </code> if headset accessory is connected,
-     * <code>EFalse</code> otherwise
-     */
-    TBool IsHeadsetConnectedL() const;
-
-private:
-
-    /**
-     * By default Symbian 2nd phase constructor is private.
-     *
-     * @param aAccessoryServer Existing session for The Accessory Server.
-     */
-    void ConstructL();
-
-
-private: // data
-
-    // RadioStubManager pointer points inside RadioStubManagerChunk
-    SRadioStubManager* iRadioStubManager;
-    
-    // RadioStubManagerChunk handle
-    RChunk iRadioStubManagerChunk;
-
-};
-
-#endif // CRADIOACCESSORYOBSERVERSTUB_H
--- a/radioengine/utils/stub/inc/cradioremcontargetimp_stub.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,116 +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 CRADIOREMCONTARGETIMP_H
-#define CRADIOREMCONTARGETIMP_H
-
-// System includes
-#include <RemConCallHandlingTargetObserver.h>
-#include <remconcoreapitargetobserver.h>
-#include <RadioStubManager.h>
-
-// User includes
-#include "cradioremcontarget.h"
-
-// Forward declarations
-class CRemConCallHandlingTarget;
-class CRemConCoreApiTarget;
-class CRemConInterfaceSelector;
-
-// Class declaration
-
-/**
- * Media key listener
- */
-NONSHARABLE_CLASS( CRadioRemConTargetImp ) : public CRadioRemConTarget
-                                           , public MRemConCoreApiTargetObserver
-                                           , public MRemConCallHandlingTargetObserver
-    {
-public:
-
-    static CRadioRemConTargetImp* NewL();
-
-    virtual ~CRadioRemConTargetImp();
-
-private:
-
-// from base class CRadioRemConTarget
-
-    void SetControlEventObserver( MRadioControlEventObserver* aControlEventObserver );
-
-// from base class MRemConCoreApiTargetObserver
-
-    void MrccatoCommand( TRemConCoreApiOperationId aOperationId, TRemConCoreApiButtonAction aButtonAct );
-    void MrccatoPlay( TRemConCoreApiPlaybackSpeed aSpeed, TRemConCoreApiButtonAction aButtonAct );
-    void MrccatoTuneFunction( TBool aTwoPart, TUint aMajorChannel, TUint aMinorChannel, TRemConCoreApiButtonAction aButtonAct );
-    void MrccatoSelectDiskFunction( TUint aDisk, TRemConCoreApiButtonAction aButtonAct );
-    void MrccatoSelectAvInputFunction( TUint8 aAvInputSignalNumber, TRemConCoreApiButtonAction aButtonAct );
-    void MrccatoSelectAudioInputFunction( TUint8 aAudioInputSignalNumber, TRemConCoreApiButtonAction aButtonAct );
-
-// from base class MRemConCallHandlingTargetObserver
-
-    void AnswerCall();
-    void AnswerEndCall();
-    void DialCall( const TDesC8& aTelNumber );
-    void EndCall();
-    void GenerateDTMF( const TChar aChar );
-    void LastNumberRedial();
-    void MultipartyCalling( const TDesC8& aData );
-    void SpeedDial( const TInt aIndex );
-    void VoiceDial( const TBool aActivate );
-
-private:
-
-    CRadioRemConTargetImp();
-
-    void ConstructL();
-
-    /**
-     * Callback for repeat timer.
-     * @param aPtr Pointer to this class.
-     */
-    static TInt RepeatTimerCallback( TAny* aPtr );
-
-private: // data
-
-    /** Pointer to observer in UI side, can be NULL. Not owned. */
-    MRadioControlEventObserver* iObserver;
-
-    /** RemCon interface selector. */
-    CRemConInterfaceSelector*   iInterfaceSelector;
-
-    /** RemCon Core API target class. */
-    CRemConCoreApiTarget*       iCoreTarget;
-
-    /** RemCon Call API target class. */
-    CRemConCallHandlingTarget*  iCallTarget;
-
-    /** Timer for generating repeat events. */
-    CPeriodic*                  iRepeatTimer;
-
-    /** Operation id to repeat. */
-    TRemConCoreApiOperationId   iRepeatId;
-
-		// RadioStubManager pointer points inside RadioStubManagerChunk
-		SRadioStubManager* iRadioStubManager;
-		
-		// RadioStubManagerChunk handle
-		RChunk iRadioStubManagerChunk;
-
-    };
-
-#endif // CRADIOREMCONTARGETIMP_H
--- a/radioengine/utils/stub/src/cradioaccessoryobserver_stub.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,113 +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 the License "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 "cradioenginelogger.h"
-
-#include "cradioaccessoryobserver_stub.h"
-#include "mradioheadseteventobserver.h"
-
-#define STUB  iRadioStubManager->iAccessoryObserver
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioAccessoryObserver::CRadioAccessoryObserver()
-    {
-    LOG_METHOD_AUTO;
-    }
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioAccessoryObserver::ConstructL()
-    {
-    LOG_METHOD_AUTO;
-    // Open chunk for test configuration/control data
-    TInt err = iRadioStubManagerChunk.OpenGlobal(
-            KRadioStubManagerLocalChunkName,
-            EFalse, // == Read | Write
-            EOwnerThread );
-    User::LeaveIfError( err );
-    if ( sizeof(SRadioStubManager) > iRadioStubManagerChunk.MaxSize() )
-        {
-        User::Leave( KErrTooBig );
-        }
-    TUint8* basePtr = iRadioStubManagerChunk.Base();
-    User::LeaveIfNull( basePtr );    
-    iRadioStubManager = (SRadioStubManager*)basePtr;
-    if ( STUB.iLeaveNewL.iError )
-        {
-        User::Leave( STUB.iLeaveNewL.iError );
-        }
-    if ( STUB.iLeaveConstructL.iError )
-        {
-        User::Leave( STUB.iLeaveConstructL.iError );
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioAccessoryObserver* CRadioAccessoryObserver::NewL()
-    {
-    LOG_METHOD_AUTO;
-    CRadioAccessoryObserver* self = new( ELeave ) CRadioAccessoryObserver;
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop( self );
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioAccessoryObserver::~CRadioAccessoryObserver()
-    {
-    LOG_METHOD_AUTO;
-    iRadioStubManagerChunk.Close();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TBool CRadioAccessoryObserver::IsHeadsetConnectedL() const
-    {
-    LOG_METHOD_AUTO;
-    if ( STUB.iLeaveIsHeadsetConnectedL.iError )
-        {
-        User::Leave( STUB.iLeaveIsHeadsetConnectedL.iError );
-        }
-    return STUB.iHeadsetConnected;
-    }
-
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioAccessoryObserver::SetObserver( MRadioHeadsetEventObserver* aObserver )
-    {
-    LOG_METHOD_AUTO;
-    STUB.iObserver = aObserver;
-    }
-
--- a/radioengine/utils/stub/src/cradioremcontargetimp_stub.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,459 +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 the License "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:
-*
-*/
-
-// System includes
-#include <RemConCallHandlingTarget.h>
-#include <remconcoreapitarget.h>
-#include <remconinterfaceselector.h>
-
-// User includes
-#include "cradioenginelogger.h"
-#include "cradioremcontargetimp_stub.h"
-#include "mradiocontroleventobserver.h"
-#include "radioengineutils.h"
-
-#define STUB  iRadioStubManager->iRemConTarget
-
-// Constants
-const TInt KVRVolumeTimerInitialDelay = 0; // Initial timer for headset volume up/down press event should expire immediately
-
-// ================= MEMBER FUNCTIONS =======================
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioRemConTargetImp::CRadioRemConTargetImp()
-    {
-    LOG_METHOD_AUTO;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::ConstructL()
-    {
-    LOG_METHOD_AUTO;;
-    // Open chunk for test configuration/control data
-    TInt err = iRadioStubManagerChunk.OpenGlobal(
-            KRadioStubManagerLocalChunkName,
-            EFalse, // == Read | Write
-            EOwnerThread );
-    User::LeaveIfError( err );
-    if ( sizeof(SRadioStubManager) > iRadioStubManagerChunk.MaxSize() )
-        {
-        User::Leave( KErrTooBig );
-        }
-    TUint8* basePtr = iRadioStubManagerChunk.Base();
-    User::LeaveIfNull( basePtr );
-    iRadioStubManager = (SRadioStubManager*)basePtr;
-    if ( STUB.iLeaveNewL.iError )
-        {
-        User::Leave( STUB.iLeaveNewL.iError );
-        }
-    if ( STUB.iLeaveConstructL.iError )
-        {
-        User::Leave( STUB.iLeaveConstructL.iError );
-        }
-    STUB.iRemConCoreApiTargetObserver = this;
-    STUB.iRemConCallHandlingTargetObserver = this;
-    RadioEngineUtils::InitializeL();
-    // Create interface selector.
-        //iInterfaceSelector = CRemConInterfaceSelector::NewL();
-    // Create a new CRemConCoreApiTarget, owned by the interface selector.
-        //iCoreTarget = CRemConCoreApiTarget::NewL( *iInterfaceSelector, *this );
-    // Create a new CRemConCallHandlingTarget, owned by the interface selector.
-        //iCallTarget = CRemConCallHandlingTarget::NewL( *iInterfaceSelector, *this );
-    // Start being a target.
-        //iInterfaceSelector->OpenTargetL();
-    // Create repeat timer.
-    iRepeatTimer = CPeriodic::NewL( CActive::EPriorityStandard );
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioRemConTargetImp* CRadioRemConTargetImp::NewL()
-    {
-    LOG_METHOD_AUTO;;
-    CRadioRemConTargetImp* self = new ( ELeave ) CRadioRemConTargetImp();
-    CleanupStack::PushL( self );
-    self->ConstructL();
-    CleanupStack::Pop();
-    return self;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-CRadioRemConTargetImp::~CRadioRemConTargetImp()
-    {
-    LOG_METHOD_AUTO;;
-    if ( iRepeatTimer )
-        {
-        iRepeatTimer->Cancel();
-        }
-    delete iRepeatTimer;
-    //delete iInterfaceSelector; //deletes also iCallTarget and iCoreTarget
-    //iCoreTarget = NULL;
-    //iCallTarget = NULL;
-    RadioEngineUtils::Release();
-    iRadioStubManagerChunk.Close();
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::SetControlEventObserver( MRadioControlEventObserver* aControlEventObserver )
-    {
-    LOG_METHOD_AUTO;;
-    iObserver = aControlEventObserver;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::MrccatoCommand( TRemConCoreApiOperationId aOperationId,
-                                         TRemConCoreApiButtonAction aButtonAct )
-    {
-    LOG_FORMAT( "aOperationId = %d, aButtonAct = %d", aOperationId, aButtonAct );
-    LOG_METHOD_AUTO;
-    if ( iObserver )
-        {
-        switch ( aOperationId )
-            {
-            case ERemConCoreApiChannelUp:
-                {
-                if ( aButtonAct == ERemConCoreApiButtonClick )
-                    {
-                    TRAP_IGNORE( iObserver->ChannelUpL( ETrue ); iObserver->ChannelUpL( EFalse ))
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonPress )
-                    {
-                    TRAP_IGNORE( iObserver->ChannelUpL( ETrue ))
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonRelease )
-                    {
-                    TRAP_IGNORE( iObserver->ChannelUpL( EFalse ))
-                    }
-                else {}
-                break;
-                }
-            case ERemConCoreApiChannelDown:
-                {
-                if ( aButtonAct == ERemConCoreApiButtonClick )
-                    {
-                    TRAP_IGNORE( iObserver->ChannelDownL( ETrue ); iObserver->ChannelDownL( EFalse ))
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonPress )
-                    {
-                    TRAP_IGNORE( iObserver->ChannelDownL( ETrue ))
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonRelease )
-                    {
-                    TRAP_IGNORE( iObserver->ChannelDownL( EFalse ))
-                    }
-                else {}
-                break;
-                }
-            case ERemConCoreApiVolumeUp:
-                {
-                if ( aButtonAct == ERemConCoreApiButtonClick )
-                    {
-                    TRAP_IGNORE( iObserver->VolumeUpL( ETrue ); iObserver->VolumeUpL( EFalse ))
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonPress )
-                    {
-                    iRepeatTimer->Cancel();
-                    iRepeatId = ERemConCoreApiVolumeUp;
-//                  iRepeatTimer->Start( KVRVolumeTimerInitialDelay, KAknStandardKeyboardRepeatRate, TCallBack( RepeatTimerCallback, this ));
-                    iRepeatTimer->Start( KVRVolumeTimerInitialDelay, 1000000, TCallBack( RepeatTimerCallback, this ));
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonRelease )
-                    {
-                    iRepeatTimer->Cancel();
-                    }
-                else {}
-                break;
-                }
-            case ERemConCoreApiVolumeDown:
-                {
-                if ( aButtonAct == ERemConCoreApiButtonClick )
-                    {
-                    TRAP_IGNORE( iObserver->VolumeDownL( ETrue ); iObserver->VolumeDownL( EFalse ))
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonPress )
-                    {
-                    iRepeatTimer->Cancel();
-                    iRepeatId = ERemConCoreApiVolumeDown;
-//                  iRepeatTimer->Start( KVRVolumeTimerInitialDelay, KAknStandardKeyboardRepeatRate, TCallBack( RepeatTimerCallback, this ));
-                    iRepeatTimer->Start( KVRVolumeTimerInitialDelay, 1000000, TCallBack( RepeatTimerCallback, this ));
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonRelease )
-                    {
-                    iRepeatTimer->Cancel();
-                    }
-                else {}
-                break;
-                }
-            case ERemConCoreApiStop:
-                {
-                if ( aButtonAct == ERemConCoreApiButtonClick )
-                    {
-                    TRAP_IGNORE( iObserver->StopL( ETrue ); iObserver->StopL( EFalse ))
-                    }
-                break;
-                }
-            case ERemConCoreApiBackward:
-            case ERemConCoreApiRewind:
-                {
-                if ( aButtonAct == ERemConCoreApiButtonPress )
-                    {
-                    TRAP_IGNORE( iObserver->RewindL( ETrue ))
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonRelease )
-                    {
-                    TRAP_IGNORE( iObserver->RewindL( EFalse ))
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonClick )
-                    {
-                    TRAP_IGNORE( iObserver->BackwardL( ETrue ); iObserver->BackwardL( EFalse ))
-                    }
-                else {}
-                break;
-                }
-            case ERemConCoreApiForward:
-            case ERemConCoreApiFastForward:
-                {
-                if ( aButtonAct == ERemConCoreApiButtonPress )
-                    {
-                    TRAP_IGNORE( iObserver->FastForwardL( ETrue ))
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonRelease )
-                    {
-                    TRAP_IGNORE( iObserver->FastForwardL( EFalse ))
-                    }
-                else if ( aButtonAct == ERemConCoreApiButtonClick )
-                    {
-                    TRAP_IGNORE( iObserver->ForwardL( ETrue ); iObserver->ForwardL( EFalse ))
-                    }
-                else {}
-                break;
-                }
-            case ERemConCoreApiPlay:
-            case ERemConCoreApiPause:
-            case ERemConCoreApiPausePlayFunction:
-                {
-                if ( aButtonAct == ERemConCoreApiButtonClick )
-                    {
-                    TRAP_IGNORE( iObserver->PausePlayL( ETrue ); iObserver->PausePlayL( EFalse ))
-                    }
-                break;
-                }
-            default:
-                {
-                break;
-                }
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::MrccatoPlay( TRemConCoreApiPlaybackSpeed /*aSpeed*/,
-                                      TRemConCoreApiButtonAction aButtonAct )
-    {
-    LOG_METHOD_AUTO;
-    if ( iObserver )
-        {
-        if ( aButtonAct == ERemConCoreApiButtonClick )
-            {
-            TRAP_IGNORE( iObserver->PlayL( ETrue ); iObserver->PlayL( EFalse ))
-            }
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::MrccatoTuneFunction( TBool /*aTwoPart*/,
-                                              TUint /*aMajorChannel*/,
-                                              TUint /*aMinorChannel*/,
-                                              TRemConCoreApiButtonAction /*aButtonAct*/)
-    {
-    LOG_METHOD_AUTO;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::MrccatoSelectDiskFunction( TUint /*aDisk*/,
-                                                    TRemConCoreApiButtonAction /*aButtonAct*/)
-    {
-    LOG_METHOD_AUTO;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::MrccatoSelectAvInputFunction( TUint8 /*aAvInputSignalNumber*/,
-                                                       TRemConCoreApiButtonAction /*aButtonAct*/)
-    {
-    LOG_METHOD_AUTO;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::MrccatoSelectAudioInputFunction( TUint8 /*aAudioInputSignalNumber*/,
-                                                          TRemConCoreApiButtonAction /*aButtonAct*/)
-    {
-    LOG_METHOD_AUTO;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-TInt CRadioRemConTargetImp::RepeatTimerCallback( TAny* aPtr )
-    {
-    LOG_METHOD_AUTO;
-
-    CRadioRemConTargetImp* self = reinterpret_cast<CRadioRemConTargetImp*>( aPtr );
-
-    if ( self )
-        {
-        if ( self->iObserver )
-            {
-            switch ( self->iRepeatId )
-                {
-                case ERemConCoreApiVolumeUp:
-                    {
-                    TRAP_IGNORE( self->iObserver->VolumeUpL( ETrue ); self->iObserver->VolumeUpL( EFalse ))
-                    break;
-                    }
-                case ERemConCoreApiVolumeDown:
-                    {
-                    TRAP_IGNORE( self->iObserver->VolumeDownL( ETrue ); self->iObserver->VolumeDownL( EFalse ))
-                    break;
-                    }
-                default:
-                    {
-                    break;
-                    }
-                }
-            }
-        }
-
-    return KErrNone;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::AnswerCall()
-    {
-    LOG_METHOD_AUTO;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::AnswerEndCall()
-    {
-    LOG_METHOD_AUTO;
-    if ( iObserver )
-        {
-        TRAP_IGNORE( iObserver->AnswerEndCallL())
-        }
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::DialCall( const TDesC8& /*aTelNumber*/ )
-    {
-    LOG_METHOD_AUTO;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::EndCall()
-    {
-    LOG_METHOD_AUTO;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::GenerateDTMF( const TChar /*aChar*/ )
-    {
-    LOG_METHOD_AUTO;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::LastNumberRedial()
-    {
-    LOG_METHOD_AUTO;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::MultipartyCalling( const TDesC8& /*aData*/ )
-    {
-    LOG_METHOD_AUTO;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::SpeedDial( const TInt /*aIndex*/ )
-    {
-    LOG_METHOD_AUTO;
-    }
-
-// ---------------------------------------------------------------------------
-//
-// ---------------------------------------------------------------------------
-//
-void CRadioRemConTargetImp::VoiceDial( const TBool /*aActivate*/ )
-    {
-    LOG_METHOD_AUTO;
-    }
--- a/radiohswidget/buildflags.pri	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +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:
-#
-
-# ##########################################################
-# Start of Flag definitions
-# Add or remove comments to disable or enable the features
-# ##########################################################
-
-# ##########################################################
-# Start of Logging flag definitions
-# ##########################################################
-
-# Full logging flag that enables the full logging including also timestamps
-# Enabled by default in debug builds
-CONFIG(debug, debug|release) : LOGGING_FLAGS += LOGGING_ENABLED
-
-# Uncomment to enable full logging in release builds
-# LOGGING_FLAGS *= LOGGING_ENABLED
-
-# Timestamp logging flag that enables only timestamp logging
-# LOGGING_FLAGS += TIMESTAMP_LOGGING_ENABLED
-
-# Combines Ui and Engine logs by feeding UI traces to the engine logger
-# LOGGING_FLAGS += COMBINE_WITH_ENGINE_LOGGER
-
-# Logging level
-# 1 - Normal level
-# 2 - More verbose level
-# 3 - Most verbose level
-LOGGING_FLAGS += LOGGING_LEVEL=1
-
-# Select which radio component is being logged
-# 1 - Radio application
-# 2 - Radio homescreen widget
-LOGGING_FLAGS += LOGGED_COMPONENT=2
-
-contains(LOGGING_FLAGS, TIMESTAMP_LOGGING_ENABLED)|contains(LOGGING_FLAGS, LOGGING_ENABLED) {
-
-    # Writes debug prints to file if enabled
-    #LOGGING_FLAGS += TRACE_TO_FILE
-
-    # Settings for the log file name
-    symbian:contains(LOGGING_FLAGS, TRACE_TO_FILE) {
-        LOGGING_FLAGS += \"TRACE_OUTPUT_FILE=\\\"c:/logs/radio/radiohswidget.txt\\\"\"
-        LOGGING_FLAGS += FILTER_BY_LOGMARKER=true
-    }
-}
-
-# Method for testing signal-slot connections
-# 1 - Log failed connection
-# 2 - Log failed connection and halt debugger
-LOGGING_FLAGS += CONNECT_TEST_MODE=2
-
-# Logging is always enabled in Win32 environment
-win32:LOGGING_FLAGS *= LOGGING_ENABLED
-
-DEFINES += $$LOGGING_FLAGS
-
-# ##########################################################
-# End of Flag definitions
-# ##########################################################
-
-# $$_PRO_FILE_PWD_ points to the directory of the pro file
-MOC_DIR         = $$_PRO_FILE_PWD_/tmp
-RCC_DIR         = $$_PRO_FILE_PWD_/tmp
-OBJECTS_DIR     = $$_PRO_FILE_PWD_/tmp
-UI_DIR          = $$_PRO_FILE_PWD_/tmp
-UI_HEADERS_DIR  = $$_PRO_FILE_PWD_/tmp
-UI_SOURCES_DIR  = $$_PRO_FILE_PWD_/tmp
--- a/radiohswidget/inc/radiohswidget.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,261 +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:  FM Radio home screen widget
-*
-*/
-
-#ifndef RADIOHSWIDGET_H
-#define RADIOHSWIDGET_H
-
-// System includes
-#include <HbWidget>
-
-// Forward declarations
-class HbLabel;
-class HbPushButton;
-class XQSettingsManager;
-class XQSettingsKey;
-class RadioHsWidgetProfileReader;
-class RadioHsWidgetRadioServiceClient;
-class QGraphicsLinearLayout;
-
-/*!
-    \namespace FmRadio
-    \brief Wraps enumerators for radio state and service request visibility. 
- */
-namespace FmRadio
-{
-    /*! Enum for radio application states. */
-    enum State
-    {
-        StateUndefined,
-        StateNotRunning,
-        StateStarting,
-        StateRunning,
-        StateSeeking,
-        StateAntennaNotConnected,
-        StateClosing
-    };
-    
-    /*! Enum for controlling the visibility of the radio application. */
-    enum VisibiltyAfterRequest
-    {
-        VisibiltyDoNotChange,
-        VisibiltyToForeground,
-        VisibiltyToBackground
-    };
-
-}
-
-class RadioHsWidget : public HbWidget
-{
-    Q_OBJECT
-    
-public:
-    RadioHsWidget(QGraphicsItem *parent = 0, Qt::WindowFlags flags = 0);
-    ~RadioHsWidget();
-    
-    void handleRadioInformationChange(const int informationType,
-        const QVariant &information);
-    void handleRadioStateChange(const QVariant &value);
-
-private:
-    /*! Enum for information area layout states. */
-    enum InformationAreaLayout
-    {
-        OneRow,
-        TwoRows,
-        Animation
-    };
-
-    /*! Enum for control button identifier. */
-    enum ControlButtonIdentifier{
-        Power,
-        Previous,
-        Next
-    };
-    
-    /*! Enum for control button state. */
-    enum ControlButtonState{
-        Normal,
-        Pressed,
-        Disabled,
-        Latched
-    };
-
-
-    /*! Enum for information types published by radio. */
-    enum FmRadioInformationType {
-        Frequency,
-        StationName,
-        RadioText,
-        DynamicPsName,
-        Pty
-    };
-    
-signals:
-
-    /*
-       This signal allows your widget to save its properties persistently.
-       Once properties are saved, the user may close and reopen the widget,
-       and the stored properties will still be available. The names
-       parameter contains names for the properties you want to store. The
-       home screen framework reads the corresponding property values from
-       the widget by calling QObject::property() method. Currently only
-       QString type properties are supported. The home screen framework
-       writes widget's properties just before calling the onInitialize slot.
-       Both compile-time and dynamic properties are supported. Optional.
-     */
-    //void setPreferences(const QStringList &names);
-
-    /*
-       Your widget can notify the home screen framework about its completion
-       by emitting this signal. With the current implementation, the
-       framework removes the widget after receiving this signal. Optional.
-     */
-    //void finished();
-
-    /*!
-       Widget can notify the home screen framework about errors in its
-       execution by emitting this signal. With the current implementation,
-       the framework removes the widget after receiving this signal.
-       Optional.
-     */
-    void error();
-
-public slots:
-    /* These slots (prefixed with "on") are called by the home screen
-     * framework for controlling the widget's state during its lifetime.
-     * They are automatically connected by the framework.
-     */
-
-    /* Implement this slot if you want to be notified when your widget is
-     * added to the home screen. Upon receiving this event, your widget can
-     * perform any necessary initialization operations, such as preparing
-     * connections and allocating resources. Optional.
-     */
-    void onInitialize();
-    
-    /* This slot is called when your widget is shown in the home screen. You
-     * use this slot to activate your widget and begin processing data again
-     * after being quiescent. Each home screen compatible widget must define
-     * this slot. Mandatory.
-     */
-    void onShow();
-    
-    /* This slot is called when your widget is hidden from the home screen.
-     * You use this function to deactivate your widget and put it into a
-     * quiescent state. Each home screen compatible widget must define this
-     * slot. Mandatory.
-     */
-    void onHide();
-    
-    /* Implement this slot if you want to be notified when your widget is
-     * removed from the home screen. Upon receiving this event, your widget
-     * should perform any necessary cleanup operations, such as remove cache
-     * files, and release any resources it currently holds. Optional.
-     */
-    //void onUninitialize(); 
-    
-    
-    void changeButtonToPressed(int controlButtonId);
-    void changeButtonToReleased(int controlButtonId);
-
-private slots:
-    void closeRadio();
-    void changeToPreviousStation();
-    void changeToNextStation();
-    void changeRadioToForeground();
-    void changeRadioToBackground();
-    void toggleRadioPower();
-
-private:
-    void load(const QString &docml);
-    
-    void handleSimilarRadioInformation(
-        const FmRadioInformationType informationType,
-        const QVariant &information);
-    bool updateRadioInformation(const FmRadioInformationType informationType,
-        const QString &information);
-    void changeInRadioInformation();
-    void clearRadioInformation();
-    
-    void changeInformationAreaLayout(const InformationAreaLayout layout);
-    void changePowerButtonOn(const bool isPowerOn);
-    void enableStationButtons();
-    void defineButton(HbPushButton &target, const QString &graphicsId,
-        const QStringList &suffix, const QString &icon,
-        const QString &iconColor);
-    void buttonEvent(ControlButtonIdentifier buttonId,
-        const ControlButtonState state);
-    void changeButtonToDisabled(int controlButtonId);
-    void changeButtonToEnabled(int controlButtonId);
-    
-    bool radioStartPermission();
-
-private:
-    // Data
-    Q_DISABLE_COPY(RadioHsWidget)
-    
-    // UI components.
-    /*! Button for capturing taps on information area. */
-    HbPushButton *mInformationAreaBackgroundButton;
-    /*! Control button for power. */
-    HbPushButton *mPowerButton;
-    /*! Control button for previous station. */
-    HbPushButton *mPreviousButton;
-    /*! Control button for next station. */
-    HbPushButton *mNextButton;
-    /*! Layout for information area. */
-    QGraphicsWidget *mInformationAreaTwoRowsLayout;
-    /*! Label that is shown when there is only one row of information. */
-    HbLabel *mInformationLonelyRowLabel;
-    /*! Label for first row when there is two rows of information. */
-    HbLabel *mInformationFirstRowLabel;
-    // TODO: This label should be modified to support marquee scrolling when Orbit supports it.
-    /*! Label for first second when there is two rows of information. */
-    HbLabel *mInformationSecondRowLabel;
-    /*! Label for displaying animation. */
-    HbLabel *mAnimationIcon;
-    
-    /*! Stores the state of the FM Radio application. */
-    FmRadio::State mFmRadioState;
-
-    /*! Stores the count of favorite stations. */
-    int mFavoriteStationCount;
-    /*! Stores the value whether the current station is favorite or not. */
-    bool mCurrentStationIsFavorite;
-
-    /*! Stores the radio information. */
-    QHash<FmRadioInformationType, QString> mRadioInformation;
-    /*! 
-       String is used to format the text shown on first or only row from
-       radio information.
-     */
-    QString mRadioInformationFirstRow;
-    /*! 
-       String is used to format the text shown on second row from
-       radio information.
-     */
-    QString mRadioInformationSecondRow;
-
-    /*! Profile monitor is used to read P&S keys and profile information. */
-    RadioHsWidgetProfileReader *mProfileMonitor;
-    
-    /*! For communicating with the FM Radio through Qt Highway. */
-    RadioHsWidgetRadioServiceClient *mRadioServiceClient;
-    
-};
-
-#endif // RADIOHSWIDGET_H
--- a/radiohswidget/inc/radiohswidgetplugin.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,37 +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:  FM Radio home screen widget plugin
-*
-*/
-
-#ifndef RADIOHSWIDGETPLUGIN_H
-#define RADIOHSWIDGETPLUGIN_H
-
-#include <QObject>
-#include <qserviceplugininterface.h>
-
-QTM_USE_NAMESPACE
-
-class RadioHsWidgetPlugin : public QObject, public QServicePluginInterface
-{
-    Q_OBJECT
-    Q_INTERFACES(QtMobility::QServicePluginInterface)
-
-public:
-    QObject *createInstance(const QServiceInterfaceDescriptor &descriptor,
-                            QServiceContext *context,
-                            QAbstractSecuritySession *session);
-};
-
-#endif // RADIOHSWIDGETPLUGIN_H
--- a/radiohswidget/inc/radiohswidgetprofilereader.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +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: FM Radio widget profile reader
-*
-*/
-
-#ifndef RADIOHSWIDGETPROFILEREADER_H_
-#define RADIOHSWIDGETPROFILEREADER_H_
-
-// System includes
-#include <QObject>
-#include <QVariant>
-
-// Forward declarations
-class RadioHsWidget;
-class XQSettingsManager;
-class XQSettingsKey;
-
-class RadioHsWidgetProfileReader : public QObject
-{
-Q_OBJECT
-
-public:
-    explicit RadioHsWidgetProfileReader(RadioHsWidget *parent = 0);
-    virtual ~RadioHsWidgetProfileReader();
-
-    void startMonitoringRadioRunningStatus();
-    
-    bool isInOfflineMode();
-
-public slots:
-    void handleDeletedItem(const XQSettingsKey &key);
-    void handleChanges(const XQSettingsKey &key, const QVariant &value);
-    
-private:
-    void radioRunningStatus(const QVariant &value);
-    
-private: // data
-    /*!
-       Stores the reference to parent. This is used to call parents
-       functions when notifications are received.
-     */
-    RadioHsWidget &mParent;
-    /*! For getting values and notifications of changes from P&S keys. */
-    XQSettingsManager *mSettingsManager;
-    /*!
-       Stores internally the status of radio application read from the P&S
-       key.
-      */
-    int mRadioStatus;
-};
-
-#endif /* RADIOHSWIDGETPROFILEREADER_H_ */
--- a/radiohswidget/inc/radiohswidgetradioserviceclient.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,81 +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: FM Radio widget radio service client
-*
-*/
-
-#ifndef RADIOHSWIDGETRADIOSERVICECLIENT_H_
-#define RADIOHSWIDGETRADIOSERVICECLIENT_H_
-
-// System includes
-#include <QObject>
-#include <xqappmgr.h>
-
-// User includes
-#include "radiohswidget.h"
-#include "radioservicedef.h"
-
-class RadioHsWidgetRadioServiceClient : public QObject
-{
-Q_OBJECT
-
-public:
-    explicit RadioHsWidgetRadioServiceClient(RadioHsWidget *parent = 0);
-    virtual ~RadioHsWidgetRadioServiceClient();
-    
-public:
-    void commandFmRadio(const RadioServiceCommand::CommandId command);
-    void startMonitoring(
-        const FmRadio::VisibiltyAfterRequest visibility);
-    void stopMonitoring();
-    QVariant createRadioNotificationData(int type, const QVariant& data);
-
-private slots:
-    void handleError(const int errorCode, const QString &errorMessage);
-    void handleFmRadioChange(const QVariant &value);
-
-private:
-    void handleRequestError(const int error);
-
-    void createControlServiceRequest();
-    void createMonitorServiceRequest();
-
-    void sendMonitorRequest(
-        const FmRadio::VisibiltyAfterRequest visibility);
-    void sendControlRequest(const QVariant &argument,
-        const FmRadio::VisibiltyAfterRequest visibility);
-
-    void prepareRequestInfo(XQAiwRequest *request,
-        const FmRadio::VisibiltyAfterRequest visibility);
-    
-private: // data
-    /*!
-        Stores the reference to parent. This is used to call parents
-        functions when notifications are received.
-     */
-    RadioHsWidget &mParent;
-    /*! Is the request send. */
-    bool mRequestPending;
-    /*! For service and interface listings and request creation. */
-    XQApplicationManager mApplicationManager;
-    /*! Asynchronous monitoring request. */
-    XQAiwRequest* mRadioMonitorRequest;
-    /*! Synchronous control request. */
-    XQAiwRequest* mRadioControlRequest;
-    
-    /*! Is the first monitoring request done. */
-    bool mDataInitialized;
-};
-
-#endif /* RADIOHSWIDGETRADIOSERVICECLIENT_H_ */
--- a/radiohswidget/locales/compile_ts.bat	Tue Aug 31 15:15:02 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:
-::
-
-@echo off
-
-set QM_FILE=fmradiohswidget.qm
-set QM_FILE_EN_US=fmradiohswidget_en_us.qm
-set QM_LOCATION=./
-
-
-ECHO Creating QM file
-call lrelease -idbased fmradiohswidget.ts -qm %QM_LOCATION%%QM_FILE%
-REM call lrelease -idbased fmradiohswidget_en_us.ts -qm %QM_LOCATION%%QM_FILE_EN_US%
Binary file radiohswidget/locales/fmradiohswidget.qm has changed
--- a/radiohswidget/locales/fmradiohswidget.ts	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,534 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<!DOCTYPE TS>
-<TS version="3.0" language="en_GB" sourcelanguage="en_GB">
-<context>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_country_music_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Country Music</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_social_affairs_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Social Affairs</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_weather_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Weather</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_personality_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Personality</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_soft_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Soft</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_rhythm_and_blues_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Rhythm and blues</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_information_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Information</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_phone_in_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Phone In</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_current_affairs_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Current affairs</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_alarm_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Alarm</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_leisure_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Leisure</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_childrens_programmes_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Children’s programmes</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_light_classical_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Light classical</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_alarm_test_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Alarm Test</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_religious_talk_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Religious talk</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_list_fm_radio">
-    <comment>Text in a home screen widget information area. Displayed when no station is tuned.</comment>        
-    <source>FM Radio</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_list_fm_radio</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_news_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area. Custom layout parent string.</comment>        
-    <source>News</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_easy_listening_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Easy Listening</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_top_40_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Top 40</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_public_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Public</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_varied_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Varied</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_nostalgia_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Nostalgia</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_classical_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Classical</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_national_music_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>National Music</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_science_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Science</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_jazz_music_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Jazz Music</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_religious_music_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Religious music</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_other_music_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Other Music</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_folk_music_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Folk Music</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_religion_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Religion</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_soft_rock_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Soft rock</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_adult_hits_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Adult hits</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_drama_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Drama</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_rock_music_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Rock Music</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_serious_classical_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Serious classical</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_college_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>College</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_connect_wired_headset">
-    <comment>Notification text which is displayed in home screen widget, when the headset antenna is not connected.</comment>        
-    <source>Connect wired headset.</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_oldies_music_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Oldies Music</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_documentary_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Documentary</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_education_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Education</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_sport_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Sport</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_pop_music_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Pop Music</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_language_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Language</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_classic_rock_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Classic rock</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_list_l1_mhz">
-    <comment>Text in a home screen widget information area. %L1 is the radio station&apos;s frequency.</comment>        
-    <source>%L1 Mhz</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_list_l1_mhz</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>list</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_soft_rhythm_and_blues_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Soft rhythm and blues</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_culture_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Culture</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_talk_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Talk</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_finance_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Finance</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_activate_radio_in_offline_mode_hs">
-    <comment>Confirmation query which is displayed when the FM Radio is launched from the FM Radio home screen widget while the device is in offline mode. (Note that same text is also in FM radio textmap.)</comment>        
-    <source>Activate Fm Radio in off-line mode?</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>qtl_dialog_pri5</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_rad_info_travel_hs">
-    <comment>Displayed in FM Radio home screen widget&apos;s information area.</comment>        
-    <source>Travel</source>
-    <translation variants="no" type="unfinished"></translation>
-    <extra-loc-layout_id>txt_fmradiohswidget_rad_info_news_hs</extra-loc-layout_id>    
-    <extra-loc-viewid>rad_05</extra-loc-viewid>
-    <extra-loc-positionid>info</extra-loc-positionid>
-    <extra-loc-feature>rad</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_list_quick_access_for_fm_radio_in_your">
-    <source>Quick access for FM radio in your homescreen.</source>
-    <translation variants="no">Quick access for FM radio in your homescreen.</translation>
-    <extra-loc-layout_id></extra-loc-layout_id>    
-    <extra-loc-viewid>radiohswidgetplugin</extra-loc-viewid>
-    <extra-loc-positionid>dblist_1_val</extra-loc-positionid>
-    <extra-loc-feature>lo</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-<message numerus="no" id="txt_fmradiohswidget_list_fm_radio_homescreen_widget">
-    <source>FM Radio homescreen widget</source>
-    <translation variants="no">FM Radio homescreen widget</translation>
-    <extra-loc-layout_id></extra-loc-layout_id>    
-    <extra-loc-viewid>radiohswidgetplugin</extra-loc-viewid>
-    <extra-loc-positionid>dblist_1</extra-loc-positionid>
-    <extra-loc-feature>lo</extra-loc-feature>
-    <extra-loc-blank>False</extra-loc-blank>
-</message>
-</context>
-</TS>
--- a/radiohswidget/qmakepluginstubs/fmradiohswidget.qtplugin	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-This file is a Qt plugin stub file. The real Qt plugin is located in /sys/bin. Created:2010-08-06T11:23:58
--- a/radiohswidget/radiohswidget.pro	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,89 +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: Example of home screen widget
-#
-
-include(buildflags.pri)
-
-TEMPLATE = lib
-TARGET = fmradiohswidget
-CONFIG += plugin
-CONFIG += hb
-CONFIG += mobility
-MOBILITY = serviceframework
-
-LIBS += -lxqsettingsmanager
-LIBS += -lxqservice
-LIBS += -lxqserviceutil
-
-HEADERS += ./inc/*.h
-SOURCES += ./src/*.cpp
-SOURCES += ../common/radiologger.cpp
-
-INCLUDEPATH += ./inc
-INCLUDEPATH += ../common
-
-UID = 2002E6D6
-
-RESOURCES += resources.qrc
-
-symbian: {
-
-    DESTDIR = /private/20022F35/import/widgetregistry/$${UID}
-
-    TARGET.UID3 = 0x$${UID}
-    TARGET.EPOCALLOWDLLDATA=1
-    TARGET.VID = VID_DEFAULT
-    TARGET.CAPABILITY = CAP_GENERAL_DLL
-    
-    plugins.path = $${DESTDIR}
-    plugins.sources = $${TARGET}.dll 
-    
-    widgetResources.path = $${DESTDIR}
-    widgetResources.sources += resource/$${TARGET}.xml
-    widgetResources.sources += resource/$${TARGET}.manifest
-	
-    localisedFiles.path = /resource/qt/translations
-    localisedFiles.sources += ./locales/*.qm
-        
-    DEPLOYMENT += plugins
-    DEPLOYMENT += widgetResources
-    DEPLOYMENT += localisedFiles
-    
-    MMP_RULES += SMPSAFE
-    
-    include(radiohswidget_exports_to_rom.pri)
-}
-
-win32: {
-
-    CONFIG(debug, debug|release) {
-      SUBDIRPART = debug
-    } else {
-      SUBDIRPART = release
-    }    
-    
-    PLUGIN_SUBDIR = /hsresources/import/widgetregistry/$${UID}
-    
-    DESTDIR = $$PWD/../../../../../bin/$${SUBDIRPART}/$${PLUGIN_SUBDIR}
-
-    manifest.path = $${DESTDIR}
-    manifest.files = ./resource/*.manifest ./resource/*.xml ./resource/*.css
-    
-    widgetLocalisation.path = $$PWD/../../../../../bin/$${SUBDIRPART}/resource/qt/translations
-    widgetLocalisation.files += ./locales/*.qm
-    
-    INSTALLS += manifest    
-}
-
--- a/radiohswidget/radiohswidget_exports_to_rom.pri	Tue Aug 31 15:15:02 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:
-#
-
-BLD_INF_RULES.prj_exports += \
-"$${LITERAL_HASH}include <platform_paths.hrh>"
-
-#iby exports to core
-BLD_INF_RULES.prj_exports += \
-"rom/fmradiohswidget.iby  CORE_APP_LAYER_IBY_EXPORT_PATH(fmradiohswidget.iby)"
-
-#iby exports to language
-#BLD_INF_RULES.prj_exports += \
-#"rom/fmradiohswidget_resources.iby  LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(fmradiohswidget_resources.iby)"
-
-BLD_INF_RULES.prj_extensions += \
-$$LITERAL_HASH"ifdef MARM" \
-  " START EXTENSION app-services/buildstubsis" \
-    " OPTION SRCDIR rom/" \
-    " OPTION SISNAME fmradiohswidget_stub" \
-  " END" \
-$$LITERAL_HASH"endif"
--- a/radiohswidget/resource/fmradiohswidget.docml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,122 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<hbdocument version="1.1">
-    <widget name="mainLayout" type="HbWidget">
-        <widget name="contentLayout" type="HbWidget">
-            <widget name="controlButtons" type="HbWidget">
-                <widget name="powerButton" type="HbPushButton">
-                    <icon iconName="qtg_mono_power" name="icon"/>
-                    <string name="text"/>
-                </widget>
-                <widget name="previousPushButton" type="HbPushButton">
-                    <icon iconName="qtg_mono_previous" name="icon"/>
-                    <string name="text"/>
-                </widget>
-                <widget name="nextPushButton" type="HbPushButton">
-                    <icon iconName="qtg_mono_next" name="icon"/>
-                    <string name="text"/>
-                </widget>
-                <real name="z" value="3"/>
-                <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-                <sizehint height="8un" type="PREFERRED" width="32un"/>
-                <sizehint height="8un" type="MINIMUM" width="32un"/>
-                <layout orientation="Horizontal" spacing="0un" type="linear">
-                    <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
-                    <linearitem itemname="powerButton"/>
-                    <linearitem itemname="previousPushButton"/>
-                    <linearitem itemname="nextPushButton"/>
-                </layout>
-            </widget>
-            <widget name="tunerStackedLayout" type="HbWidget">
-                <widget name="tunerInformationStackedLayout" type="HbWidget">
-                    <widget name="lonelyRowLabel" type="HbLabel">
-                        <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
-                        <sizehint type="PREFERRED" width="expr(32un - 2 * var(hb-param-margin-gene-middle-horizontal) )"/>
-                        <string name="toolTipText"/>
-                        <string name="windowTitle"/>
-                        <string name="textColor" value="#000000"/>
-                        <string name="plainText"/>
-                        <fontspec name="fontSpec" role="Primary" textheight="var(hb-param-text-height-secondary)"/>
-                    </widget>
-                    <widget name="twoRowsLayout" type="HbWidget">
-                        <widget name="firstRowLabel" type="HbLabel">
-                            <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
-                            <real name="z" value="1"/>
-                            <sizehint type="PREFERRED" width="expr(32un - 2 * var(hb-param-margin-gene-middle-horizontal) )"/>
-                            <string locid="label for first row in two row layout" name="plainText"/>
-                            <fontspec name="fontSpec" role="Primary" textheight="var(hb-param-text-height-secondary)"/>
-                        </widget>
-                        <widget name="secondRowLabel" type="HbLabel">
-                            <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
-                            <real name="z" value="2"/>
-                            <sizehint type="PREFERRED" width="expr(32un - 2 * var(hb-param-margin-gene-middle-horizontal) )"/>
-                            <string locid="label for second row in two row layout" name="plainText"/>
-                            <fontspec name="fontSpec" role="Secondary" textheight="var(hb-param-text-height-secondary)"/>
-                        </widget>
-                        <real name="z" value="3"/>
-                        <sizehint height="expr(10un - 2 * 1.5un  )" type="PREFERRED" width="expr(32un - 2 * var(hb-param-margin-gene-middle-horizontal) )"/>
-                        <layout orientation="Vertical" spacing="var(hb-param-margin-gene-middle-vertical)" type="linear">
-                            <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
-                            <linearitem itemname="firstRowLabel"/>
-                            <linearitem itemname="secondRowLabel"/>
-                        </layout>
-                    </widget>
-                    <widget name="animationIcon" type="HbLabel">
-                        <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
-                        <sizehint height="var(hb-param-graphic-size-primary-medium)" type="PREFERRED" width="var(hb-param-graphic-size-primary-medium)"/>
-                    </widget>
-                    <real name="z" value="1"/>
-                    <sizepolicy horizontalPolicy="Preferred" horizontalStretch="0" verticalPolicy="Preferred" verticalStretch="0"/>
-                    <sizehint height="7un" type="PREFERRED" width="30.5un"/>
-                    <sizehint height="expr(10un - 2 * 1.5un)" type="MINIMUM" width="expr(32un - 4   * var(hb-param-margin-gene-middle-horizontal))"/>
-                    <contentsmargins bottom="1.5un" left="var(hb-param-margin-gene-middle-horizontal)" right="var(hb-param-margin-gene-middle-horizontal)" top="1.5un"/>
-                    <sizehint height="2504062.01158un" type="MAXIMUM" width="2504062.01158un"/>
-                    <layout type="stacked">
-                        <stackitem itemname="lonelyRowLabel"/>
-                        <stackitem itemname="twoRowsLayout"/>
-                        <stackitem itemname="animationIcon"/>
-                    </layout>
-                </widget>
-                <widget name="tunerBackgroundPushButton" type="HbPushButton">
-                    <sizehint height="10un" type="PREFERRED" width="32un"/>
-                    <sizehint type="MINIMUM" width="32un"/>
-                    <string name="text"/>
-                    <string name="state" value="normal"/>
-                </widget>
-                <real name="z" value="3"/>
-                <sizehint height="10un" type="PREFERRED" width="32un"/>
-                <sizehint height="10un" type="MINIMUM" width="32un"/>
-                <contentsmargins bottom="0un" left="0un" right="0un" top="0un"/>
-                <layout type="stacked">
-                    <stackitem itemname="tunerInformationStackedLayout"/>
-                    <stackitem itemname="tunerBackgroundPushButton"/>
-                </layout>
-            </widget>
-            <real name="z" value="2"/>
-            <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-            <sizehint height="26.5un" type="FIXED" width="37un"/>
-            <sizehint height="26.5un" type="MINIMUM"/>
-            <sizehint height="26.5un" type="MAXIMUM" width="37un"/>
-            <layout orientation="Vertical" spacing="0un" type="linear">
-                <contentsmargins bottom="2un" left="2.5un" right="2.5un" top="5.5un"/>
-                <linearitem itemname="tunerStackedLayout" spacing="var(hb-param-margin-gene-middle-vertical)"/>
-                <linearitem itemname="controlButtons" spacing="0un"/>
-            </layout>
-        </widget>
-        <widget name="background" type="HbLabel">
-            <enums name="alignment" value="AlignVCenter|AlignHCenter"/>
-            <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-            <sizehint height="26.5un" type="FIXED" width="37un"/>
-            <icon iconName="qtg_graf_hsradio_bg" name="icon"/>
-        </widget>
-        <real name="z" value="1"/>
-        <sizepolicy horizontalPolicy="Fixed" horizontalStretch="0" verticalPolicy="Fixed" verticalStretch="0"/>
-        <sizehint height="26.5un" type="FIXED" width="37un"/>
-        <layout type="stacked">
-            <stackitem itemname="contentLayout"/>
-            <stackitem itemname="background"/>
-        </layout>
-    </widget>
-    <metadata activeUIState="Common ui state" display="NHD-3.2-inch_landscape" unit="un">
-        <uistate name="Common ui state" sections="#common"/>
-    </metadata>
-</hbdocument>
--- a/radiohswidget/resource/fmradiohswidget.manifest	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-<hswidgetmanifest>
-    <uri>fmradiohswidget</uri>
-    <title>txt_fmradiohswidget_list_fm_radio_homescreen_widget</title>
-    <description>txt_fmradiohswidget_list_quick_access_for_fm_radio_in_your</description>
-    <icon>qtg_large_radio</icon>
-    <hidden>false</hidden>
-    <servicexml>fmradiohswidget.xml</servicexml>
-</hswidgetmanifest>
--- a/radiohswidget/resource/fmradiohswidget.xml	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<service>
-    <name>fmradiohswidget</name>
-    <filepath>fmradiohswidget</filepath>
-    <description>FM Radio homescreen widget</description>
-    <interface>
-        <name>com.nokia.symbian.IHomeScreenWidget</name>
-        <version>1.0</version>
-        <description>FM Radio homescreen widget</description>
-        <capabilities></capabilities>
-    </interface>
-</service>
--- a/radiohswidget/resources.qrc	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-<RCC>
-    <qresource prefix="/ui">
-        <file>resource/fmradiohswidget.docml</file>
-    </qresource>
-</RCC>
--- a/radiohswidget/rom/fmradiohswidget.iby	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,31 +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 __RADIOHSWIDGET_IBY__
-#define __RADIOHSWIDGET_IBY__
-
-// Use standard macros
-#include <data_caging_paths_for_iby.hrh>
-
-file=ABI_DIR\BUILD_DIR\fmradiohswidget.dll                                          SHARED_LIB_DIR\fmradiohswidget.dll
-data=ZPRIVATE\20022f35\import\widgetregistry\2002E6D6\fmradiohswidget.qtplugin      private\20022f35\import\widgetregistry\2002E6D6\fmradiohswidget.qtplugin
-data=ZPRIVATE\20022f35\import\widgetregistry\2002E6D6\fmradiohswidget.xml           private\20022f35\import\widgetregistry\2002E6D6\fmradiohswidget.xml
-data=ZPRIVATE\20022f35\import\widgetregistry\2002E6D6\fmradiohswidget.manifest      private\20022f35\import\widgetregistry\2002E6D6\fmradiohswidget.manifest
-
-data=\epoc32\data\z\system\install\fmradiohswidget_stub.sis                         system\install\fmradiohswidget_stub.sis
-
-#endif //__RADIOHSWIDGET_IBY__
--- a/radiohswidget/rom/fmradiohswidget_resources.iby	Tue Aug 31 15:15:02 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:
-* Iby file for FMRadio
-*
-*/
-
-
-#ifndef RADIOHSWIDGET_RESOURCES_IBY
-#define RADIOHSWIDGET_RESOURCES_IBY
-
-// Use standard macros
-#include <data_caging_paths_for_iby.hrh>
-
-#S60_APP_RESOURCE(fmradiohswidget)
-
-#data=DATAZ_\QT_TRANSLATIONS_DIR\fmradiohswidget.qm  QT_TRANSLATIONS_DIR\fmradiohswidget.qm
-
-#endif // RADIOHSWIDGET_RESOURCES_IBY
--- a/radiohswidget/rom/fmradiohswidget_stub.pkg	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +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: Stub package file for FM Radio home screen widget
-;
-
-; Languages
-&EN
-
-; Header
-#{"fmradiohswidget"}, (0x2002E6D6), 1, 0, 0, TYPE=SA
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
\ No newline at end of file
--- a/radiohswidget/sis/fmradiohswidget.bat	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,30 +0,0 @@
-@rem
-@rem Copyright (c) 2010 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
-@echo off
-
-if exist fmradiohswidget.sisx del fmradiohswidget.sisx
-
-makesis fmradiohswidget.pkg
-signsis fmradiohswidget.sis fmradiohswidget.sisx ../../internal/sis/nokia_rndcert_02.der ../../internal/sis/nokia_rndcert_02.key
-
-if exist fmradiohswidget.sisx (
-echo fmradiohswidget.sisx creation SUCCEEDED
-del fmradiohswidget.sis
-)
-
-if not exist fmradiohswidget.sisx (
-echo fmradiohswidget.sisx creation FAILED
-)
\ No newline at end of file
--- a/radiohswidget/sis/fmradiohswidget.pkg	Tue Aug 31 15:15:02 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:
-;
-
-; Language
-&EN
-
-; SIS header: name, uid, version
-#{"fmradiohswidget"}, (0x2002E6D6), 1, 0, 0, TYPE=SA, RU
-
-; Localised Vendor name
-%{"Vendor"}
-
-; Unique Vendor name
-:"Vendor"
-
-; Manual PKG pre-rules from PRO files
-; Default HW/platform dependencies
-[0x101F7961],0,0,0,{"S60ProductID"}
-[0x102032BE],0,0,0,{"S60ProductID"}
-[0x102752AE],0,0,0,{"S60ProductID"}
-[0x1028315F],0,0,0,{"S60ProductID"}
-
-"../resource/fmradiohswidget.manifest"                                                     - "!:/private/20022F35/import/widgetregistry/20022F7E/fmradiohswidget.manifest",FM,"application/hs-widget-uninstall+xml",RR,RW
- 
-"/epoc32/release/armv5/urel/fmradiohswidget.dll"                                           - "!:/sys/bin/fmradiohswidget.dll"
-"/epoc32/data/z/private/20022F35/import/widgetregistry/2002E6D6/fmradiohswidget.qtplugin"  - "!:/private/20022F35/import/widgetregistry/2002E6D6/fmradiohswidget.qtplugin"
-"../resource/fmradiohswidget.manifest"                                                     - "!:/private/20022F35/import/widgetregistry/2002E6D6/radiohswidget.manifest"
-"../resource/fmradiohswidget.xml"                                                          - "!:/private/20022F35/import/widgetregistry/2002E6D6/radiohswidget.xml"
-;"/epoc32/data/z/private/20022F35/import/widgetregistry/2002E6D6/fmradiohswidget.png"      - "!:/private/20022F35/import/widgetregistry/2002E6D6/radiohswidget.png"
-
- 
-;"/epoc32/release/armv5/urel/fmradiohswidget.dll"              - "!:/sys/bin/fmradiohswidget.dll"
-;"../radiohswidget/qmakepluginstubs/fmradiohswidget.qtplugin"  - "!:/private/20022F35/import/widgetregistry/2002E6D6/fmradiohswidget.qtplugin"
-;"../radiohswidget/resource/fmradiohswidget.manifest"          - "!:/private/20022F35/import/widgetregistry/2002E6D6/fmradiohswidget.manifest"
-;"../radiohswidget/resource/fmradiohswidget.s60xml"            - "!:/private/20022F35/import/widgetregistry/2002E6D6/fmradiohswidget.xml"
-;"../radiohswidget/resource/fmradiohswidget.css"               - "!:/private/20022F35/import/widgetregistry/2002E6D6/fmradiohswidget.css"
-;;"/epoc32/data/z/private/20022F35/import/widgetregistry/2002E6D6/fmradiohswidget.s60xml"  - "!:/private/20022F35/import/widgetregistry/2002E6D6/fmradiohswidget.xml"
-;;"../radiohswidget/resource/fmradiohswidget.xml"              - "!:/private/20022F35/import/widgetregistry/2002E6D6/fmradiohswidget.xml"
-;;"../radiohswidget/resource/fmradiohswidget_icon.png"         - "!:/private/20022F35/import/widgetregistry/2002E6D6/fmradiohswidget_icon.png"
-
-;"/epoc32/data/z/resource/qt/translations/fmradiohswidget.qm"        - "!:/resource/qt/translations/fmradiohswidget.qm"
-;"/epoc32/data/z/resource/qt/translations/fmradiohswidget_en_us.qm"  - "!:/resource/qt/translations/fmradiohswidget_en_us.qm"
--- a/radiohswidget/src/radiohswidget.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1101 +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:  FM Radio home screen widget
-*
-*/
-
-// System includes
-#include <HbPushButton>
-#include <HbLabel>
-#include <HbDocumentLoader>
-#include <HbFrameDrawer>
-#include <HbIcon>
-#include <HbIconAnimationManager>
-#include <HbIconAnimationDefinition>
-#include <HbColorScheme>
-#include <HbDeviceMessageBox>
-#include <QGraphicsLinearLayout>
-#include <QGraphicsItem>
-#include <QDesktopServices>
-#include <QSignalMapper>
-
-// User includes
-#include "radiohswidget.h"
-#include "radiohswidgetprofilereader.h"
-#include "radiohswidgetradioserviceclient.h"
-#include "radioservicedef.h"
-#include "radio_global.h"
-#include "radiologger.h"
-
-// Constants
-/** Path to docml file */
-const QString DOCML(":/ui/resource/fmradiohswidget.docml");
-
-/**  DOCML object name for mainLayout */
-const QString DOCML_OBJECT_NAME_MAIN_LAYOUT("mainLayout");
-/**  DOCML object name for contentLayout */
-const QString DOCML_OBJECT_NAME_CONTENT_LAYOUT("contentLayout");
-/**  DOCML object name for tunerBackgroundPushButton */
-const QString DOCML_OBJECT_NAME_TUNER_BACKGROUND_BUTTON(
-    "tunerBackgroundPushButton");
-/**  DOCML object name for tunerStackedLayout */
-const QString DOCML_OBJECT_NAME_TUNER_STACKED_LAYOUT("tunerStackedLayout");
-/**  DOCML object name for tunerInformationStackedLayout */
-const QString DOCML_OBJECT_NAME_TUNER_INFORMATION_STACKED_LAYOUT(
-    "tunerInformationStackedLayout");
-/**  DOCML object name for controlButtons */
-const QString DOCML_OBJECT_NAME_CONTROL_BUTTONS_LAYOUT("controlButtons");
-/**  DOCML object name for powerToggleButton */
-const QString DOCML_OBJECT_NAME_POWER_BUTTON("powerButton");
-/**  DOCML object name for previousPushButton */
-const QString DOCML_OBJECT_NAME_PREVIOUS_BUTTON("previousPushButton");
-/**  DOCML object name for nextPushButton */
-const QString DOCML_OBJECT_NAME_NEXT_BUTTON("nextPushButton");
-/**  DOCML object name for twoRowsLayout */
-const QString DOCML_OBJECT_NAME_TWO_ROWS_LAYOUT("twoRowsLayout");
-/**  DOCML object name for firstRowLabel */
-const QString DOCML_OBJECT_NAME_FIRST_ROW_LABEL("firstRowLabel");
-/**  DOCML object name for secondRowLabel */
-const QString DOCML_OBJECT_NAME_SECOND_ROW_LABEL("secondRowLabel");
-/**  DOCML object name for lonelyRowLabel */
-const QString DOCML_OBJECT_NAME_LONELY_ROW_LABEL("lonelyRowLabel");
-/**  DOCML object name for animationIcon */
-const QString DOCML_OBJECT_NAME_ANIMATION_ICON("animationIcon");
-
-/** Unknown favorite station count. */
-const int FAVORITE_STATION_COUNT_UNDEFINED(-1);
-/** One favorite station set. */
-const int FAVORITE_STATION_COUNT_ONE(1);
-/** Favorite station count lower boundary including this number. */
-const int FAVORITE_STATION_COUNT_LOWER_BOUNDARY(0);
-/** Favorite station count upper boundary including this number. */
-const int FAVORITE_STATION_COUNT_UPPER_BOUNDARY(100);
-
-// Graphics identifiers for different push button states
-const QString CONTROL_BUTTON_GRAPHICS_NORMAL  ("qtg_fr_hsbutton_normal");
-const QString CONTROL_BUTTON_GRAPHICS_PRESSED ("qtg_fr_hsbutton_pressed");
-const QString CONTROL_BUTTON_GRAPHICS_DISABLED("qtg_fr_hsbutton_disabled");
-const QString CONTROL_BUTTON_GRAPHICS_LATCHED ("qtg_fr_hsbutton_latched");
-
-// Push button icon colors for each of the states (normal, pressed, disabled
-// and latched)
-const QString CONTROL_BUTTON_ICON_COLOR_NORMAL  ("qtc_button_normal");
-const QString CONTROL_BUTTON_ICON_COLOR_PRESSED ("qtc_button_pressed");
-const QString CONTROL_BUTTON_ICON_COLOR_DISABLED("qtc_button_disabled");
-const QString CONTROL_BUTTON_ICON_COLOR_LATCHED ("qtc_button_latched");
-
-// File name suffix lists for push buttons
-const QStringList POWER_BUTTON_SUFFIX(
-    (QStringList() << "_l" << "_c" << "_cr"));
-const QStringList PREVIOUS_BUTTON_SUFFIX(
-    (QStringList() << "_cl" << "_c" << "_cr"));
-const QStringList NEXT_BUTTON_SUFFIX(
-    (QStringList() << "_cl" << "_c" << "_r"));
-
-/** Icon for power button off. */
-const QString POWER_BUTTON_ICON_OFF("qtg_mono_power"); 
-/** Icon for power button on. */
-const QString POWER_BUTTON_ICON_ON ("qtg_mono_power"); 
-
-// Tuner background button graphics for different states.
-const QString TUNER_BUTTON_NORMAL_OFF("qtg_fr_tuner");
-const QString TUNER_BUTTON_NORMAL_ON("qtg_fr_tuner");
-const QString TUNER_BUTTON_NORMAL_PRESSED("qtg_fr_hsitems2_pressed");
-
-/*!
-    \class RadioHsWidget
-    \brief Implementation of FM Radio home screen widget.
-
-    RadioHsWidget implements needed functions for the FM Radio home screen
-    widget.
-*/
-
-// ======== MEMBER FUNCTIONS ========
-
-/*!
-    Constructs a widget which is a child of \a parent, with widget flags set
-    to \a flags.
-    
-    Constructor should be empty and all the actual construction should be
-    done in onInitialize().
- */
-RadioHsWidget::RadioHsWidget(QGraphicsItem* parent, Qt::WindowFlags flags)
-    : HbWidget(parent, flags),
-      mInformationAreaBackgroundButton(NULL),
-      mPowerButton(NULL),
-      mPreviousButton(NULL),
-      mNextButton(NULL),
-      mInformationAreaTwoRowsLayout(NULL),
-      mInformationLonelyRowLabel(NULL),
-      mInformationFirstRowLabel(NULL),
-      mInformationSecondRowLabel(NULL),
-      mAnimationIcon(NULL),
-      mFmRadioState(FmRadio::StateUndefined),
-      mFavoriteStationCount(FAVORITE_STATION_COUNT_UNDEFINED),
-      mCurrentStationIsFavorite(false),
-      mProfileMonitor(NULL),
-      mRadioServiceClient(NULL)
-{
-    LOG_METHOD;
-}
-
-/*!
-    Destructor
- */
-RadioHsWidget::~RadioHsWidget()
-{
-    LOG_METHOD;
-}
-
-/*!
-    Handles changes in FM Radio information.
-
-    \param informationType Type of changed information.
-    \param information Actual information.
- */
-void RadioHsWidget::handleRadioInformationChange(const int informationType,
-    const QVariant &information)
-{
-    LOG_METHOD;
-    switch (informationType) {
-
-    case RadioServiceNotification::FavoriteCount:
-        LOG("FavoriteCount");
-        if (information.canConvert(QVariant::Int) &&
-            information.toInt() >= FAVORITE_STATION_COUNT_LOWER_BOUNDARY &&
-            information.toInt() <= FAVORITE_STATION_COUNT_UPPER_BOUNDARY) {
-            mFavoriteStationCount = information.toInt();
-            // If there are favorite stations, enable the next/previous
-            // buttons.
-            LOG_FORMAT("mFavoriteStationCount: %d", mFavoriteStationCount);
-            // Enable or disable buttons only if favoriteCount differs
-            // from 1. CurrentIsFavorite case handles situation when there
-            // is only one favorite station.
-            if (mFavoriteStationCount != FAVORITE_STATION_COUNT_ONE) {
-                enableStationButtons();
-            }
-        } else {
-            mFavoriteStationCount = FAVORITE_STATION_COUNT_UNDEFINED;
-        }
-        break;
-
-    case RadioServiceNotification::CurrentIsFavorite:
-        LOG("CurrentIsFavorite");
-        if (information.canConvert(QVariant::Bool)) {
-            mCurrentStationIsFavorite = information.toBool();
-            LOG_FORMAT("currentIsFavorite: %d", mCurrentStationIsFavorite);
-            // If current station is favorite disable next/prev buttons.
-            // Radio sends this information only when there is only one
-            // favorite station set.
-            enableStationButtons();
-        }
-        break;
-
-    case RadioServiceNotification::RadioStatus:
-        LOG("RadioStatus");
-        if (information.canConvert(QVariant::Int)) {
-            const int status = information.toInt();
-            switch (status) {
-            case RadioStatus::Playing:
-                LOG("Playing");
-                handleRadioStateChange(FmRadio::StateRunning);
-                break;
-            case RadioStatus::Muted:
-                LOG("Muted");
-                break;
-            case RadioStatus::Seeking:
-                LEVEL2(LOG("Seeking"));
-                handleRadioStateChange(FmRadio::StateSeeking);
-                break;
-            case RadioStatus::NoAntenna:
-                LEVEL2(LOG("NoAntenna"));
-                handleRadioStateChange(FmRadio::StateAntennaNotConnected);
-                break;
-            case RadioStatus::PoweringOff:
-                LEVEL2(LOG("PoweringOff"));
-                handleRadioStateChange(FmRadio::StateClosing);
-                break;
-            default:
-                LOG("default case at case RadioStatus");
-                break;
-            }
-        }
-        break;
-
-    case RadioServiceNotification::Frequency:
-        LOG("Frequency");
-        // TODO: Should information.toString() be checked for too many characters? What's the limit?
-        if (information.canConvert(QVariant::String)) {
-            LOG_FORMAT("frequency: %s", GETSTRING(information.toString()));
-            // TODO: Remove comment when localisation is working on device.
-            //frequencyString = hbTrId("txt_fmradiohswidget_rad_list_l1_mhz").arg(freqString);
-            bool frequencyCleared = false;
-
-            if (mRadioInformation.contains(Frequency)) {
-                // Clear all infromation.
-                clearRadioInformation();
-                frequencyCleared = true;
-            }
-            // If widget do not have any frquency information, update it.
-            bool frequencyUpdated = updateRadioInformation(Frequency,
-                information.toString());
-            if (frequencyCleared || frequencyUpdated) {
-                // Information changed, update the UI.
-                changeInRadioInformation();
-                mFmRadioState = FmRadio::StateRunning;
-            }
-        }
-        break;
-
-    case RadioServiceNotification::Name:
-        LOG("Name");
-        handleSimilarRadioInformation(StationName, information);
-        break;
-
-    case RadioServiceNotification::Genre:
-        LOG("Genre");
-        handleSimilarRadioInformation(Pty, information);
-        break;
-
-    case RadioServiceNotification::RadioText:
-        LOG("RadioText");
-        handleSimilarRadioInformation(RadioText, information);
-        break;
-
-    case RadioServiceNotification::DynamicPS:
-        LOG("DynamicPS");
-        handleSimilarRadioInformation(DynamicPsName, information);
-        break;
-
-    default:
-        LOG("default case at notificationId");
-        break;
-    }
-}
-
-/*!
-    Handles changes in FM Radio state.
-
-    \param value New state of the radio application.
-*/
-void RadioHsWidget::handleRadioStateChange(const QVariant &value)
-{
-    LOG_METHOD;
-    int state;
-    if (value.canConvert(QVariant::Int)) {
-        state = value.toInt();
-    } else {
-        return;
-    }
-
-    if (state == mFmRadioState) {
-        // State did not change, so return.
-        return;
-    }
-
-    switch (state) {
-    case FmRadio::StateUndefined:
-        LOG("FmRadio::StateUndefined");
-        // Something went wrong. Widget should not be in this state after onInitialize().
-        mFmRadioState = FmRadio::StateUndefined;
-        break;
-    case FmRadio::StateNotRunning:
-        LOG("FmRadio::StateNotRunning");
-        mFmRadioState = FmRadio::StateNotRunning;
-        mRadioServiceClient->stopMonitoring();
-        changePowerButtonOn(false);
-        mFavoriteStationCount = FAVORITE_STATION_COUNT_UNDEFINED;
-        mCurrentStationIsFavorite = false;
-        enableStationButtons();
-        clearRadioInformation();
-        mInformationFirstRowLabel->setPlainText("");
-        mInformationSecondRowLabel->setPlainText("");
-        mInformationLonelyRowLabel->setPlainText(hbTrId("txt_fmradiohswidget_rad_list_fm_radio"));
-        changeInformationAreaLayout(OneRow);
-        break;
-    case FmRadio::StateStarting:
-        LOG("FmRadio::StateStarting");
-        mFmRadioState = FmRadio::StateStarting;
-        changePowerButtonOn(true);
-        mFavoriteStationCount = FAVORITE_STATION_COUNT_UNDEFINED;
-        mCurrentStationIsFavorite = false;
-        enableStationButtons();
-        changeInformationAreaLayout(Animation);
-        break;
-    case FmRadio::StateRunning:
-        LOG("FmRadio::StateRunning");
-        mFmRadioState = FmRadio::StateRunning;
-        // Stop timer if it is running because radio is now running.
-        mRadioServiceClient->startMonitoring(
-            FmRadio::VisibiltyDoNotChange);
-        changeInRadioInformation();
-        changePowerButtonOn(true);
-        enableStationButtons();
-        changeInformationAreaLayout(OneRow);
-        break;
-    case FmRadio::StateSeeking:
-        LOG("FmRadio::StateSeeking");
-        mFmRadioState = FmRadio::StateSeeking;
-        mCurrentStationIsFavorite = false;
-        enableStationButtons();
-        changeInformationAreaLayout(Animation);
-        break;
-    case FmRadio::StateAntennaNotConnected:
-        LOG("FmRadio::StateAntennaNotConnected");
-        mFmRadioState = FmRadio::StateAntennaNotConnected;
-        mCurrentStationIsFavorite = false;
-        enableStationButtons();
-        mInformationFirstRowLabel->setPlainText("");
-        mInformationSecondRowLabel->setPlainText("");
-        mInformationLonelyRowLabel->setPlainText(hbTrId(
-            "txt_fmradiohswidget_rad_info_connect_wired_headset"));
-        changeInformationAreaLayout(OneRow);
-        break;
-    case FmRadio::StateClosing:
-        LOG("FmRadio::StateClosing");
-        mFmRadioState = FmRadio::StateClosing;
-        changePowerButtonOn(false);
-        mFavoriteStationCount = FAVORITE_STATION_COUNT_UNDEFINED;
-        mCurrentStationIsFavorite = false;
-        enableStationButtons();
-        clearRadioInformation();
-        mInformationFirstRowLabel->setPlainText("");
-        mInformationSecondRowLabel->setPlainText("");
-        mInformationLonelyRowLabel->setPlainText(hbTrId(
-            "txt_fmradiohswidget_rad_list_fm_radio"));
-        changeInformationAreaLayout(OneRow);
-        break;
-    default:
-        LOG_FORMAT("default case at state. State: %d", state);
-        break;
-    }
-}
-
-/*!
-    Called when widget is initialized. Constructs objects and connects them.
-*/
-void RadioHsWidget::onInitialize()
-{
-    LOG_METHOD_ENTER;
-    mProfileMonitor = new RadioHsWidgetProfileReader(this);
-    mRadioServiceClient = new RadioHsWidgetRadioServiceClient(this);
-    
-    load(DOCML);
-    
-    // Use signal mapper to indicate button identifiers to button event
-    // slots. 
-    QSignalMapper* signalMapperPressed = new QSignalMapper(this); 
-    signalMapperPressed->setMapping(mPowerButton, Power);
-    signalMapperPressed->setMapping(mPreviousButton, Previous);
-    signalMapperPressed->setMapping(mNextButton, Next);
-
-    // Need to use different signal mapper for pressed and released events, 
-    // both have same mappings but they are mapped to different slots.
-    QSignalMapper* signalMapperReleased = new QSignalMapper(this);
-    signalMapperReleased->setMapping(mPowerButton, Power);
-    signalMapperReleased->setMapping(mPreviousButton, Previous);
-    signalMapperReleased->setMapping(mNextButton, Next);
-
-    // Connect button events to signal maps.
-    Radio::connect(mPowerButton, SIGNAL(pressed()), signalMapperPressed, SLOT (map()));
-    Radio::connect(mPowerButton, SIGNAL(released()), signalMapperReleased, SLOT (map()));
-    Radio::connect(mPreviousButton, SIGNAL(pressed()), signalMapperPressed, SLOT (map()));
-    Radio::connect(mPreviousButton, SIGNAL(released()), signalMapperReleased, SLOT (map()));
-    Radio::connect(mNextButton, SIGNAL(pressed()), signalMapperPressed, SLOT (map()));
-    Radio::connect(mNextButton, SIGNAL(released()), signalMapperReleased, SLOT (map()));
-    
-    // Connect mapper signals to self implemented slots.
-    Radio::connect(signalMapperPressed, SIGNAL(mapped(int)), this, SLOT(changeButtonToPressed(int)));
-    Radio::connect(signalMapperReleased, SIGNAL(mapped(int)), this, SLOT(changeButtonToReleased(int)));
-    
-    mProfileMonitor->startMonitoringRadioRunningStatus();
-}
-
-/*!
-    Called when widget is shown in the home screen
-*/
-void RadioHsWidget::onShow()
-{
-    LOG_METHOD_ENTER;
-}
-
-/*!
-    Called when widget is hidden from the home screen
-*/
-void RadioHsWidget::onHide()
-{
-    LOG_METHOD_ENTER;
-}
-
-/*!
-    Emited from HbPushButton:pressed() signal, changes the button layout to
-    pressed state.
- 
-    \param hsButtonIdentifier Identifies the button which was pressed.
- */
-void RadioHsWidget::changeButtonToPressed(int hsButtonIdentifier)
-{
-    LEVEL2(LOG_METHOD);
-    buttonEvent(static_cast<ControlButtonIdentifier>(hsButtonIdentifier), Pressed);
-}
-
-/*!
-    Emited from HbPushButton:released() signal, changes the button layout to
-    normal state.
- 
-    \param hsButtonIdentifier Identifies the button which was released.
- */
-void RadioHsWidget::changeButtonToReleased(int hsButtonIdentifier)
-{
-    LEVEL2(LOG_METHOD);
-    buttonEvent(static_cast<ControlButtonIdentifier>(hsButtonIdentifier), Normal);
-}
-
-/*!
-    Slot for closing FM Radio application from power button.
- */
-void RadioHsWidget::closeRadio()
-{
-    LOG_SLOT_CALLER;
-    mRadioServiceClient->commandFmRadio(RadioServiceCommand::PowerOff);
-}
-
-/*!
-    Slot for previous button clicked.
- */
-void RadioHsWidget::changeToPreviousStation()
-{
-    LOG_SLOT_CALLER;
-    clearRadioInformation();
-    mRadioServiceClient->commandFmRadio(RadioServiceCommand::Previous);
-}
-
-/*!
-    Slot for next button clicked.
- */
-void RadioHsWidget::changeToNextStation()
-{
-    LOG_SLOT_CALLER;
-    clearRadioInformation();
-    mRadioServiceClient->commandFmRadio(RadioServiceCommand::Next);
-
-}
-
-/*!
-    Slot for bringing the radio application to foreground.
- */
-void RadioHsWidget::changeRadioToForeground()
-{
-    LOG_SLOT_CALLER;
-    // If radio is not running start it to foreground by monitor request.
-    if (mFmRadioState == FmRadio::StateNotRunning) {
-        bool okToStartRadio = radioStartPermission();
-        if (okToStartRadio) {
-            handleRadioStateChange(FmRadio::StateStarting);
-            mRadioServiceClient->startMonitoring(
-                FmRadio::VisibiltyToForeground);
-        }
-    }
-    else {
-        if (mFmRadioState == FmRadio::StateClosing) {
-            // Radio is closing but user wants to power it up again.
-            mRadioServiceClient->commandFmRadio(RadioServiceCommand::PowerOn);
-            // Stop and start monitoring to get refresh.
-            mRadioServiceClient->stopMonitoring();
-            mRadioServiceClient->startMonitoring(
-                FmRadio::VisibiltyToBackground);
-            handleRadioStateChange(FmRadio::StateRunning);
-        }
-        // If radio is running, bring it to the foreground.
-        mRadioServiceClient->commandFmRadio(RadioServiceCommand::Foreground);
-    }
-}
-
-/*!
-    Slot for putting the radio application to the background.
- */
-void RadioHsWidget::changeRadioToBackground()
-{
-    LOG_SLOT_CALLER;
-    // If radio is not running start it to background by monitor request.
-    if (mFmRadioState == FmRadio::StateNotRunning) {
-        bool okToStartRadio = radioStartPermission();
-        if (okToStartRadio) {
-            handleRadioStateChange(FmRadio::StateStarting);
-            mRadioServiceClient->startMonitoring(
-                FmRadio::VisibiltyToBackground);
-        }
-    }
-    else if (mFmRadioState == FmRadio::StateStarting) {
-        // Do nothing if radio is starting.
-    }
-    else if (mFmRadioState == FmRadio::StateClosing) {
-        // Radio is closing but user wants to power it up again.
-        mRadioServiceClient->commandFmRadio(RadioServiceCommand::PowerOn);
-        // Stop and start monitoring to get refresh.
-        mRadioServiceClient->stopMonitoring();
-        mRadioServiceClient->startMonitoring(
-            FmRadio::VisibiltyToBackground);
-        handleRadioStateChange(FmRadio::StateRunning);
-    }
-    else {
-        // If radio is running, put it to the background.
-        // This is little bit useless because the radio is in background if
-        // user is able to click the widget.
-        mRadioServiceClient->commandFmRadio(RadioServiceCommand::Background);
-    }
-}
-
-/*!
-    Powering off or on the radio.
- */
-void RadioHsWidget::toggleRadioPower()
-{
-    LOG_SLOT_CALLER;
-    // If radio is not running start it to background by monitor request.
-    if (mFmRadioState == FmRadio::StateNotRunning || mFmRadioState == FmRadio::StateClosing) {
-        LEVEL2(LOG("Power on"));
-        // Start radio
-        changeRadioToBackground();
-    } else {
-        LEVEL2(LOG("Power off"));
-        // Close radio
-        closeRadio();
-    }
-}
-
-/*!
-    Loads docml file.
- 
-    \param docml Docml filename to be loaded.
- */
-void RadioHsWidget::load(const QString &docml)
-{
-    LOG_METHOD_ENTER;
-
-    QScopedPointer<HbDocumentLoader> documentLoader(new HbDocumentLoader());
-    bool loaded = false;
-    documentLoader->load(docml, &loaded);
-    if (loaded) {
-        // Find mainLayout
-        HbWidget *mainLayout = qobject_cast<HbWidget*> (
-            documentLoader->findWidget(DOCML_OBJECT_NAME_MAIN_LAYOUT));
-
-        if (mainLayout) {
-            QGraphicsLinearLayout *widgetLayout = new QGraphicsLinearLayout(
-                Qt::Vertical, this);
-            widgetLayout->addItem(mainLayout);
-            setLayout(widgetLayout);
-        }
-
-        // Find contentLayout
-        HbWidget *contentLayout = qobject_cast<HbWidget*> (
-            documentLoader->findWidget(DOCML_OBJECT_NAME_CONTENT_LAYOUT));
-        if (contentLayout) {
-
-            // Find stacked layout for tuner area.
-            HbWidget *tunerStackedLayout = qobject_cast<HbWidget*> (
-                documentLoader->findWidget(
-                    DOCML_OBJECT_NAME_TUNER_STACKED_LAYOUT));
-            if (tunerStackedLayout) {
-
-                // Find stacked layout for information area.
-                HbWidget *tunerInformationStackedLayout = qobject_cast<
-                    HbWidget*> (documentLoader->findWidget(
-                    DOCML_OBJECT_NAME_TUNER_INFORMATION_STACKED_LAYOUT));
-                if (tunerInformationStackedLayout) {
-                }
-
-                // Find lonely label
-                mInformationLonelyRowLabel = qobject_cast<HbLabel *> (
-                    documentLoader->findWidget(
-                        DOCML_OBJECT_NAME_LONELY_ROW_LABEL));
-                if (mInformationLonelyRowLabel) {
-                    // TODO: Set the color in docml when application designer supports it.
-                    QColor color = HbColorScheme::color(
-                        "qtc_radio_tuner_normal");
-                    mInformationLonelyRowLabel->setTextColor(color);
-                }
-
-                // Find layout for two rows
-                mInformationAreaTwoRowsLayout = qobject_cast<
-                    QGraphicsWidget *> (documentLoader->findObject(
-                    DOCML_OBJECT_NAME_TWO_ROWS_LAYOUT));
-                if (mInformationAreaTwoRowsLayout) {
-                    // Find first row
-                    mInformationFirstRowLabel = qobject_cast<HbLabel *> (
-                        documentLoader->findWidget(
-                            DOCML_OBJECT_NAME_FIRST_ROW_LABEL));
-                    if (mInformationFirstRowLabel) {
-                        // TODO: Set the color in docml when application designer supports it.
-                        QColor color = HbColorScheme::color(
-                            "qtc_radio_tuner_normal");
-                        mInformationFirstRowLabel->setTextColor(color);
-                    }
-
-                    // Find second row
-                    mInformationSecondRowLabel = qobject_cast<HbLabel *> (
-                        documentLoader->findWidget(
-                            DOCML_OBJECT_NAME_SECOND_ROW_LABEL));
-                    if (mInformationSecondRowLabel) {
-                        // TODO: Set the color in docml when application designer supports it.
-                        QColor color = HbColorScheme::color(
-                            "qtc_radio_tuner_normal");
-                        mInformationSecondRowLabel->setTextColor(color);
-                    }
-                }
-
-                mAnimationIcon = qobject_cast<HbLabel *> (
-                    documentLoader->findWidget(
-                        DOCML_OBJECT_NAME_ANIMATION_ICON));
-                if (mAnimationIcon) {
-                    // Use animation manager to access anim loading animation.
-                    HbIconAnimationManager *animationManager =
-                        HbIconAnimationManager::global();
-                    // TODO: Axml extension can be removed after wk24 release.
-                    animationManager->addDefinitionFile(QLatin1String(
-                        "qtg_anim_loading.axml"));
-                    mAnimationIcon->setIcon(HbIcon("qtg_anim_loading"));
-                }
-            }
-
-            // Find push button for tuner area.
-            mInformationAreaBackgroundButton = qobject_cast<HbPushButton*> (
-                documentLoader->findWidget(
-                    DOCML_OBJECT_NAME_TUNER_BACKGROUND_BUTTON));
-            if (mInformationAreaBackgroundButton) {
-                // Use the frame background.
-                HbFrameDrawer *tunerBackgroundButtonFrameDrawer =
-                    new HbFrameDrawer("qtg_fr_tuner",
-                        HbFrameDrawer::ThreePiecesHorizontal);
-                tunerBackgroundButtonFrameDrawer->setFillWholeRect(true);
-                mInformationAreaBackgroundButton->setFrameBackground(
-                    tunerBackgroundButtonFrameDrawer);
-                // Connect the button's clicked signal. 
-                Radio::connect(mInformationAreaBackgroundButton,
-                    SIGNAL(clicked()), this, SLOT(changeRadioToForeground()));
-            }
-
-            // Find layout for control buttons.
-            HbWidget *controlButtonsLayout = qobject_cast<HbWidget*> (
-                documentLoader->findWidget(
-                    DOCML_OBJECT_NAME_CONTROL_BUTTONS_LAYOUT));
-            if (controlButtonsLayout) {
-
-                // Find power button.
-                mPowerButton
-                    = qobject_cast<HbPushButton *> (
-                        documentLoader->findWidget(
-                            DOCML_OBJECT_NAME_POWER_BUTTON));
-                if (mPowerButton) {
-                    defineButton(*mPowerButton,
-                        CONTROL_BUTTON_GRAPHICS_NORMAL, POWER_BUTTON_SUFFIX,
-                        POWER_BUTTON_ICON_ON,
-                        CONTROL_BUTTON_ICON_COLOR_NORMAL);
-                    // Connect the button's clicked signal.
-                    Radio::connect(mPowerButton, SIGNAL(clicked()),
-                                   this,         SLOT(toggleRadioPower()));
-                }
-
-                // Find previous button.
-                mPreviousButton = qobject_cast<HbPushButton *> (
-                    documentLoader->findWidget(
-                        DOCML_OBJECT_NAME_PREVIOUS_BUTTON));
-                if (mPreviousButton) {
-                    defineButton(*mPreviousButton,
-                        CONTROL_BUTTON_GRAPHICS_DISABLED,
-                        PREVIOUS_BUTTON_SUFFIX, NULL,
-                        CONTROL_BUTTON_ICON_COLOR_DISABLED);
-                    // Connect the button's clicked signal.
-                    Radio::connect(mPreviousButton, SIGNAL(clicked()),
-                                   this,            SLOT(changeToPreviousStation()));
-                }
-
-                // Find next button.
-                mNextButton
-                    = qobject_cast<HbPushButton *> (
-                        documentLoader->findWidget(
-                            DOCML_OBJECT_NAME_NEXT_BUTTON));
-                if (mNextButton) {
-                    defineButton(*mNextButton,
-                        CONTROL_BUTTON_GRAPHICS_DISABLED, NEXT_BUTTON_SUFFIX,
-                        NULL, CONTROL_BUTTON_ICON_COLOR_DISABLED);
-                    // Connect the button's clicked signal.
-                    Radio::connect(mNextButton, SIGNAL(clicked()),
-                                   this,        SLOT(changeToNextStation()));
-                }
-            }
-        }
-    }
-    else {
-        // Docml was not succesfully loaded. UI cannot be displayed.
-        // Emit error to home screen framework, which removes the widget. 
-        emit error();
-    }
-}
-
-/*!
-    Groups handling of similar kind of radio information (textual) to one
-    function.
-
-    \param informationType Type of changed information.
-    \param information Actual textual information.
- */
-void RadioHsWidget::handleSimilarRadioInformation(
-    const FmRadioInformationType informationType, const QVariant &information)
-{
-    LOG_METHOD_ENTER;
-    // TODO: Should information.toString() be checked for too many characters? What's the limit?
-    if (information.canConvert(QVariant::String) && updateRadioInformation(
-        informationType, information.toString())) {
-        LOG_FORMAT("informationType: %d, information: %s", informationType, GETSTRING(information.toString()));
-        changeInRadioInformation();
-    }
-}
-
-/*!
-    Check if the the radio information is changed. If it is changed, it is
-    also updated.
-
-    \param informationType Type of the information.
-    \param information  Information text.
-
-    \returns Returns \c true, if information is updated. Returns \c false otherwise.
- */
-bool RadioHsWidget::updateRadioInformation(const FmRadioInformationType informationType,
-    const QString &information)
-{
-    LOG_METHOD_RET("%d");
-    // If hash contains this type of information.
-    if (mRadioInformation.contains(informationType)) {
-        // If new information is empty.
-        if (information.isEmpty()) {
-            // Remove old information from the hash.
-            LEVEL2(LOG_FORMAT("informationType: %s removed", GETSTRING(informationType)));
-            mRadioInformation.remove(informationType);
-            // Return true to indicate the change.
-            return true;
-        }
-        // If new information differs from the old one.
-        if (mRadioInformation[informationType].compare(information) != 0) {
-            // Update the information.
-            LEVEL2(LOG_FORMAT("informationType: %s = %s", GETSTRING(informationType), GETSTRING(information)));
-            mRadioInformation[informationType] = information;
-            // And return true to indicate the change.
-            return true;
-        }
-    } else { // Hash do not contain this type of information.
-        // If new information is not empty.
-        if (!information.isEmpty()) {
-            // Add it to the hash.
-            LEVEL2(LOG_FORMAT("informationType: %s = %s", GETSTRING(informationType), GETSTRING(information)));
-            mRadioInformation[informationType] = information;
-            // Return true to indicate the change.
-            return true;
-        }
-    }
-    // Return false to indicate that nothing changed.
-    return false;
-}
-
-/*!
-    Formatting radio information texts after a change.
- */
-void RadioHsWidget::changeInRadioInformation()
-{
-    LOG_METHOD_ENTER;
-    // Clear the rows.
-    mRadioInformationFirstRow.clear();
-    mRadioInformationSecondRow.clear();
-
-    // First row contains station name.
-    if (mRadioInformation.contains(StationName)) {
-        mRadioInformationFirstRow.append(mRadioInformation.value(StationName));
-    }
-    else if (mRadioInformation.contains(Frequency)) {
-        // Or frequency.
-        mRadioInformationFirstRow.append(mRadioInformation.value(Frequency));
-    } LEVEL2(LOG_FORMAT("mRadioInformationFirstRow: %s", GETSTRING(mRadioInformationFirstRow)));
-
-    // Second row of information contains radio text.
-    if (mRadioInformation.contains(RadioText)) {
-        mRadioInformationSecondRow.append(mRadioInformation.value(RadioText));
-    }
-    else if (mRadioInformation.contains(DynamicPsName)) {
-        // Or Dynamic PS name.
-        mRadioInformationSecondRow.append(mRadioInformation.value(DynamicPsName));
-    }
-    else if (mRadioInformation.contains(Pty)) {
-        // Or PTY.
-        mRadioInformationSecondRow.append(mRadioInformation.value(Pty));
-    }
-    LEVEL2(LOG_FORMAT("mRadioInformationSecondRow: %s", GETSTRING(mRadioInformationSecondRow)));
-    
-    // If second row is empty.
-    if (mRadioInformationSecondRow.isEmpty()) {
-        // Show only the lonely row.
-        mInformationLonelyRowLabel->setPlainText(mRadioInformationFirstRow);
-        changeInformationAreaLayout(OneRow);
-    }
-    else {
-        // Else display both rows.
-        mInformationFirstRowLabel->setPlainText(mRadioInformationFirstRow);
-        mInformationSecondRowLabel->setPlainText(mRadioInformationSecondRow);
-        changeInformationAreaLayout(TwoRows);
-    }
-}
-
-/*!
-    Clears the radio station information. For example, when the station is
-    changed, old information should be cleared.
- */
-void RadioHsWidget::clearRadioInformation()
-{
-    LOG_METHOD_ENTER;
-    mRadioInformation.clear();
-}
-
-/*!
-    Changes visible widgets of information area stacked layout.
-
-    \param layout The layout to switch visible.
- */
-void RadioHsWidget::changeInformationAreaLayout(const InformationAreaLayout layout)
-{
-    LOG_METHOD_ENTER;
-    mInformationLonelyRowLabel->setVisible(layout == OneRow);
-    mInformationAreaTwoRowsLayout->setVisible(layout == TwoRows);
-    mAnimationIcon->setVisible(layout == Animation);
-}
-
-/*!
-    Changes state of power button.
-    
-    \param isPowerOn \c true the power is on and \c false the power is off.
- */
-void RadioHsWidget::changePowerButtonOn(const bool isPowerOn)
-{
-    LEVEL2(LOG_METHOD);
-    if (isPowerOn) {
-        LEVEL2(LOG("Power on"));
-        // TODO: Temporarily set the text to clarify the action it performs.
-        // Remove when graphics displays the difference.
-        mPowerButton->setText("Off");
-        buttonEvent(Power, Latched);
-    } else {
-        LEVEL2(LOG("Power off"));
-        // TODO: Temporarily set the text to clarify the action it performs.
-        // Remove when graphics displays the difference.
-        mPowerButton->setText("On");
-        buttonEvent(Power, Normal);
-    }
-}
-
-/*!
-    Changes enabled state of station buttons.
- */
-void RadioHsWidget::enableStationButtons()
-{
-    LEVEL2(LOG_METHOD_ENTER);
-    LOG_FORMAT("RadioHsWidget::enableStationButtons count: %d", mFavoriteStationCount);
-    if (mFmRadioState == FmRadio::StateAntennaNotConnected){
-        changeButtonToDisabled(Next);
-        changeButtonToDisabled(Previous);
-    }
-    else if ((mFavoriteStationCount > 1) || (mFavoriteStationCount == 1
-        && !mCurrentStationIsFavorite)) {
-        changeButtonToEnabled(Next);
-        changeButtonToEnabled(Previous);
-    }
-    else if ((mFavoriteStationCount == 1 && mCurrentStationIsFavorite)
-        || (mFavoriteStationCount < 1)) {
-        changeButtonToDisabled(Next);
-        changeButtonToDisabled(Previous);
-    }
-}
-
-/*!
-    Makes homescreen specific push button based on parameters.
- 
-    \param target Target push button to modify. Must not be NULL.
-    \param graphicsId Defines the target button background graphics.
-    \param suffix Defines the suffix for the target button background graphics.
-    \param icon Defines the icon for the target button. 
-    \param iconColor Defines the icon color for the target button. 
- */
-void RadioHsWidget::defineButton(HbPushButton &target, const QString &graphicsId,
-    const QStringList &suffix, const QString &icon, const QString &iconColor)
-{
-    LEVEL2(LOG_METHOD);
-    HbFrameDrawer* drawer = NULL;
-
-    // First check if the drawer is already created for this push button
-    if (!target.frameBackground()) {
-        LEVEL2(LOG("Creating new frame background."));
-        // Nope, create one now
-        drawer = new HbFrameDrawer(graphicsId,
-            HbFrameDrawer::ThreePiecesHorizontal);
-        target.setFrameBackground(drawer);
-    }
-    else {
-        // Frame drawer already created, only need to update frame graphics
-        drawer = target.frameBackground();
-        drawer->setFrameGraphicsName(graphicsId);
-    }
-
-    // Set file name suffix list, so that drawer can load correct 3-piece graphic files 
-    drawer->setFileNameSuffixList(suffix);
-    
-    // Set the icon, if it is not NULL
-    if (!icon.isNull()) {
-        target.setIcon(HbIcon(icon));
-    }
-
-    // Update also the icon color
-    QColor color = HbColorScheme::color(iconColor);
-    target.icon().setColor(color);
-
-    // Lastly, check if the buttton is disabled
-    if (iconColor == CONTROL_BUTTON_ICON_COLOR_DISABLED) {
-        target.setEnabled(false);
-    }
-    else {
-        target.setEnabled(true);
-    }
-}
-
-/*!
-    Prepares the information needed for displaying the button correctly
-    reflecting its state.
- 
-    \param buttonId Identifies the button.
-    \param state Tells in what state the button is.
- */
-void RadioHsWidget::buttonEvent(ControlButtonIdentifier buttonId,
-    const ControlButtonState state)
-{
-    LEVEL2(LOG_METHOD);
-    HbPushButton* target = NULL;
-    QStringList suffix;
-    QString icon;
-
-    switch (buttonId) {
-    case Power:
-        LEVEL2(LOG("Power"));
-        target = mPowerButton;
-        icon = POWER_BUTTON_ICON_ON;
-        suffix = POWER_BUTTON_SUFFIX;
-        break;
-    case Previous:
-        LEVEL2(LOG("Previous"));
-        target = mPreviousButton;
-        suffix = PREVIOUS_BUTTON_SUFFIX;
-        break;
-    case Next:
-        LEVEL2(LOG("Next"));
-        target = mNextButton;
-        suffix = NEXT_BUTTON_SUFFIX;
-        break;
-    default:
-        LOG("default case at buttonId");
-        break;
-    }
-    
-    QString buttonBackgroundGraphics;
-    QString buttonIconColors;
-    switch (state) {
-    case Normal:
-        LEVEL2(LOG("Normal"));
-        target->setProperty("state", "normal");
-        buttonBackgroundGraphics = CONTROL_BUTTON_GRAPHICS_NORMAL;
-        buttonIconColors = CONTROL_BUTTON_ICON_COLOR_NORMAL;
-        break;
-    case Pressed:
-        LEVEL2(LOG("Pressed"));
-        target->setProperty("state", "pressed");
-        buttonBackgroundGraphics = CONTROL_BUTTON_GRAPHICS_PRESSED;
-        buttonIconColors = CONTROL_BUTTON_ICON_COLOR_PRESSED;
-        break;
-    case Disabled:
-        LEVEL2(LOG("Disabled"));
-        target->setProperty("state", "disabled");
-        buttonBackgroundGraphics = CONTROL_BUTTON_GRAPHICS_DISABLED;
-        buttonIconColors = CONTROL_BUTTON_ICON_COLOR_DISABLED;
-        break;
-    case Latched:
-        LEVEL2(LOG("Latched"));
-        target->setProperty("state", "latched");
-        buttonBackgroundGraphics = CONTROL_BUTTON_GRAPHICS_LATCHED;
-        buttonIconColors = CONTROL_BUTTON_ICON_COLOR_LATCHED;
-        break;
-    default:
-        LOG("default case at button state");
-        break;
-    }
-
-    RadioHsWidget::defineButton(*target, buttonBackgroundGraphics,
-        suffix, icon, buttonIconColors);
-}
-
-/*!
-    Disables specified push button.
- 
-    \param hsButtonIdentifier Which button is to be disabled.
- */
-void RadioHsWidget::changeButtonToDisabled(int hsButtonIdentifier)
-{
-    LEVEL2(LOG_METHOD_ENTER);
-    buttonEvent(static_cast<ControlButtonIdentifier>(hsButtonIdentifier), Disabled);
-}
-
-/*!
-    Enabled specified push button.
- 
-    \param hsButtonIdentifier Which button is to be enabled.
- */
-void RadioHsWidget::changeButtonToEnabled(int hsButtonIdentifier)
-{
-    LEVEL2(LOG_METHOD_ENTER);
-    changeButtonToReleased(hsButtonIdentifier);
-}
-
-/*!
-    Checks the profile of the device. If profile is offline, user is asked a
-    permission to start the radio in offline profile. Dialog is shown on
-    behalf of the radio asking the permission.    
-    
-    \returns \c true if radio can be started, \c false if device is in
-    offline profile and user didn't gave permission to start the radio.  
- */
-bool RadioHsWidget::radioStartPermission()
-{
-    LOG_METHOD_ENTER;
-    // This is true by default because we might not be in offline profile and
-    // starting the radio is allowed in other profiles without asking a
-    // permission.
-    bool radioStartPermssion = true;
-    if (mProfileMonitor->isInOfflineMode()) {
-        // Device is in offline profile, ask the user for permission to start
-        HbDeviceMessageBox box(hbTrId(
-            "txt_fmradiohswidget_rad_info_activate_radio_in_offline_mode_hs"),
-            HbMessageBox::MessageTypeQuestion);
-        box.setTimeout(HbPopup::NoTimeout);
-        box.exec();
-        // radioStartPermssion is now true or false, depending what the user
-        // selected. If user didn't gave permission, then radio is not
-        // started.
-        radioStartPermssion = box.isAcceptAction(box.triggeredAction());
-    }
-    return radioStartPermssion;
-}
--- a/radiohswidget/src/radiohswidgetplugin.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +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:  FM Radio home screen widget plugin
-*
-*/
-
-// System includes
-#include <qserviceinterfacedescriptor.h>
-#include <qabstractsecuritysession.h>
-#include <qservicecontext.h>
-
-// User includes
-#include "radiohswidgetplugin.h"
-#include "radiohswidget.h"
-
-// Constants
-/*! Home screen widget service interface name. */
-const QLatin1String HOME_SCREEN_WIDGET_INTERFACE_NAME(
-    "com.nokia.symbian.IHomeScreenWidget");
-
-/*!
-    \class RadioHsWidgetPlugin
-    \brief Implementats the home screen widget plugin.
-
-    RadioHsWidgetPlugin implements needed functions for creating instance of
-    RadioHsWidget.
-*/
-
-// ======== MEMBER FUNCTIONS ========
-
-/*!
-    Initialize plugin for FM Radio home screen widget. Contains necessary information about 
-    the RadioWidget that it can be loaded through QT Service Framework.
-    
-    \returns Pointer to a new RadioHsWidget or to the NULL. 
-*/
-QObject *RadioHsWidgetPlugin::createInstance(const QServiceInterfaceDescriptor &descriptor,
-                                             QServiceContext *context,
-                                             QAbstractSecuritySession *session)
-{
-    Q_UNUSED(context);
-    Q_UNUSED(session);
-
-    // If descriptor interface name matches
-    if (descriptor.interfaceName() == HOME_SCREEN_WIDGET_INTERFACE_NAME) {
-        // Create and return new FM Radio home screen widget.
-        return new RadioHsWidget();
-    } else {
-        // Otherwise return NULL.
-        return NULL;
-    }
-}
-
-Q_EXPORT_PLUGIN2(radiohswidgetplugin, RadioHsWidgetPlugin)
--- a/radiohswidget/src/radiohswidgetprofilereader.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,161 +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: FM Radio widget process handler
-*
-*/
-
-// System includes
-#include <QDateTime>
-#include "xqsettingsmanager.h"
-#include "xqsettingskey.h"
-#include "xqpublishandsubscribeutils.h"
-
-// User includes
-#include "radiohswidgetprofilereader.h"
-#include "radiohswidget.h"
-#include "radioservicedef.h"
-#include "radio_global.h"
-#include "radiologger.h"
-
-// Constants
-/** Constant for radio running undefined status. */
-const int RADIO_RUNNING_STATUS_UNDEFINED(-1);
-
-/*!
-    \class RadioHsWidgetProfileReader
-    \brief Implementation of P&S key reader and monitor.
-
-    RadioHsWidgetProfileReader implements reader and monitor for P&S keys.
-*/
-
-// ======== MEMBER FUNCTIONS ========
-
-/*!
-    Constructs a profile reader which is a child of \a parent.
-    
-    Creates XQSettingsManager for monitoring and accessing the P&S keys.
-    Connects to the signals of XQSettingsManager.
-*/
-RadioHsWidgetProfileReader::RadioHsWidgetProfileReader(
-    RadioHsWidget *parent) :
-    QObject(parent),
-    mParent(*parent),
-    mSettingsManager(new XQSettingsManager(this)),
-    mRadioStatus(RADIO_RUNNING_STATUS_UNDEFINED)
-{
-    LOG_METHOD;
-    Radio::connect(mSettingsManager, SIGNAL(itemDeleted(XQSettingsKey)), this,
-        SLOT(handleDeletedItem(XQSettingsKey)));
-    Radio::connect(mSettingsManager, SIGNAL(valueChanged(XQSettingsKey, QVariant)),
-        this, SLOT(handleChanges(XQSettingsKey, QVariant)));
-}
-
-/*!
-    Destructor 
- */
-RadioHsWidgetProfileReader::~RadioHsWidgetProfileReader()
-{
-    LOG_METHOD;
-    XQSettingsKey radioRunningKey(XQSettingsKey::TargetPublishAndSubscribe,
-        KRadioPSUid, KRadioStartupKey);
-    mSettingsManager->stopMonitoring(radioRunningKey);
-}
-
-/*!
-    Start monitoring of radio P&S key. Read also the initial value.
- */
-void RadioHsWidgetProfileReader::startMonitoringRadioRunningStatus()
-{
-    LOG_METHOD;
-    XQSettingsKey radioRunningKey(XQSettingsKey::TargetPublishAndSubscribe,
-        KRadioPSUid, KRadioStartupKey);
-    // Start monitoring.
-    mSettingsManager->startMonitoring(radioRunningKey);
-    // Read current value.
-    radioRunningStatus(
-        mSettingsManager->readItemValue(radioRunningKey));
-}
-
-/*!
-    Checks if device is in offline mode and \returns \c true if it is
-    and \c false if not.
- */
-bool RadioHsWidgetProfileReader::isInOfflineMode()
-{
-    LOG_METHOD_RET("%d");
-    XQSettingsKey connectionKey( XQSettingsKey::TargetCentralRepository,
-            CENREP_CORE_APPLICATION_UIS, ID_NETWORK_CONNECTION_ALLOWED );
-
-    // Read current value.
-    const QVariant connectionAllowed = mSettingsManager->readItemValue( connectionKey );
-    if ( connectionAllowed.canConvert( QVariant::Int ) && connectionAllowed.toInt() == NetworkNotAllowed ) {
-        return true;
-    }
-
-    return false;
-}
-
-/*!
-    Handling of deletion of listened keys.
- 
-    \param key Deleted key.
- */
-void RadioHsWidgetProfileReader::handleDeletedItem(const XQSettingsKey &key)
-{
-    LOG_METHOD_ENTER;
-    if (key.uid() == KRadioPSUid && key.key() == KRadioStartupKey) {
-        LOG("KRadioStartupKey deleted");
-        startMonitoringRadioRunningStatus();
-    }
-}
-
-/*!
-    Notifications from settings manager are handled and routed to appropriate
-    private slots.
-
-    \param key Changed key.
-    \param value Value of changed key.
- */
-void RadioHsWidgetProfileReader::handleChanges(const XQSettingsKey &key,
-    const QVariant& value)
-{
-    LOG_SLOT_CALLER;
-
-    if (key.uid() == KRadioPSUid && key.key()
-        == KRadioStartupKey) {
-        LOG("KRadioStartupKey changed");
-        radioRunningStatus(value);
-    }
-}
-
-/*!
-    Handling changes in radio running P&S key.
- 
-    \param value is int representation of time in seconds when radio was
-    started.
- */
-void RadioHsWidgetProfileReader::radioRunningStatus(
-    const QVariant &value)
-{
-    LOG_METHOD_ENTER;
-    if (value.canConvert(QVariant::Int)) {
-        mRadioStatus = value.toInt();
-        // Notify the observer that radio is running.
-        mParent.handleRadioStateChange(FmRadio::StateRunning);
-    } else {
-        mRadioStatus = RADIO_RUNNING_STATUS_UNDEFINED;
-        // Notify the observer that radio is not running.
-        mParent.handleRadioStateChange(FmRadio::StateNotRunning);
-    }
-}
--- a/radiohswidget/src/radiohswidgetradioserviceclient.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,361 +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: FM Radio widget radio service client
-*
-*/
-
-// System includes
-#include <xqserviceglobal.h>
-
-// User includes
-#include "radiohswidgetradioserviceclient.h"
-#include "radiohswidget.h"
-#include "radionotificationdata.h"
-#include "radioservicedef.h"
-#include "radiologger.h"
-
-/*!
-    \class RadioHsWidgetRadioServiceClient
-    \brief Implementation of QtHighway based communicator with radio application.
-
-    RadioHsWidgetRadioServiceClient implements monitoring of radio
-    information and controlling of radio. This is done by service request
-    through QtHighway.
-*/
-
-// ======== MEMBER FUNCTIONS ========
-
-/*!
-    Constructs a profile reader which is a child of \a parent.
- */
-RadioHsWidgetRadioServiceClient::RadioHsWidgetRadioServiceClient(
-    RadioHsWidget *parent) :
-    QObject(parent),
-    mParent(*parent),
-    mRequestPending(false),
-    mRadioMonitorRequest(NULL),
-    mRadioControlRequest(NULL),
-    mDataInitialized(false)
-{
-    LOG_METHOD;
-}
-
-/*!
-    Destructor 
- */
-RadioHsWidgetRadioServiceClient::~RadioHsWidgetRadioServiceClient()
-{
-    LOG_METHOD;
-    stopMonitoring();
-}
-
-/*!
-    Command FM Radio station.
- 
-    \param command Command to request radio to perform.
- */
-void RadioHsWidgetRadioServiceClient::commandFmRadio(
-    const RadioServiceCommand::CommandId command)
-{
-    LOG_METHOD_ENTER;
-    QVariant commandArgument;
-    commandArgument.setValue(static_cast<int>(command));
-    FmRadio::VisibiltyAfterRequest visibility;
-    if (command == RadioServiceCommand::Foreground) {
-        visibility = FmRadio::VisibiltyToForeground;
-    } else if (command == RadioServiceCommand::Background) {
-        visibility = FmRadio::VisibiltyToBackground;
-    }  else {
-        visibility = FmRadio::VisibiltyDoNotChange;
-    }
-    sendControlRequest(commandArgument, visibility);
-}
-
-/*!
-    Start radio monitoring.
-    
-    \param visibility Desired visibility for the radio after the request.
- */
-void RadioHsWidgetRadioServiceClient::startMonitoring(
-    FmRadio::VisibiltyAfterRequest visibility)
-{
-    LOG_METHOD_ENTER;
-    createMonitorServiceRequest();
-    sendMonitorRequest(visibility);
-}
-
-/*!
-    Stops radio monitoring.
- */
-void RadioHsWidgetRadioServiceClient::stopMonitoring()
-{
-    LOG_METHOD_ENTER;
-    // Delete the mRadioMonitorRequest. 
-    if (mRadioMonitorRequest) {
-        delete mRadioMonitorRequest;
-        mRadioMonitorRequest = NULL;
-        mRequestPending = false;
-        mDataInitialized = false;
-    }
-}
-
-/*!
-    Creates and returns RadioNotificationData.
-    This is needed because radionotificationdata.h cannot be
-    included on test code.
- */
-QVariant RadioHsWidgetRadioServiceClient::createRadioNotificationData(int type, const QVariant& data)
-{
-    LOG_METHOD_ENTER;
-    QVariant ret;
-    ret.setValue(RadioNotificationData(type, data));
-    return ret;
-}
-
-
-/*!
-    Handles request errors.
- 
-    \param errorCode Code of the error type.
-    \param errorMessage Error message.
- */
-void RadioHsWidgetRadioServiceClient::handleError(const int errorCode,
-    const QString &errorMessage)
-{
-    LOG_METHOD_ENTER;
-    Q_UNUSED(errorMessage)
-    LEVEL2(LOG_SLOT_CALLER);
-    handleRequestError(errorCode);
-}
-
-/*!
-    Handle changes in FM Radio.
- 
-    \param value List of information published by radio.
- */
-void RadioHsWidgetRadioServiceClient::handleFmRadioChange(
-    const QVariant &value)
-{
-    LOG_METHOD_ENTER;
-    LEVEL2(LOG_SLOT_CALLER);
-    // Request is not pending anymore.
-    mRequestPending = false;
-    // If first request was refresh operation.
-    if (!mDataInitialized) {
-        LOG("Set operation to KRadioServiceMonitorOperation");
-        // Change the operation to the monitoring.
-        mRadioMonitorRequest->setOperation(RADIO_MONITOR_SERVICE_OPERATION);
-        // Data is now initialized.
-        mDataInitialized = true;
-    }
-    // Request notifications again.
-    startMonitoring(FmRadio::VisibiltyDoNotChange);
-    
-    // If valid and right kind of data was received.
-    if (value.canConvert(QVariant::List) ) {
-        QVariantList notificationList = value.toList();
-        // Iterate through the list.
-        foreach (const QVariant& variant, notificationList) {
-            // Extract notification data.
-            RadioNotificationData notification = variant.value<RadioNotificationData>();
-            // And it's type.
-            const int notificationId = notification.mType;
-            // And the data
-            const QVariant notificationData = notification.mData;
-            // If the data is valid.
-            if (notificationData.isValid()) {
-                // Notify the observer about the new information.
-                mParent.handleRadioInformationChange(notificationId, notificationData);
-            }
-        }
-    }
-}
-
-/*!
-    Handles request error.
- 
-    \param error Identifies the error. 
- */
-void RadioHsWidgetRadioServiceClient::handleRequestError(const int error)
-{
-    LOG_METHOD;
-    QString errorStr;
-    switch (error) {
-    case XQService::ENoError:
-        errorStr = "No error";
-        break;
-    case XQService::EConnectionError:
-        errorStr = "Error in IPC Connection";
-        break;
-    case XQService::EConnectionClosed:
-        errorStr = "IPC Connection is closed";
-        stopMonitoring();
-        mParent.handleRadioStateChange(FmRadio::StateNotRunning);
-        break;
-    case XQService::EServerNotFound:
-        errorStr = "Can not find server";
-        break;
-    case XQService::EIPCError:
-        errorStr = "Known IPC error defined by SDK";
-        break;
-    case XQService::EUnknownError:
-        errorStr = "Unknown IPC error";
-        break;
-    case XQService::ERequestPending:
-        errorStr = "Already pending request";
-        break;
-    default:
-        errorStr = "default case at error";
-        break;
-    }
-    LOG(GETSTRING(errorStr));
-}
-
-/*!
-    Creates control service request object.
- */
-void RadioHsWidgetRadioServiceClient::createControlServiceRequest()
-{
-    LOG_METHOD_ENTER;
-    if (!mRadioControlRequest) {
-        LOG("Create request");
-        mRadioControlRequest = mApplicationManager.create(
-            RADIO_CONTROL_SERVICE, RADIO_CONTROL_SERVICE_OPERATION, false);
-        
-        if (mRadioControlRequest) {
-            LOG("Request created");
-            // Connect request to handle it's error.
-            Radio::connect(mRadioControlRequest,
-                SIGNAL(requestError(int,const QString&)), this,
-                SLOT(handleError(int,const QString&)));
-            
-            // Request is synchronous.
-            mRadioControlRequest->setSynchronous(true);
-            // Request is not embedded.
-            mRadioControlRequest->setEmbedded(false);
-        }
-    }
-}
-
-/*!
-    Creates monitor service request object.
- */
-void RadioHsWidgetRadioServiceClient::createMonitorServiceRequest()
-{
-    LOG_METHOD_ENTER;
-    if (!mRadioMonitorRequest) {
-        // If data is not initialized, set operation to refresh,
-        // otherwise to monitor operation.
-        QString operation = mDataInitialized ? RADIO_MONITOR_SERVICE_OPERATION
-            : RADIO_MONITOR_SERVICE_REFRESH_OPERATION;
-
-        LOG("Create request");
-        mRadioMonitorRequest = mApplicationManager.create(
-            RADIO_MONITOR_SERVICE, operation, false);
-        
-        if (mRadioMonitorRequest) {
-            LOG("Request created");
-            // Connect request to handle it's completion.
-            Radio::connect(mRadioMonitorRequest, SIGNAL(requestOk(const QVariant&)),
-                this, SLOT(handleFmRadioChange(const QVariant&)));
-            // Connect request to handle it's error.
-            Radio::connect(mRadioMonitorRequest,
-                SIGNAL(requestError(int,const QString&)), this,
-                SLOT(handleError(int,const QString&)));
-            
-            // Request is asynchronous.
-            mRadioMonitorRequest->setSynchronous(false);
-            // Request is not embedded.
-            mRadioMonitorRequest->setEmbedded(false);
-        }
-    }
-}
-
-/*!
-    Sends the control request containing the command.
-    
-    \param argument Contains the command.
-    \param visibility Desired visibility for the radio after the request.
- */
-void RadioHsWidgetRadioServiceClient::sendControlRequest(
-    const QVariant &argument,
-    const FmRadio::VisibiltyAfterRequest visibility)
-{
-    LOG_METHOD_ENTER;
-    if (!argument.isValid()) {
-        return;
-    }
-    
-    // If there is not mRadioControlRequest already.
-    if (!mRadioControlRequest) {
-        // Create it.
-        createControlServiceRequest();
-    }
-    
-    // Set argument list for request.
-    QVariantList arguments;
-    arguments.append(argument);
-    mRadioControlRequest->setArguments(arguments);
-    
-    prepareRequestInfo(mRadioControlRequest, visibility);
-    
-    LOG("Send request");
-    bool res = mRadioControlRequest->send();
-    
-    /*
-    if (!res) {
-        LOG("Send failed");
-        int error = mRadioControlRequest->lastError();
-        handleRequestError(error);
-    }
-    */
-}
-
-/*!
-    Sends the monitor request.
-    
-    \param visibility Desired visibility for the radio after the request.
- */
-void RadioHsWidgetRadioServiceClient::sendMonitorRequest(
-    const FmRadio::VisibiltyAfterRequest visibility)
-{
-    LOG_METHOD_ENTER;
-    prepareRequestInfo(mRadioMonitorRequest, visibility);
-    if (!mRequestPending) {
-        LOG("Send request");
-        mRequestPending = mRadioMonitorRequest->send();
-    }
-}
-
-/*!
-    Prepares the visibility of the request.
-    
-    \param request Request to prepare.
-    \param visibility Desired visibility for the radio after the request.
- */
-void RadioHsWidgetRadioServiceClient::prepareRequestInfo(
-    XQAiwRequest *request,
-    const FmRadio::VisibiltyAfterRequest visibility)
-{
-    LOG_METHOD_ENTER;
-    XQRequestInfo info;
-    if (visibility == FmRadio::VisibiltyToForeground) {
-        info.setForeground(true);
-    } else if (visibility == FmRadio::VisibiltyToBackground) {
-        info.setBackground(true);
-    }
-    if (request) {
-        request->setInfo(info);
-    }
-}
--- a/radiohswidget/stub/xqaiwinterfacedescriptor.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +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:  XQAiwInterfaceDescriptor stub for FM Radio home screen widget
-*               unit testing.
-*
-*/
-
-// User includes
-#include "xqaiwinterfacedescriptor.h"
-#include "radiologger.h"
-
-/*!
-    \class XQAiwInterfaceDescriptor
-    \brief Stub implementation of XQAiwInterfaceDescriptor for unit testing
-*/
-
-// ======== MEMBER FUNCTIONS ========
-
-XQAiwInterfaceDescriptor::XQAiwInterfaceDescriptor()
-{
-    LOG_METHOD_ENTER;
-}
-
-XQAiwInterfaceDescriptor::~XQAiwInterfaceDescriptor()
-{
-    LOG_METHOD_ENTER;
-}
-
-bool XQAiwInterfaceDescriptor::operator==(const XQAiwInterfaceDescriptor& other) const
-{
-    LOG_METHOD_ENTER;
-    return *this == other;
-}
--- a/radiohswidget/stub/xqaiwinterfacedescriptor.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,36 +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:  Stub for FM Radio home screen widget unit testing.
-*
-*/
-
-#ifndef XQAIWINTERFACEDESCRIPTOR_H
-#define XQAIWINTERFACEDESCRIPTOR_H
-
-// System includes
-#include <QObject>
-#include <QVariant>
-
-class XQAiwInterfaceDescriptor : public QObject
-{
-    Q_OBJECT
-
-public:
-    XQAiwInterfaceDescriptor();
-    ~XQAiwInterfaceDescriptor();
-    bool operator==(const XQAiwInterfaceDescriptor& other) const;
-
-};
-
-#endif // XQAIWINTERFACEDESCRIPTOR_H
--- a/radiohswidget/stub/xqaiwrequest.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,102 +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:  XQAiwRequest stub for FM Radio home screen widget
-*               unit testing.
-*
-*/
-
-// System includes
-#include <QVariant>
-
-// User includes
-#include "xqaiwrequest.h"
-#include "xqrequestinfo.h"
-#include "radioservicedef.h"
-#include "radiologger.h"
-
-extern QVariantList request_mocks;
-extern int send_count;
-
-/*!
-    \class XQAiwRequest
-    \brief Stub implementation of XQAiwRequest for unit testing
-*/
-
-// ======== MEMBER FUNCTIONS ========
-
-XQAiwRequest::XQAiwRequest(const QString &interface,
-    const QString &operation, bool isEmbedded) :
-    mOperation(operation),
-    mRequestCount(0)
-{
-    LOG_METHOD_ENTER;
-}
-
-XQAiwRequest::~XQAiwRequest()
-{
-    LOG_METHOD_ENTER;
-}
-
-static void replyRequestOk(QVariant reply)
-{
-    LOG_METHOD_ENTER;
-}
-
-void XQAiwRequest::setOperation(const QString &operation)
-{
-    LOG_METHOD_ENTER;
-    mOperation = operation;
-}
-
-void XQAiwRequest::setSynchronous(bool synchronous)
-{
-    LOG_METHOD_ENTER;
-}
-
-void XQAiwRequest::setEmbedded(bool embedded)
-{
-    LOG_METHOD_ENTER;
-}
-
-bool XQAiwRequest::send()
-{
-    LOG_METHOD_ENTER;
-    pendingRequests.append(mOperation);
-    replyAfterDelay();
-    return true;
-}
-
-void XQAiwRequest::setInfo(const XQRequestInfo &info)
-{
-    LOG_METHOD_ENTER;
-}
-
-bool XQAiwRequest::replyAfterDelay()
-{
-    LOG_METHOD;
-    QString operationStr;
-    bool ret = true;
-    if (mRequestCount < send_count) {
-        replyRequestOk((request_mocks.at(mRequestCount)).toList());
-        ret = false;
-    }
-    return ret;
-}
-
-void XQAiwRequest::replyRequestOk(const QVariantList &reply)
-{
-    LOG_METHOD_ENTER;
-    ++mRequestCount;
-    emit requestOk(reply);
-}
--- a/radiohswidget/stub/xqaiwrequest.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,61 +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:  Stub for FM Radio home screen widget unit testing.
-*
-*/
-
-#ifndef XQAIWREQUEST_H
-#define XQAIWREQUEST_H
-
-// System includes
-#include <QObject>
-#include <QVariant>
-#include <QStringList>
-
-// User includes
-#include <xqrequestinfo.h>
-
-class XQAiwRequest : public QObject
-{
-    Q_OBJECT
-
-public:
-    XQAiwRequest(const QString &interface, const QString &operation, bool isEmbedded);
-    ~XQAiwRequest();
-
-    void replyRequestOk(const QVariantList &reply);
-
-public slots:
-    void setOperation(const QString &operation);
-    void setSynchronous(bool synchronous);
-    void setEmbedded(bool embedded);
-    bool send();
-    void setInfo(const XQRequestInfo &info);
-
-signals:
-    void requestOk(const QVariant& result);
-    void requestError(int errorCode, const QString& errorMessage);
-    
-private:
-    bool replyAfterDelay();
-    
-    
-private: // data
-    QString mOperation;
-    QStringList pendingRequests;
-    int mRequestCount;
-
-};
-
-#endif // XQAIWREQUEST_H
--- a/radiohswidget/stub/xqapplicationmanager.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +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:  XQApplicationManager stub for FM Radio home screen widget
-*               unit testing.
-*
-*/
-
-// User includes
-#include "xqapplicationmanager.h"
-#include "xqaiwrequest.h"
-#include "radioservicedef.h"
-#include "radiologger.h"
-
-XQAiwRequest *application_manager_mock_refresh_request = new XQAiwRequest("interface", "operation", false);
-XQAiwRequest *application_manager_mock_monitor_request = new XQAiwRequest("interface", "operation2", false);
-
-/*!
-    \class XQApplicationManager
-    \brief Stub implementation of XQApplicationManager for unit testing
-*/
-
-// ======== MEMBER FUNCTIONS ========
-
-XQApplicationManager::XQApplicationManager()
-{
-    LOG_METHOD_ENTER;
-}
-
-XQApplicationManager::~XQApplicationManager()
-{
-    LOG_METHOD_ENTER;
-}
-
-XQAiwRequest* XQApplicationManager::create(const QString& interface, const QString& operation, bool embedded)
-{
-    LOG_METHOD_ENTER;
-    if (operation.compare(RADIO_MONITOR_SERVICE_REFRESH_OPERATION) == 0) {
-        application_manager_mock_refresh_request = new XQAiwRequest(interface, operation, embedded);
-        return application_manager_mock_refresh_request;
-    } else if (operation.compare(RADIO_MONITOR_SERVICE_OPERATION) == 0) {
-        application_manager_mock_monitor_request = new XQAiwRequest(interface, operation, embedded);
-        return application_manager_mock_monitor_request;
-    }
-    return NULL; 
-}
--- a/radiohswidget/stub/xqapplicationmanager.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +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:  Stub for FM Radio home screen widget unit testing.
-*
-*/
-
-#ifndef XQAPPLICATIONMANAGER_H
-#define XQAPPLICATIONMANAGER_H
-
-// System includes
-#include <QObject>
-
-// User includes
-#include "xqaiwrequest.h"
-
-class XQApplicationManager : public QObject
-{
-    Q_OBJECT
-
-public:
-
-    XQApplicationManager();
-    ~XQApplicationManager();
-    
-    XQAiwRequest* create(const QString& interface, const QString& operation, bool embedded = true);
-
-};
-
-#endif // XQAPPLICATIONMANAGER_H
--- a/radiohswidget/stub/xqrequestinfo.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,53 +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:  XQRequestInfo stub for FM Radio home screen widget
-*               unit testing.
-*
-*/
-
-// User includes
-#include "xqrequestinfo.h"
-#include "radiologger.h"
-
-/*!
-    \class XQRequestInfo
-    \brief Stub implementation of XQRequestInfo for unit testing
-*/
-
-// ======== MEMBER FUNCTIONS ========
-
-XQRequestInfo::XQRequestInfo()
-{
-    LOG_METHOD_ENTER;
-}
-
-XQRequestInfo::~XQRequestInfo()
-{
-    LOG_METHOD_ENTER;
-}
-
-void XQRequestInfo::setForeground(bool on)
-{
-    LOG_METHOD_ENTER;
-}
-
-void XQRequestInfo::setBackground(bool on)
-{
-    LOG_METHOD_ENTER;
-}
-
-void XQRequestInfo::setInfo(const QString &key, const QVariant &value)
-{
-    LOG_METHOD_ENTER;
-}
--- a/radiohswidget/stub/xqrequestinfo.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +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:  Stub for FM Radio home screen widget unit testing.
-*
-*/
-
-#ifndef XQREQUESTINFO_H
-#define XQREQUESTINFO_H
-
-// System includes
-#include <QObject>
-#include <QVariant>
-
-class XQRequestInfo : public QObject
-{
-    Q_OBJECT
-
-public:
-    XQRequestInfo();
-    ~XQRequestInfo();
-    
-    void setForeground(bool on);
-    void setBackground(bool on);
-    void setInfo(const QString &key, const QVariant &value);
-
-public slots:
-
-signals:
-
-};
-
-#endif // XQREQUESTINFO_H
--- a/radiohswidget/stub/xqsettingskey.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,60 +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:  XQSettingsKey stub for FM Radio home screen widget
-*               unit testing.
-*
-*/
-
-// User includes
-#include "xqsettingskey.h"
-#include "radiologger.h"
-
-/*!
-    \class XQSettingsKey
-    \brief Stub implementation of XQSettingsKey for unit testing
-*/
-
-// ======== MEMBER FUNCTIONS ========
-
-XQSettingsKey::XQSettingsKey(XQSettingsKey::Target target, long int uid,
-    unsigned long int key)
-{
-    LOG_METHOD_ENTER;
-    m_target = target;
-    m_uid = uid;
-    m_key = key;
-}
-
-XQSettingsKey::~XQSettingsKey()
-{
-    LOG_METHOD_ENTER;
-}
-
-XQSettingsKey::Target XQSettingsKey::target() const
-{
-    LOG_METHOD_ENTER;
-    return m_target;
-}
-
-long int XQSettingsKey::uid() const
-{
-    LOG_METHOD_ENTER;
-    return m_uid;
-}
-
-unsigned long int XQSettingsKey::key() const
-{
-    LOG_METHOD_ENTER;
-    return m_key;
-}
--- a/radiohswidget/stub/xqsettingskey.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,43 +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:  Stub for FM Radio home screen widget unit testing.
-*
-*/
-
-#ifndef XQSETTINGSKEY_H
-#define XQSETTINGSKEY_H
-
-class XQSettingsKey
-{
-public:
-    enum Target
-    {
-        TargetCentralRepository = 0,
-        TargetPublishAndSubscribe
-    };
-
-    XQSettingsKey(XQSettingsKey::Target target, long int uid, unsigned long int key);
-    ~XQSettingsKey();
-
-    XQSettingsKey::Target target() const;
-    long int uid() const;
-    unsigned long int key() const;
-
-protected:
-    XQSettingsKey::Target m_target;
-    long int m_uid;
-    unsigned long int m_key;
-};
-
-#endif // XQSETTINGSKEY_H
--- a/radiohswidget/stub/xqsettingsmanager.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +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:  XQSettingsManager stub for FM Radio home screen widget
-*               unit testing.
-*
-*/
-
-// User includes
-#include "xqsettingsmanager.h"
-#include "radiologger.h"
-
-extern QVariant settings_manager_mock_return_profile;
-extern QVariant settings_manager_mock_return_2nd_profile;
-extern bool settings_manager_mock_bool_return;
-
-/*!
-    \class XQSettingsManager
-    \brief Stub implementation of XQSettingsManager for unit testing
-*/
-
-// ======== MEMBER FUNCTIONS ========
-
-XQSettingsManager::XQSettingsManager(QObject* parent) : QObject(parent)
-{
-    LOG_METHOD_ENTER;
-}
-
-XQSettingsManager::~XQSettingsManager()
-{
-    LOG_METHOD_ENTER;
-}
-
-QVariant XQSettingsManager::readItemValue(const XQSettingsKey& key, XQSettingsManager::Type type)
-{
-    LOG_METHOD_ENTER;
-    Q_UNUSED(key);
-    Q_UNUSED(type);
-    return settings_manager_mock_return_profile;
-}
-
-bool XQSettingsManager::startMonitoring(const XQSettingsKey& key, XQSettingsManager::Type type)
-{
-    LOG_METHOD_ENTER;
-    // Set the 2nd startup mode.
-    settings_manager_mock_return_profile = settings_manager_mock_return_2nd_profile;
-    emit valueChanged(key, type);
-    return settings_manager_mock_bool_return;
-}
-
-bool XQSettingsManager::stopMonitoring(const XQSettingsKey& key)
-{
-    return true;
-}
-
--- a/radiohswidget/stub/xqsettingsmanager.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,68 +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:  Stub for FM Radio home screen widget unit testing.
-*
-*/
-
-#ifndef XQSETTINGSMANAGER_H
-#define XQSETTINGSMANAGER_H
-
-// System includes
-#include <QObject>
-#include <QVariant>
-
-// Forward declarations
-class XQSettingsKey;
-
-class XQSettingsManager : public QObject
-{
-    Q_OBJECT
-
-public:
-
-    enum Type
-    {
-        TypeVariant = 0,
-        TypeInt,
-        TypeDouble,
-        TypeString,
-        TypeByteArray
-    };
-
-    enum Error 
-    {
-        NoError = 0,
-        OutOfMemoryError,
-        NotFoundError,
-        AlreadyExistsError,
-        PermissionDeniedError,
-        BadTypeError,
-        NotSupportedError,
-        UnknownError = -1
-    };
-    
-    XQSettingsManager(QObject* parent = 0);
-    ~XQSettingsManager();
-
-    QVariant readItemValue(const XQSettingsKey& key, XQSettingsManager::Type type = XQSettingsManager::TypeVariant);
-    bool startMonitoring(const XQSettingsKey& key, XQSettingsManager::Type type = XQSettingsManager::TypeVariant);
-    bool stopMonitoring(const XQSettingsKey& key);
-    
-signals:
-    void valueChanged(const XQSettingsKey& key, const QVariant& value);
-    void itemDeleted(const XQSettingsKey& key);
-
-};
-
-#endif // XQSETTINGSMANAGER_H
--- a/radiohswidget/tsrc/buildflags.pri	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,82 +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:
-#
-
-# ##########################################################
-# Start of Flag definitions
-# Add or remove comments to disable or enable the features
-# ##########################################################
-
-# ##########################################################
-# Start of Logging flag definitions
-# ##########################################################
-
-# Full logging flag that enables the full logging including also timestamps
-# Enabled by default in debug builds
-# CONFIG(debug, debug|release) : LOGGING_FLAGS += LOGGING_ENABLED
-
-# Uncomment to enable full logging in release builds
-# LOGGING_FLAGS *= LOGGING_ENABLED
-
-# Timestamp logging flag that enables only timestamp logging
-# LOGGING_FLAGS += TIMESTAMP_LOGGING_ENABLED
-
-# Combines Ui and Engine logs by feeding UI traces to the engine logger
-# LOGGING_FLAGS += COMBINE_WITH_ENGINE_LOGGER
-
-# Logging level
-# 1 - Normal level
-# 2 - More verbose level
-# 3 - Most verbose level
-LOGGING_FLAGS += LOGGING_LEVEL=1
-
-# Select which radio component is being logged
-# 1 - Radio application
-# 2 - Radio homescreen widget
-LOGGING_FLAGS += LOGGED_COMPONENT=2
-
-contains(LOGGING_FLAGS, TIMESTAMP_LOGGING_ENABLED)|contains(LOGGING_FLAGS, LOGGING_ENABLED) {
-
-    # Writes debug prints to file if enabled
-    #LOGGING_FLAGS += TRACE_TO_FILE
-
-    # Settings for the log file name
-    symbian:contains(LOGGING_FLAGS, TRACE_TO_FILE) {
-        LOGGING_FLAGS += \"TRACE_OUTPUT_FILE=\\\"c:/logs/radio/radiohswidget.txt\\\"\"
-        LOGGING_FLAGS += FILTER_BY_LOGMARKER=true
-    }
-}
-
-# Method for testing signal-slot connections
-# 1 - Log failed connection
-# 2 - Log failed connection and halt debugger
-LOGGING_FLAGS += CONNECT_TEST_MODE=2
-
-# Logging is always enabled in Win32 environment
-win32:LOGGING_FLAGS *= LOGGING_ENABLED
-
-DEFINES += $$LOGGING_FLAGS
-
-# ##########################################################
-# End of Flag definitions
-# ##########################################################
-
-# $$_PRO_FILE_PWD_ points to the directory of the pro file
-MOC_DIR         = $$_PRO_FILE_PWD_/tmp
-RCC_DIR         = $$_PRO_FILE_PWD_/tmp
-OBJECTS_DIR     = $$_PRO_FILE_PWD_/tmp
-UI_DIR          = $$_PRO_FILE_PWD_/tmp
-UI_HEADERS_DIR  = $$_PRO_FILE_PWD_/tmp
-UI_SOURCES_DIR  = $$_PRO_FILE_PWD_/tmp
--- a/radiohswidget/tsrc/inc/radiohswidget.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,93 +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:  FM Radio home screen widget unit tests.
-*
-*/
-
-#ifndef T_RADIOHSWIDGETSTUB_H
-#define T_RADIOHSWIDGETSTUB_H
-
-// INCLUDES
-#include <QObject>
-#include <QVariant>
-#include <QList>
-
-/*!
-    \struct ReceivedInfo
-    \brief Helper to store received information on unit tests.
-*/
-struct ReceivedInfo {
-    /*! Stores the type of received information. */
-    int informationType;
-    /*! Stores the actual data of received information. */
-    QVariant information;
-};
-
-/*!
-    \namespace FmRadio
-    \brief Wraps enumerators for radio state and service request visibility. 
- */
-namespace FmRadio
-{
-    /*! Enum for radio application states. */
-    enum State
-    {
-        StateUndefined,
-        StateNotRunning,
-        StateStarting,
-        StateRunning,
-        StateSeeking,
-        StateAntennaNotConnected,
-        StateClosing
-    };
-    
-    /*! Enum for controlling the visibility of the radio application. */
-    enum VisibiltyAfterRequest
-    {
-        VisibiltyDoNotChange,
-        VisibiltyToForeground,
-        VisibiltyToBackground
-    };
-
-}
-
-class RadioHsWidget : public QObject
-{
-    Q_OBJECT
-
-public:
-
-    RadioHsWidget();
-    ~RadioHsWidget();
-
-    void handleRadioInformationChange(const int informationType,
-        const QVariant &information);
-
-    void handleRadioStateChange(const QVariant &value);
-    
-    ReceivedInfo receivedInformation();
-    int receivedInformationCount();
-
-    void reset();
-
-private: // data
-    
-    /*! Stores received information. Correctness of
-        RadioHsWidgetRadioServiceClient mediated information is checked from here.
-    */
-    QList<ReceivedInfo> mReceivedInformation;
-    
-};
-
-#endif // T_RADIOHSWIDGETSTUB_H
--- a/radiohswidget/tsrc/inc/t_radiohswidget.h	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,86 +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 T_RADIOHSWIDGET_H_
-#define T_RADIOHSWIDGET_H_
-
-
-// System includes
-#include <QtTest/QtTest>
-
-// User includes
-#include "radiohswidget.h"
-#include "radiohswidgetprofilereader.h"
-#include "radiohswidgetradioserviceclient.h"
-
-/*!
-    \struct SendInfo
-    \brief Helper to store send information on unit tests.
-*/
-struct SendInfo {
-    /*! Stores the type of information send. */
-    int informationType;
-    /*! Stores the information to send. */
-    QVariant information;
-    /*! Stores the actual data of information send. */
-    QVariant data;
-};
-
-
-class TestRadioHsWidget : public QObject
-{
-    Q_OBJECT    
-    
-public:
-
-    TestRadioHsWidget();
-    ~TestRadioHsWidget();    
-
-public slots:
-    
-private slots:
-    // test framework called slots 
-    void initTestCase();
-    void init();
-    void cleanup();
-    void cleanupTestCase();
-    void offlineModeTest();
-    void validReplies();
-    void invalidReplies();
-    
-private:
-    void createSendInfo(int informationType, const QVariant information);
-    void verifyReceivedInformation(int informationType,
-        const QVariant &receivedInformation, const QVariant &sendInformation);
-    
-private: // Data
-    /*! Stores RadioHsWidget stub. */
-    QScopedPointer<RadioHsWidget> mRadioHsWidgetStub;
-    /*! Stores RadioHsWidgetProfileReader. */
-    QScopedPointer<RadioHsWidgetProfileReader> mProfileReader;
-    /*! Stores RadioHsWidgetRadioServiceClient. */
-    QScopedPointer<RadioHsWidgetRadioServiceClient> mServiceClient;
-    
-    /*! Stores refresh request mock. */
-    //XQAiwRequest *application_manager_mock_refresh_request;
-    
-    /*! Stores send information. */
-    QList<SendInfo> mSendInfos;
-};
-
-#endif /* T_RADIOHSWIDGET_H_ */
--- a/radiohswidget/tsrc/src/radiohswidget.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,107 +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:  FM Radio home screen widget
-*
-*/
-
-// User includes
-#include "radiohswidget.h"
-#include "radiologger.h"
-
-// This is defined in t_radiohswidget.cpp
-extern int EMPTY_REPLY;
-
-/*!
-    \class RadioHsWidget
-    \brief Stub implementation of FM Radio home screen widget for unit
-    testing.
-
-    RadioHsWidget implements needed functions for the FM Radio home screen
-    widget unit tests.
-*/
-
-// ======== MEMBER FUNCTIONS ========
-
-/*!
-    Constrcutor.
- */
-RadioHsWidget::RadioHsWidget()
-{
-    LOG_METHOD;
-}
-
-/*!
-    Destructor.
- */
-RadioHsWidget::~RadioHsWidget()
-{
-    LOG_METHOD;
-}
-
-/*!
-    Handles changes in FM Radio information.
-
-    \param informationType Type of changed information.
-    \param information Actual information.
- */
-void RadioHsWidget::handleRadioInformationChange(const int informationType,
-        const QVariant &information)
-{
-    LOG_METHOD;
-    if (informationType != EMPTY_REPLY) {
-        ReceivedInfo info;
-        info.informationType = informationType;
-        info.information = information;
-        mReceivedInformation.append(info);
-    }
-}
-
-/*!
-    Handles changes in FM Radio state.
-
-    \param value New state of the radio application.
-*/
-void RadioHsWidget::handleRadioStateChange(const QVariant &value)
-{
-    LOG_METHOD;
-    Q_UNUSED(value);
-}
-
-/*!
-    Returns the last received information and removes it from the list.
-*/
-ReceivedInfo RadioHsWidget::receivedInformation()
-{
-    LOG_METHOD;
-    ReceivedInfo ret;
-    if (!mReceivedInformation.isEmpty()) {
-        ret = mReceivedInformation.takeLast();
-    }
-    return ret;
-}
-/*!
-    Returns the count of received information.
-*/
-int RadioHsWidget::receivedInformationCount()
-{
-    return mReceivedInformation.count();
-}
-
-/*!
-    Clears the received info list.
-*/
-void RadioHsWidget::reset()
-{
-    mReceivedInformation.clear();
-}
--- a/radiohswidget/tsrc/src/t_radiohswidget.cpp	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,405 +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:
-*
-*/
-
-// System includes
-#include <QVariant>
-
-// User Includes
-#include "t_radiohswidget.h"
-#include "xqsettingsmanager.h"
-#include "xqapplicationmanager.h"
-#include "xqaiwrequest.h"
-#include "xqaiwinterfacedescriptor.h"
-#include "radioservicedef.h"
-#include "radiologger.h"
-
-// Constants
-/**
-* From ProfileEngineSDKCRKeys.h
-* The id of the currently active profile, integer value.
-* Possible values:
-*
-* 0 = General profile (default value)<br>
-* 1 = Silent profile<br>
-* 2 = Meeting profile<br>
-* 3 = Outdoor profile<br>
-* 4 = Pager profile<br>
-* 5 = Off-line profile<br>
-* 6 = Drive profile<br>
-* 30-49 = User-created profiles<br>
-**/
-const int PROFILE_GENERAL(0); 
-const int PROFILE_SILENT(1); 
-const int PROFILE_MEETING(2); 
-const int PROFILE_OUTDOOR(3); 
-const int PROFILE_PAGER(4); 
-const int PROFILE_OFFLINE(5); 
-const int PROFILE_DRIVE(6); 
-const int PROFILE_USER_CREATED(35);
-
-/** Requests are not embedded. */
-const bool EMBEDDED_REQUEST(false);
-
-/** Last request should be answered with empty reply. */
-int EMPTY_REPLY(-5);
-
-/** Test values for favorite station count. */
-const int FAVORITE_STATION_COUNT_INVALID_TOO_LOW1(-56);
-const int FAVORITE_STATION_COUNT_INVALID_TOO_LOW2(-1);
-const int FAVORITE_STATION_COUNT_VALID_LOWER_BOUNDARY(0);
-const int FAVORITE_STATION_COUNT_VALID1(1);
-const int FAVORITE_STATION_COUNT_VALID2(2);
-const int FAVORITE_STATION_COUNT_VALID3(3);
-const int FAVORITE_STATION_COUNT_VALID4(9);
-const int FAVORITE_STATION_COUNT_VALID5(78);
-const int FAVORITE_STATION_COUNT_VALID_UPPER_BOUNDARY(100);
-const int FAVORITE_STATION_COUNT_INVALID_TOO_HIGH1(101);
-const int FAVORITE_STATION_COUNT_INVALID_TOO_HIGH2(1256);
-
-/** Test values for textual information. */
-const QString TEST_FREQUENCY("99.9");
-const QString TEST_NAME("Radio Test");
-const QString TEST_GENRE("Test GenRe");
-const QString TEST_RADIO_TEXT("Test RDS");
-const QString TEST_DYNAMIC_PSNAME("Dynamic PS Name test");
-const QString TEST_EMPTY_STRING("");
-const QString TEST_INVALID_STRING;
-/** This test string contains 1000 characters. */
-const QString TEST_TOO_LONG_STRING("1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890");
-
-/** Test values for service notification types. */
-const int RADIO_SERVICE_NOTIFICATION_ID_INVALID_TOO_LOW1(-357);
-const int RADIO_SERVICE_NOTIFICATION_ID_INVALID_TOO_LOW2(-1);
-const int RADIO_SERVICE_NOTIFICATION_ID_INVALID_TOO_LOW3(0);
-const int RADIO_SERVICE_NOTIFICATION_ID_VALID_LOWER_BOUNDARY(1);
-const int RADIO_SERVICE_NOTIFICATION_ID_VALID_UPPER_BOUNDARY(8);
-const int RADIO_SERVICE_NOTIFICATION_ID_INVALID_TOO_HIGH1(9);
-const int RADIO_SERVICE_NOTIFICATION_ID_INVALID_TOO_HIGH2(57982);
-const int RADIO_STATUS_INVALID_TOO_LOW1(-581);
-const int RADIO_STATUS_INVALID_TOO_LOW2(-1);
-const int RADIO_STATUS_VALID_LOWER_BOUNDARY(0);
-const int RADIO_STATUS_VALID_UPPER_BOUNDARY(5);
-const int RADIO_STATUS_INVALID_TOO_HIGH1(6);
-const int RADIO_STATUS_INVALID_TOO_HIGH2(456);
-
-/** Mock returns for settings manager stub. */
-QVariant settings_manager_mock_return_profile;
-QVariant settings_manager_mock_return_2nd_profile;
-bool settings_manager_mock_bool_return;
-
-/** These request are defined in stub xqapplicationmanager.cpp. */
-extern XQAiwRequest *application_manager_mock_refresh_request;
-extern XQAiwRequest *application_manager_mock_monitor_request;
-
-/** List for request mocks. */
-QVariantList request_mocks;
-/** Amount of requests send. */
-int send_count;
-
-
-/*!
-    \class TestRadioHsWidget
-    \brief Unit testing for FM Radio hs widget.
-
-    TestRadioHsWidget implements needed functions for the FM Radio home screen
-    widget unit tests.
-*/
-
-// ======== MEMBER FUNCTIONS ========
-
-/*!
-    Main function.
-    
-    There's been problems with QTEST_MAIN macro, so main function is defined
-    here.
-*/
-int main(int /* argc*/, char *argv[])
-{
-    LOG_METHOD_ENTER;
-    TestRadioHsWidget tv;
-
-    char *pass[3];
-    pass[0] = argv[0];
-    pass[1] = "-o";
-    pass[2] = "c:\\data\\testradiohswidget.txt";
-    
-    int res = QTest::qExec(&tv, 3, pass);
-
-    return res;
-}
-
-/*!
-    Constructor.
- */
-TestRadioHsWidget::TestRadioHsWidget()
-{
-    LOG_METHOD_ENTER;
-}
-
-
-/*!
-    Destructor.
- */
-TestRadioHsWidget::~TestRadioHsWidget()
-{
-    LOG_METHOD_ENTER;
-}
-
-/*!
-    Called before each testfunction is executed.
- */
-void TestRadioHsWidget::init()
-{
-    LOG_METHOD_ENTER;
-    settings_manager_mock_return_profile = PROFILE_GENERAL;
-    request_mocks.clear();
-    mSendInfos.clear();
-    send_count = -1;
-    mRadioHsWidgetStub.data()->reset();
-}
-
-/*!
-    Called after every testfunction.
- */
-void TestRadioHsWidget::cleanup()
-{
-    LOG_METHOD_ENTER;
-}
-
-/*!
-    Called before the first testfunction is executed
- */
-void TestRadioHsWidget::initTestCase()
-{
-    LOG_METHOD_ENTER;
-    mRadioHsWidgetStub.reset(new RadioHsWidget());
-    QVERIFY(mRadioHsWidgetStub);
-    mProfileReader.reset(new RadioHsWidgetProfileReader(mRadioHsWidgetStub.data()));
-    QVERIFY(mProfileReader);
-    mServiceClient.reset(new RadioHsWidgetRadioServiceClient(mRadioHsWidgetStub.data()));
-    QVERIFY(mServiceClient);
-}
-
-/*!
-    Called after the last testfunction was executed.
- */
-void TestRadioHsWidget::cleanupTestCase()
-{
-    LOG_METHOD_ENTER;
-}
-
-/*!
-    Tests RadioHsWidgetProfileReader and it's isCurrentProfileOffline()
-    function.
- */
-void TestRadioHsWidget::offlineModeTest()
-{
-    LOG_METHOD;
-    settings_manager_mock_return_profile = PROFILE_GENERAL;
-    bool isOffline = mProfileReader.data()->isCurrentProfileOffline();
-    QVERIFY2(( isOffline == false ), "FmRadioHsWidget:RadioHsWidget profile is offline");
-    settings_manager_mock_return_profile = PROFILE_OFFLINE;
-    isOffline = mProfileReader.data()->isCurrentProfileOffline();
-    QVERIFY2(( isOffline == true ), "FmRadioHsWidget:RadioHsWidget profile is not offline");
-    settings_manager_mock_return_profile = PROFILE_USER_CREATED;
-    isOffline = mProfileReader.data()->isCurrentProfileOffline();
-    QVERIFY2(( isOffline == false ), "FmRadioHsWidget:RadioHsWidget profile is offline");
-}
-
-/*!
-    Tests RadioHsWidgetRadioServiceClient class and it's ability to receive
-    and forward valid information.
- */
-void TestRadioHsWidget::validReplies()
-{
-    LOG_METHOD;
-    // Replies that should be ok.
-    createSendInfo(RadioServiceNotification::FavoriteCount, QVariant(FAVORITE_STATION_COUNT_VALID_LOWER_BOUNDARY));
-    createSendInfo(RadioServiceNotification::FavoriteCount, QVariant(FAVORITE_STATION_COUNT_VALID1));
-    createSendInfo(RadioServiceNotification::FavoriteCount, QVariant(FAVORITE_STATION_COUNT_VALID2));
-    createSendInfo(RadioServiceNotification::FavoriteCount, QVariant(FAVORITE_STATION_COUNT_VALID3));
-    createSendInfo(RadioServiceNotification::FavoriteCount, QVariant(FAVORITE_STATION_COUNT_VALID4));
-    createSendInfo(RadioServiceNotification::FavoriteCount, QVariant(FAVORITE_STATION_COUNT_VALID5));
-    createSendInfo(RadioServiceNotification::FavoriteCount, QVariant(FAVORITE_STATION_COUNT_VALID_UPPER_BOUNDARY));
-    createSendInfo(RadioServiceNotification::CurrentIsFavorite, QVariant(true));
-    createSendInfo(RadioServiceNotification::CurrentIsFavorite, QVariant(false));
-    createSendInfo(RadioServiceNotification::RadioStatus, QVariant(RadioStatus::UnSpecified));
-    createSendInfo(RadioServiceNotification::RadioStatus, QVariant(RadioStatus::Playing));
-    createSendInfo(RadioServiceNotification::RadioStatus, QVariant(RadioStatus::Muted));
-    createSendInfo(RadioServiceNotification::RadioStatus, QVariant(RadioStatus::Seeking));
-    createSendInfo(RadioServiceNotification::RadioStatus, QVariant(RadioStatus::NoAntenna));
-    createSendInfo(RadioServiceNotification::RadioStatus, QVariant(RadioStatus::PoweringOff));
-    createSendInfo(RadioServiceNotification::RadioStatus, QVariant(RADIO_STATUS_VALID_LOWER_BOUNDARY));
-    createSendInfo(RadioServiceNotification::RadioStatus, QVariant(RADIO_STATUS_VALID_UPPER_BOUNDARY));
-    createSendInfo(RadioServiceNotification::Frequency, QVariant(TEST_FREQUENCY));
-    createSendInfo(RadioServiceNotification::Name, QVariant(TEST_NAME));
-    createSendInfo(RadioServiceNotification::Name, QVariant(TEST_EMPTY_STRING));
-    createSendInfo(RadioServiceNotification::Genre, QVariant(TEST_GENRE));
-    createSendInfo(RadioServiceNotification::RadioText, QVariant(TEST_RADIO_TEXT));
-    createSendInfo(RadioServiceNotification::DynamicPS, QVariant(TEST_DYNAMIC_PSNAME));
-    // Empty reply should be last to put RServiceClient to make an request, which is not replied. 
-    createSendInfo(EMPTY_REPLY, QVariant(EMPTY_REPLY));
-
-    send_count = mSendInfos.count();
-    
-    mServiceClient.data()->startMonitoring(FmRadio::VisibiltyToBackground);
-    mServiceClient.data()->stopMonitoring();
-    
-    int receivedCount = mRadioHsWidgetStub.data()->receivedInformationCount();
-    QVERIFY2((receivedCount == send_count - 1), "Send and received counts doesn't match");
-    
-    ReceivedInfo temp;
-    for (int i = 0; i < send_count - 1; i++) {
-        temp = mRadioHsWidgetStub.data()->receivedInformation();
-        QVERIFY(temp.informationType == mSendInfos.at(i).informationType);
-        verifyReceivedInformation(temp.informationType, temp.information, mSendInfos.at(i).information);
-    }
-}
-
-/*!
-    Tests RadioHsWidgetRadioServiceClient class and it's ability to receive
-    and forward invalid information.
- */
-void TestRadioHsWidget::invalidReplies()
-{
-    LOG_METHOD;
-    QList<int> skipSendInfo;
-    // Replies that should not be ok.
-    createSendInfo(RadioServiceNotification::FavoriteCount, QVariant(FAVORITE_STATION_COUNT_INVALID_TOO_LOW1));
-    createSendInfo(RadioServiceNotification::FavoriteCount, QVariant(FAVORITE_STATION_COUNT_INVALID_TOO_LOW2));
-    createSendInfo(RadioServiceNotification::FavoriteCount, QVariant(FAVORITE_STATION_COUNT_INVALID_TOO_HIGH1));
-    createSendInfo(RadioServiceNotification::FavoriteCount, QVariant(FAVORITE_STATION_COUNT_INVALID_TOO_HIGH2));
-    createSendInfo(RadioServiceNotification::FavoriteCount, QVariant());
-    skipSendInfo.append(request_mocks.count() - 1);
-    createSendInfo(RadioServiceNotification::CurrentIsFavorite, QVariant());
-    skipSendInfo.append(request_mocks.count() - 1);
-    createSendInfo(RadioServiceNotification::RadioStatus, QVariant(RADIO_STATUS_INVALID_TOO_LOW1));
-    createSendInfo(RadioServiceNotification::RadioStatus, QVariant(RADIO_STATUS_INVALID_TOO_LOW1));
-    createSendInfo(RadioServiceNotification::RadioStatus, QVariant(RADIO_STATUS_INVALID_TOO_HIGH1));
-    createSendInfo(RadioServiceNotification::RadioStatus, QVariant(RADIO_STATUS_INVALID_TOO_HIGH2));
-    createSendInfo(RadioServiceNotification::RadioStatus, QVariant());
-    skipSendInfo.append(request_mocks.count() - 1);
-    createSendInfo(RadioServiceNotification::Frequency, QVariant());
-    skipSendInfo.append(request_mocks.count() - 1);
-    createSendInfo(RadioServiceNotification::Name, QVariant(TEST_INVALID_STRING));
-    createSendInfo(RadioServiceNotification::Name, QVariant(TEST_TOO_LONG_STRING));
-    createSendInfo(RadioServiceNotification::Name, QVariant());
-    skipSendInfo.append(request_mocks.count() - 1);
-    createSendInfo(RadioServiceNotification::Genre, QVariant());
-    skipSendInfo.append(request_mocks.count() - 1);
-    createSendInfo(RadioServiceNotification::RadioText, QVariant());
-    skipSendInfo.append(request_mocks.count() - 1);
-    createSendInfo(RadioServiceNotification::DynamicPS, QVariant());
-    skipSendInfo.append(request_mocks.count() - 1);
-    // Replies that should generate a warning.
-    createSendInfo(RADIO_SERVICE_NOTIFICATION_ID_VALID_LOWER_BOUNDARY, QVariant(TEST_EMPTY_STRING));
-    createSendInfo(RADIO_SERVICE_NOTIFICATION_ID_VALID_UPPER_BOUNDARY, QVariant(TEST_EMPTY_STRING));
-    createSendInfo(RADIO_SERVICE_NOTIFICATION_ID_INVALID_TOO_LOW1, QVariant(TEST_EMPTY_STRING));
-    createSendInfo(RADIO_SERVICE_NOTIFICATION_ID_INVALID_TOO_LOW2, QVariant(TEST_EMPTY_STRING));
-    createSendInfo(RADIO_SERVICE_NOTIFICATION_ID_INVALID_TOO_LOW3, QVariant(TEST_EMPTY_STRING));
-    createSendInfo(RADIO_SERVICE_NOTIFICATION_ID_INVALID_TOO_HIGH1, QVariant(TEST_EMPTY_STRING));
-    createSendInfo(RADIO_SERVICE_NOTIFICATION_ID_INVALID_TOO_HIGH2, QVariant(TEST_EMPTY_STRING));
-    // Empty reply should be last to put RServiceClient to make an request, which is not replied. 
-    createSendInfo(EMPTY_REPLY, QVariant(EMPTY_REPLY));
-    
-    send_count = mSendInfos.count();
-    
-    mServiceClient.data()->startMonitoring(FmRadio::VisibiltyToBackground);
-    mServiceClient.data()->stopMonitoring();
-    
-    int receivedCount = mRadioHsWidgetStub.data()->receivedInformationCount();
-    int skippedCount = skipSendInfo.count();
-    QVERIFY2((receivedCount == send_count - skippedCount - 1), "Send and received counts doesn't match");
-    
-    ReceivedInfo temp;
-    for (int i = 0; i < send_count - 1; i++) {
-        if (skipSendInfo.contains(i)) {
-            // Skip verification for information that was filtered in
-            // RadioHsWidgetRadioServiceClient.
-            continue;
-        }
-        temp = mRadioHsWidgetStub.data()->receivedInformation();
-        QVERIFY(temp.informationType == mSendInfos.at(i).informationType);
-        verifyReceivedInformation(temp.informationType, temp.information, mSendInfos.at(i).information);
-    }
-}
-
-/*!
-    Helper function to store send information and append it to a request
-    mocks. 
- */
-void TestRadioHsWidget::createSendInfo(int informationType, const QVariant information)
-{
-    SendInfo info;
-    QVariantList notificationList;
-    
-    info.informationType = informationType;
-    info.information = information;
-    info.data = QVariant(mServiceClient.data()->
-        createRadioNotificationData(
-            info.informationType,
-            info.information
-            ));
-    
-    mSendInfos.append(info);
-
-    notificationList.append(info.data);
-    request_mocks.append(QVariant(notificationList));
-}
-
-/*!
-    Helper function to verify receved information.
- */
-void TestRadioHsWidget::verifyReceivedInformation(int informationType,
-    const QVariant &receivedInformation, const QVariant &sendInformation)
-{
-    switch (informationType) {
-    case RadioServiceNotification::CurrentIsFavorite:
-        QVERIFY(receivedInformation.canConvert(QVariant::Bool));
-        QCOMPARE(receivedInformation.toBool(), sendInformation.toBool());
-        break;
-    case RadioServiceNotification::FavoriteCount:
-        // Fall through because of similar handling
-    case RadioServiceNotification::RadioStatus:
-        QVERIFY(receivedInformation.canConvert(QVariant::Int));
-        QCOMPARE(receivedInformation.toInt(), sendInformation.toInt());
-        break;
-    case RadioServiceNotification::Frequency:
-        // Fall through because of similar type of information and thus
-        // similar handling
-    case RadioServiceNotification::Name:
-        // Fall through because of similar type of information and thus
-        // similar handling
-    case RadioServiceNotification::Genre:
-        // Fall through because of similar type of information and thus
-        // similar handling
-    case RadioServiceNotification::RadioText:
-        // Fall through because of similar type of information and thus
-        // similar handling
-    case RadioServiceNotification::DynamicPS:
-        QVERIFY(receivedInformation.canConvert(QVariant::String));
-        QCOMPARE(receivedInformation.toString(), sendInformation.toString());
-        break;
-    default:
-        QWARN("Default case, shouldn't be here except if specifically testing RadioServiceNotification id out of bounds.");
-        QVERIFY(receivedInformation.canConvert(QVariant::String));
-        QCOMPARE(receivedInformation.toString(), sendInformation.toString());
-        break;
-    }
-}
-
-//QTEST_MAIN(t_radiohswidget)
--- a/radiohswidget/tsrc/t_radiohswidget.pro	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,64 +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:
-#
-
-TEMPLATE = app
-TARGET = t_radiohswidget
-
-DEFINES -= XQSETTINGSMANAGER_LIBRARY
-DEFINES += XQSETTINGSMANAGER_NO_LIBRARY
-DEFINES -= XQSERVICE_EXPORT
-DEFINES += XQ_BUILD_XQSERVICE_LIB
-DEFINES -= XQSERVICEUTIL_EXPORT
-DEFINES += XQ_BUILD_XQSERVICEUTIL_LIB
-
-symbian: {
-    TARGET.CAPABILITY = All -TCB -DRM
-    CONFIG -= hb
-    MMP_RULES += SMPSAFE
-}
-
-INCLUDEPATH += ../stub
-INCLUDEPATH += ../../common
-
-QT += core
-QT += testlib
-
-CONFIG += qtestlib
-
-HEADERS += inc/t_radiohswidget.h
-HEADERS += inc/radiohswidget.h
-HEADERS += ../stub/xqsettingsmanager.h
-HEADERS += ../stub/xqsettingskey.h
-HEADERS += ../stub/xqapplicationmanager.h
-HEADERS += ../stub/xqaiwrequest.h
-HEADERS += ../stub/xqrequestinfo.h
-HEADERS += ../stub/xqaiwinterfacedescriptor.h
-HEADERS += ../inc/radiohswidgetprofilereader.h
-HEADERS += ../inc/radiohswidgetradioserviceclient.h
-
-SOURCES += src/t_radiohswidget.cpp
-SOURCES += src/radiohswidget.cpp
-SOURCES += ../stub/xqsettingsmanager.cpp
-SOURCES += ../stub/xqsettingskey.cpp
-SOURCES += ../stub/xqapplicationmanager.cpp
-SOURCES += ../stub/xqaiwrequest.cpp
-SOURCES += ../stub/xqrequestinfo.cpp
-SOURCES += ../stub/xqaiwinterfacedescriptor.cpp
-SOURCES += ../src/radiohswidgetprofilereader.cpp
-SOURCES += ../src/radiohswidgetradioserviceclient.cpp
-SOURCES += ../../common/radiologger.cpp
-
-include(buildflags.pri)
--- a/rom/bld.inf	Tue Aug 31 15:15:02 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:
-*
-*/
-
-#include<platform_paths.hrh>
-
-PRJ_EXPORTS
-fmradio.iby             CORE_APP_LAYER_IBY_EXPORT_PATH(fmradio.iby)
-fmradio_resources.iby   LANGUAGE_APP_LAYER_IBY_EXPORT_PATH(fmradio_resources.iby)
-
-PRJ_EXTENSIONS
-#ifdef MARM
-    START EXTENSION app-services/buildstubsis
-        OPTION SRCDIR .
-        OPTION SISNAME fmradio_stub
-    END
-#endif
--- a/rom/fmradio.iby	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,46 +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:
-* Iby file for FMRadio
-*
-*/
-
-
-#ifndef FMRADIO_IBY
-#define FMRADIO_IBY
-
-// Use standard macros
-#include <data_caging_paths_for_iby.hrh>
-
-S60_APP_EXE(fmradio)
-data=ZRESOURCE\apps\fmradio.mif                                     APP_RESOURCE_DIR\fmradio.mif
-data=ZPRIVATE\10003a3f\import\apps\fmradio_reg.rsc                  private\10003a3f\import\apps\fmradio_reg.rsc
-
-file=ABI_DIR\BUILD_DIR\fmradioenginewrapper.dll                     SHARED_LIB_DIR\fmradioenginewrapper.dll       PAGED
-file=ABI_DIR\BUILD_DIR\fmradiopresetstorage.dll                     SHARED_LIB_DIR\fmradiopresetstorage.dll       PAGED
-file=ABI_DIR\BUILD_DIR\fmradiouiengine.dll                          SHARED_LIB_DIR\fmradiouiengine.dll            PAGED
-file=ABI_DIR\BUILD_DIR\fmradiowidgets.dll                           SHARED_LIB_DIR\fmradiowidgets.dll             PAGED
-file=ABI_DIR\BUILD_DIR\fmradiowidgetsplugin.dll                     SHARED_LIB_DIR\fmradiowidgetsplugin.dll       PAGED
-data=\epoc32\data\z\resource\plugins\fmradiowidgetsplugin.qtplugin  resource\plugins\fmradiowidgetsplugin.qtplugin
-
-file=ABI_DIR\BUILD_DIR\fmradioengine.dll                            SHARED_LIB_DIR\fmradioengine.dll              PAGED
-file=ABI_DIR\BUILD_DIR\fmradioengineutils.dll                       SHARED_LIB_DIR\fmradioengineutils.dll         PAGED
-file=ABI_DIR\BUILD_DIR\fmradioenginesettings.dll                    SHARED_LIB_DIR\fmradioenginesettings.dll      PAGED
-
-data=ZPRIVATE\10202be9\2002FF52.txt                                 private\10202be9\2002FF52.txt
-data=\epoc32\data\z\resource\fmradioenginesettings.rsc              \resource\fmradioenginesettings.rsc
-
-data=\epoc32\data\z\system\install\fmradio_stub.sis                 system\install\fmradio_stub.sis
-
-#endif
--- a/rom/fmradio_resources.iby	Tue Aug 31 15:15:02 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:
-* Iby file for FMRadio
-*
-*/
-
-
-#ifndef FMRADIO_RESOURCES_IBY
-#define FMRADIO_RESOURCES_IBY
-
-// Use standard macros
-#include <data_caging_paths_for_iby.hrh>
-
-S60_APP_RESOURCE(fmradio)
-
-data=DATAZ_\QT_TRANSLATIONS_DIR\fmradio.qm  QT_TRANSLATIONS_DIR\fmradio.qm
-
-#endif // FMRADIO_RESOURCES_IBY
--- a/rom/fmradio_stub.pkg	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +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: Stub package file for FMRadio
-;
-
-; Languages
-&EN
-
-; Header
-#{"fmradio"}, (0x2002FF53), 1, 0, 0, TYPE=SA
-
-; Localised Vendor name
-%{"Nokia"}
-
-; Unique Vendor name
-:"Nokia"
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/sysdef_1_4_0.dtd	Wed Sep 01 12:30:32 2010 +0100
@@ -0,0 +1,86 @@
+ <!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/sysdef_1_5_1.dtd	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,88 +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
-  proFile CDATA #IMPLIED
-  qmakeArgs 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/bld.inf	Tue Aug 31 15:15:02 2010 +0300
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,24 +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:
-*
-*/
-
-PRJ_MMPFILES
-
-PRJ_TESTMMPFILES
-#include "../radioengine/utils/stub/group/bld.inf"
-#include "../radioengine/settings/stub/group/bld.inf"
-#include "../radioengine/engine/stub/group/bld.inf"
-#include "../radioengine/settings/tsrc/group/bld.inf"